Skip to content
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 hangs on running with miri-compare-exchange-weak-failure-rate=1 #2160

Closed
alygin opened this issue May 28, 2022 · 2 comments
Closed

Miri hangs on running with miri-compare-exchange-weak-failure-rate=1 #2160

alygin opened this issue May 28, 2022 · 2 comments

Comments

@alygin
Copy link

alygin commented May 28, 2022

To reproduce:

cargo init miri-test
cd miri-test
echo "#[test] fn test() {}" >> src/main.rs
MIRIFLAGS="-Zmiri-compare-exchange-weak-failure-rate=1" cargo miri test

The process hangs on "Running unittests src/main.rs...", without actually running the test.

It works fine with any other valid value of miri-compare-exchange-weak-failure-rate.
The problem is not reproducible with the nightly-2022-05-22 toolchain.

@RalfJung
Copy link
Member

Thanks for the report!

Setting the failure rate to 1 means it always fails, as it says in the docs. It is expected then that programs hang, since their weak compare exchanges never succeed, so they never can make progress.

We recently fixed a bug here with #2105; that's why you did not see this behavior before.

@RalfJung RalfJung mentioned this issue May 28, 2022
@alygin
Copy link
Author

alygin commented May 28, 2022

Oh, that makes sence, thanks, @RalfJung!

bors added a commit that referenced this issue May 29, 2022
rustup

Locally tests pass but rustc CI says they fail, let's see what happens...

Also clarify docs of cmpxchg_weak_failure_rate (Cc #2160).
bors added a commit that referenced this issue May 29, 2022
rustup

Locally tests pass but rustc CI says they fail, let's see what happens...

Also clarify docs of cmpxchg_weak_failure_rate (Cc #2160).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants