Actions
Bug #17636
closedRace condition in check_rvalue_consistency_force when using ractors
Description
When RGENGC_CHECK_MODE
is enabled and we use multiple ractors, there is a race condition in check_rvalue_consistency_force
that causes an assertion to fail. It happens when a page is created during the call to is_pointer_to_heap
, which causes the binary search to fail.
Reproduction¶
NUM_RACTORS = 10
rs = NUM_RACTORS.times.map do |i|
Ractor.new(i) do |i|
arr = []
10_000.times do |j|
arr << "foo.#{i}.#{j}"
end
arr
end
end
arrs = rs.map { |r| r.take }
The crash log is attached below in crash.log
.
Files
Updated by peterzhu2118 (Peter Zhu) almost 4 years ago
- Description updated (diff)
Updated by ko1 (Koichi Sasada) almost 4 years ago
- Status changed from Open to Assigned
- Assignee set to ko1 (Koichi Sasada)
Thank you. I got same issue.
Updated by ko1 (Koichi Sasada) almost 4 years ago
- Status changed from Assigned to Closed
Applied in changeset git|07ab172ebef28bb82c2650694548d123802d6c22.
sync check_rvalue_consistency_force()
check_rvalue_consistency_force() uses is_pointer_to_heap() and
it should be synchronized with other ractors.
[Bug #17636]
Updated by ko1 (Koichi Sasada) almost 4 years ago
- Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN to 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: REQUIRED
Updated by naruse (Yui NARUSE) over 3 years ago
- Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: REQUIRED to 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: DONE
ruby_3_0 d3863cb2e80f27d26b521b2c957b21feacb900de merged revision(s) 07ab172ebef28bb82c2650694548d123802d6c22.
Actions
Like0
Like0Like0Like0Like0Like0