-
Notifications
You must be signed in to change notification settings - Fork 48
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
Stop ignoring miri leaks #82
Conversation
Codecov Report
|
@domenicquirl err, got a spurious |
Oh noes! The location of the error in the Linux build you linked looks indeed like it could be a tree test. However, I see you have disabled the concurrent one if miri is active, so it would have to be a single-threaded one. The miri task fails in the Either way, I've just had |
@domenicquirl The error actually occurred in the normal test suite, not the miri one, so could still be the concurrent tree test. The failure was on nightly Linux, so I'll try running it in a loop on my computer too. Looks like miri still thinks there is a leak. I think until |
@domenicquirl managed to reproduce the failed test here: #83 |
Yeah, it looks like every defer inside crossbeam gets tagged as a leak. I guess at least miri did not detect any additional leaks (where we forget to |
Hmm, it looks like currently we get stuck on tkaitchuck/aHash#32, so we need to wait for a resolution to that. I wonder how miri stopped working so completely without us noticing? |
It did run successfully in #79, which is not that old... |
I think it may actually have failed to run, maybe due to some incorrect arguments? Because its log output is empty... |
Now that rust-lang/miri#940 has been fixed, and has landed in nightly (rust-lang/rust#70897), we should be able to run miri with leak check enabled again!
as it should be ?
Let's wait until crossbeam is reported to be leak-free on its own.
@RalfJung Something weird is going on here now. If I try to run the miri tests, it seems to get stuck somewhere when running the tests. Unfortunately, I cannot pass $ cargo +nightly miri test --test basic_ref runs the $ cargo +nightly miri test hasher
error: Found argument 'hasher' which wasn't expected, or isn't valid in this context
USAGE:
cargo check --lib --profile <PROFILE-NAME>
For more information try --help Is there a good other way for me to figure out which test is hanging? |
Maybe the arguments get sent to the wrong program? Quoting from the docs:
I never used |
Oh also when concurrency is involved and things get stuck, maybe you are running into rust-lang/miri#1388. |
This is a test suite argument, right? Miri doesn't do anything there, so probably that is also just a case of not enough One issue is that unfortunately cargo line-buffers Miri's output, so while a test runs we cannot yet see its name. I don't know how to make cargo not do that -- cargo thinks it is running rustc when it actually runs Miri, so line-buffering makes sense for it. I don't know any other way to hook into cargo than overwriting the One thing I sometimes do is to run
Then I copy-paste that into the shell to run Miri without cargo buffering it. (No env vars should be needed.) |
Hmm, interesting: $ cargo +nightly miri test -- --test basic_ref
Checking flurry v0.3.0 (/home/jon/dev/streams/flurry)
error: Option 'test' given more than once
error: could not compile `flurry`.
$ cargo +nightly miri test -- hasher
Checking flurry v0.3.0 (/home/jon/dev/streams/flurry)
error: multiple input filenames provided (first two filenames are `src/lib.rs` and `hasher`)
error: could not compile `flurry`.
To learn more, run the command again with --verbose. I think there's definitely something funky going on there. I also tried $ cargo +nightly miri test -- -- --test basic_ref But that just ran all the test targets (but no tests within each target), making it seem like it was treated as a filtering argument? This seems to be supported by |
Your point about how to avoid buffering seems to have worked. I wonder how this normally works when you run |
I don't know which binary you want to pass
Then cargo knows it's running a user binary and doesn't do buffering. But with |
As for |
So
Well it still affects whether the test runner itself captures and buffers stdout of the test methods (and suppresses it AFAIK for passing tests). |
Yup, it's a thing, and a fairly handy one at that! I'll move the discussion to that issue, as it seems exactly appropriate. |
Now that rust-lang/miri#940 has been fixed,
and has landed in nightly
(rust-lang/rust#70897), we should be able to run
miri with leak check enabled again!
This change is