-
Notifications
You must be signed in to change notification settings - Fork 487
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
Miri detects a data race in rayon-core's test mutual_install #938
Comments
I also see a data race via
|
To be clear, that commit is not really part of this repo, but the rust-lang/rustc-rayon fork. I believe the exact problem is that it's missing the fix in #740. That's pretty nice that miri identified this race, because it was a pain to track down at the time. It looks like the backtrace only shows one of the two threads involved in the race though, and we would ideally want to see the other side as well. Anyway, I would like to get rustc-rayon rebased again, and I pushed a branch for that: master...cuviper:rustc-rayon-next. I'm not sure about the deadlock detection though -- I had to make a few functional changes since we don't wake up all threads at once anymore. When I tried this in a rustc build, the ui testsuite hit a deadlock and then panicked when its deadlock handler tried to read a If you (or anyone else watching) have time to look into this, that would be great! |
I'm not actually going to implement this, but would local spans suffice instead of a backtrace for the other racing access? This is seems like the same problem with historical context that I solved for Stacked Borrows checking in this PR, you can see an example with color here: https://miri.saethlin.dev/ub?crate=smallvec&version=1.8.0 (I've debugged a single data race in my whole life so I have no idea what helps) |
The span would definitely help, if a second backtrace is not feasible. In this case, the fix was needed in that other location. |
I think the bigger challenge with backtraces is skill of the implementor 😅 |
…mulacrum Update to rebased rustc-rayon 0.4 In rayon-rs/rayon#938, miri uncovered a race in `rustc-rayon-core` that had already been fixed in the regular `rayon-core`. I have now rebased that fork onto the latest rayon branch, and published as 0.4. I also updated `indexmap` to bump the dependency. `Cargo.lock` changes: Updating indexmap v1.8.0 -> v1.8.2 Updating rayon v1.5.1 -> v1.5.3 Updating rayon-core v1.9.1 -> v1.9.3 Updating rustc-rayon v0.3.2 -> v0.4.0 Updating rustc-rayon-core v0.3.2 -> v0.4.1
I landed the |
I observed this on commit
9fcf0ffe28db6ffe396fb13dbf01cbb925674187
, but not on the latest published version ofrayon-core
.To reproduce:
I then see:
full error with backtrace
The text was updated successfully, but these errors were encountered: