-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
A possible race condition bug #1946
Comments
Thanks for the report. Which runtime does this happen with? |
I guess which scheduler? Basic or threaded? |
Threaded. |
tokio = { version = "0.2", features = ["rt-threaded", "time", "macros"] } |
Could you provide steps on how to reproduce? |
Don't know for sure, but the original code is linked in the first post. Basically we're spawning hyper requests to the runtime and awaiting the joinhandles afterwards. This error happens maybe once per week and after some hours of fast spawning. I can see tomorrow if I can isolate and reproduce the error... |
Do you know if it happens while the runtime is shutting down (which would be #1853) or some other case? |
I checked the runs and you're right. This happens after the last run, so probably while the runtime is shutting down. |
Thanks, that narrows it down a lot. I suspect that you are correct and it is a similar bug as #1853. Thanks for the insight. |
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
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
Closing as fixed. |
Version
v0.2.4
Platform
Subcrates
Possibly the threaded runtime.
Description
We have a test utility for benchmarks using Hyper 0.13 and Tokio 0.2. Every now and then (rarely, but often enough) the system crashes with error:
The code where this happens is this method.
While browsing old issues, issue #1853 seems quite similar what we're witnessing here.
We've been using tokio 0.2 since early alphas, but the behavior started after the new scheduler was merged.
Hard to repeat due to it happening randomly and after some hours of running the benchmarker.
The text was updated successfully, but these errors were encountered: