-
Notifications
You must be signed in to change notification settings - Fork 225
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
fsevent hangs on Mac during shutdown #208
Comments
|
I'm thinking this is likely because of #118. The original race was that the fsevent loop wasn't yet running, so ending it wasn't doing anything. The workaround was therefore to wait until it tells us it's waiting. Here, the loop is running (probably, given how this happens), but at the point of dropping, the fsevent loop isn't waiting for an event, so we yield until it does, but it's shutting down, so we're never going to get there. #118 had a better solution: to use loop observers. Unfortunately I'm not a mac developer and don't really know how best to use those for this purpose. My guess is: At startup:
To stop the loop:
This has no infinite wait loops, so no hangs and no 100% CPU usage. I think it covers
This isn't especially hard to implement, so I can do that fairly soon. However, beforehand I'd want some kind of review of the above (or someone to say this is ridiculous and '''[[[this]]] is how to do that''') by a Rust developer familiar with CFRunLoop and mac programming (or a mac developer familiar with Rust, whichever). If you know someone... ;) Pinging @cmyr in case they can take a look |
#210 is merged and fixes at least several deadlocks that also happens on linux, so my take would be to release a new version and see whether this resolves it ? |
4.0.14 is released, I'd appreciate feedback if this fixes the problem (or others..) as I can't test it on mac |
System details
rustc --version
:rustc 1.38.0-nightly (07e0c3651 2019-07-16)
Hi! Users report that rust-analyzer sometimes hangs during shutdown. The stack trace points to this code:
https://github.com/passcod/notify/blob/2b1f1d4d1acc8b9738ffbe41bfe6043ba37f9431/src/fsevent.rs#L109-L111
Downstream issue (with captured stack trace): rust-lang/rust-analyzer#1541
cc @killercup
The text was updated successfully, but these errors were encountered: