-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gc_sweep_page assertion triggering in tests #50419
Comments
Also https://buildkite.com/julialang/julia-master/builds/25615#01892bf1-a0b8-4173-bfbb-a697847103ba (also with rr trace) |
After building with I was able to reproduce on #50021 and later, but not on the immediately preceding commit. By looking at this PR, seems like it has introduced a race on the My guess is that with the changes from #50021, an item may be marked twice. Which can lead to CC: @gbaraldi |
(8 GC threads, to clarify) |
Interesting, that PR was made on the assumption that trying to mark the same object twice was a fine, but it seems it's actually not. Which makes me think, are the workstealing queues idempotent? Because if not they are also potential sources of this. |
One thought I have here is, how much is correctness important on that number, because incrementing that counter(nold) is actually one of the most expensive parts of the mark loop currently, because as me and @vtjnash fetch_add is possibly expensive because it has seq_cst behaviour between the load/store. |
At least from what I've seen, getting it wrong means sweeping one extra page, and that should be safe. |
No. Making the mark-phase cheaper at the cost of losing a bit of precision in the sweep phase seems to be worth it, so I think that relaxing the assertion for multithreaded marking would make sense. |
Use atomics in the write-barrier slow-path to prevent duplicates in the remset. As discussed in #50419, setting the mark bit is idempotent, but updating page metadata in the mark phase is not.
https://buildkite.com/julialang/julia-master/builds/25532#01891c91-c02f-4181-b22c-5962d72d1499
@d-netto
The text was updated successfully, but these errors were encountered: