-
Notifications
You must be signed in to change notification settings - Fork 381
Data race detected on a very early allocation (via bevy_asset v0.6.0) #2020
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
Comments
The action of the machine when it cleans up and deallocates the env var do not acquire the env var lock. Thus they are, technically, causing a data race with some other thread having recently accessed those same locations. It would probably make most sense to just disable the race checker for these "administrative" actions -- the machien has halted at this point, no threads are running, so it's not like there can actually be any races. |
I have now seen this again! I cloned https://github.com/tokio-rs/tokio, current commit is 83477c725acbb6a0da54afc26c67a8bd57e3e0b9 and I ran
|
Also this one reproduces, which is nice. |
I've run
cargo miri test
on a lot of published crates, and exactly once I saw a data race, when testingbevy_asset
version 0.6.0. Here's the output I collected:This strikes me as suspicious, because that allocation ID is too low to be part of this crate's tests. It's somehow part of the Rust runtime.
This was from a run with commit
deb9bfd
, so this panic comes frommiri/src/eval.rs
Line 321 in deb9bfd
From @RalfJung on the Zulip:
This seems plausible to me, because a lot of programs and test suites leak threads (thus the
-Z miri-ignore-leaks
above). But it's still hard to understand how this could cause a data race. From the output it doesn't make sense that this would be some odd state on panic, because the only panic here is the data race itself.I've tried and failed to reproduce this. Unfortunately I don't have the
Cargo.lock
that I used for this, so it may or may not be relevant. There is one in the packaged crate, but when testing crates I remove them after the download.The text was updated successfully, but these errors were encountered: