-
Notifications
You must be signed in to change notification settings - Fork 471
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
Memory leak from crossbeam_epoch::deferred::Deferred::new #464
Comments
Ah, interesting, this seems to be known from spacejam/sled#937 (comment). Not sure if we want to leave this open as an issue? |
I'm not in the loop but wonder: does miri support threads, or is there perhaps a plan to add support for it? That's the main reason why we're not using miri with crossbeam. Although, we could still use miri for single-threaded tests even though that doesn't give us complete test coverage. |
These are probably spurious; see crossbeam-rs/crossbeam#464 and spacejam/sled#937 (comment) And besides, we're now running both the leak sanitizer and the address sanitizer.
No, I don't think it does, which is probably a big part of the issue. Over in spacejam/sled#937 (comment), @divergentdave writes:
So that may very well be the issue, I'm not sure. It's possible to turn off the miri leak checker (with |
I think we can close. :) Thanks for the detailed report! If you run into any issues again or if something fishy appears, feel free to reopen. |
After looking at crossbeam-epoch further, the lack of threads isn't the reason for the leak report, but rather, the closures from Deferred are ultimately owned by 'static variables. (It's a kind of intentional leak. The Deferred objects are in arrays, and they get replaced with placeholders during collection.) Thanks for the pointer about -Zmiri-ignore-leaks, that'll be helpful! |
Yeah I would have been surprised if threads are the reason -- Miri will bail if you try to spawn a thread, so if there was a background thread started somewhere we'd notice (as opposed to silently not running that code).
Looks like you ran into rust-lang/miri#940 then. |
Now that rust-lang/miri#940 has been closed, we should maybe consider enabling the miri leak check in CI again? /cc @jeehoonkang |
Note that rust-lang/rust#70897 has to land before the fix will be available via rustup. |
@jonhoo sure, would you please send a PR after rust-lang/rust#70897 is merged? |
@jeehoonkang that just landed. I'm a little strapped for time at the moment, but if you want to take a stab it should just be a matter of doing these steps:
|
See rust-lang/miri#1318 for the problems we are still having with the leak checker. |
Now that miri supports threads and has the |
I'm trying to run flurry (which uses
crossbeam-epoch
) through miri (after patching in #458), and it seems to be finding a number of memory leaks inJudging from the signature above, I don't think this is a bug in
flurry
, but I could be wrong (the PR is at jonhoo/flurry#37). Has there been an attempt at running thecrossbeam-epoch
test suite through miri following #458? You probably need to be on the very latest nightly since rust-lang/miri#1150 landed only very recently.The text was updated successfully, but these errors were encountered: