-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
world::World doctests sometimes hangs with Miri #5164
Comments
Possibly relevant: https://github.com/kanidm/concread |
The fact that they advise to disable Stacked Borrows does not inspire a ton of confidence though. ;) FWIW, latest Miri has |
Ah looks like this is tracked in concurrent-queue: smol-rs/concurrent-queue#17 |
The problem in concurrent-queue that we agreed on is that it was using x86-specific fences that Miri does not understand. This has been fixed in concurrent-queue 1.2.4 (smol-rs/concurrent-queue@d61005f). |
To be more precise, using those fences is just wrong when writing Rust code, and Miri understands and detects that correctly. They can only be used correctly when writing inline assembly. |
# Objective - Fixes bevyengine#5164 - Remove `miri-disable-weak-memory-emulation` - Issue has been fixed in dependency
# Objective - Fixes bevyengine#5164 - Remove `miri-disable-weak-memory-emulation` - Issue has been fixed in dependency
# Objective - Fixes bevyengine#5164 - Remove `miri-disable-weak-memory-emulation` - Issue has been fixed in dependency
When running the
world::World (line 56)
doctest in Miri with many different seeds, it eventually runs into an endless loop. This can be avoided by using-Zmiri-disable-weak-memory-emulation
. This probably indicates a bug in bevy or its dependencies, but could also be a bug in Miri.Weak memory emulation makes it so that an atomic load can return "outdated" values, as is permitted by the concurrent memory model of Rust (and C/C++). So likely, some code somewhere reads an old value, thinks it is current, and goes into some kind of spin loop -- and stays there forever.
See here for further analysis by @cbeuw.
The text was updated successfully, but these errors were encountered: