-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Random panic behaviour in Windows after CTRL+C has been handled #1970
Labels
C-bug
Category: This is a bug.
Comments
This seems like it could be the same issue as #1946? |
Oh, this happened with the single threaded runtime, forgot to tell. |
Thanks for the repro. I am able to reproduce but only w/ the threaded runtime and only on windows. |
carllerche
added a commit
that referenced
this issue
Dec 17, 2019
The blocking task queue was not explicitly drained as part of the blocking pool shutdown logic. It was originally assumed that the contents of the queue would be dropped when the blocking pool structure is dropped. However, tasks must be explictly shutdown, so we must drain the queue can call `shutdown` on each task. Fixes #1970, #1946
This was referenced Dec 17, 2019
carllerche
added a commit
that referenced
this issue
Dec 18, 2019
The blocking task queue was not explicitly drained as part of the blocking pool shutdown logic. It was originally assumed that the contents of the queue would be dropped when the blocking pool structure is dropped. However, tasks must be explicitly shutdown, so we must drain the queue can call `shutdown` on each task. Fixes #1970, #1946
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
tokio = { version = "0.2", features = ["signal", "time", "fs", "rt-core", "io-util"] }
Platform
Windows 7 64 bit
Description
This simple program sometimes causes a panic after it received the CTRL+C signal, happens around 1 out of 5 times.
Based on the output of the program, it seems that the signal future completes successfully without problems, as the
println!
from line 31 gets executed, but the file isn't being written by the callwrite_to_file
right after it.This is the code:
https://gist.github.com/mgostIH/5bb82b84c5113caf5e717f81eb0fced4
I expected the code to run deterministically, as sometimes it actually works and perfectly handles the signal.
Instead, sometimes it panics outputting this on
RUST_BACKTRACE=full
:The text was updated successfully, but these errors were encountered: