[ruby-core:112210] [Ruby master Bug#19410] If move from ractor fails with error, some objects are left in broken state

Issue #19410 has been reported by luke-gru (Luke Gruber). ---------------------------------------- Bug #19410: If move from ractor fails with error, some objects are left in broken state https://bugs.ruby-lang.org/issues/19410 * Author: luke-gru (Luke Gruber) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ```ruby r = Ractor.new do obj = receive end a = Object.new obj = [a, proc { }] begin r.send(obj, move: true) rescue => e puts "couldn't move" end p a # a is moved, this errors out. But it's not really moved because the other ractor can't access it. It's in limbo :) r << :end r.take ``` This might be tricky to fix, as it requires some sort of commit function for moving objects after every object is checked for ability to move. -- https://bugs.ruby-lang.org/

Issue #19410 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Open to Assigned Assignee set to ko1 (Koichi Sasada) ---------------------------------------- Bug #19410: If move from ractor fails with error, some objects are left in broken state https://bugs.ruby-lang.org/issues/19410#change-101678 * Author: luke-gru (Luke Gruber) * Status: Assigned * Priority: Normal * Assignee: ko1 (Koichi Sasada) * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ```ruby r = Ractor.new do obj = receive end a = Object.new obj = [a, proc { }] begin r.send(obj, move: true) rescue => e puts "couldn't move" end p a # a is moved, this errors out. But it's not really moved because the other ractor can't access it. It's in limbo :) r << :end r.take ``` This might be tricky to fix, as it requires some sort of commit function for moving objects after every object is checked for ability to move. -- https://bugs.ruby-lang.org/
participants (2)
-
hsbt (Hiroshi SHIBATA)
-
luke-gru (Luke Gruber)