Skip to content
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

time: fix panic on multithreaded runtime shutdown #3226

Closed
wants to merge 1 commit into from

Conversation

bdonlan
Copy link
Contributor

@bdonlan bdonlan commented Dec 7, 2020

All core threads share the same park, and invoke park() followed by shutdown -
in parallel. This is quite possibly a bug in the worker (in that it invokes
shutdown when it's not done with the parker), but for now work around it by
bypassing the timer parker once shutdown is called.

Fixes: #2789

Motivation

Solution

All core threads share the same park, and invoke park() followed by shutdown -
in parallel.  This is quite possibly a bug in the worker (in that it invokes
shutdown when it's not done with the parker), but for now work around it by
bypassing the timer parker once shutdown is called.

Fixes: tokio-rs#2789
@bdonlan bdonlan requested a review from carllerche December 7, 2020 19:26
@Darksonn Darksonn added A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-runtime Module: tokio/runtime labels Dec 7, 2020
@bdonlan
Copy link
Contributor Author

bdonlan commented Dec 7, 2020

Upon further investigation, this is a bug/deadlock in the MT runtime itself. Withdrawing this PR.

@bdonlan bdonlan closed this Dec 7, 2020
@carllerche
Copy link
Member

carllerche commented Dec 8, 2020

#3228 take precedence over this.

@bdonlan bdonlan deleted the timer-bug branch December 8, 2020 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-runtime Module: tokio/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic with tokio::time on shutdown
4 participants