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

rt: deadlock when shutting down the runtime #3869

Closed
carllerche opened this issue Jun 18, 2021 · 1 comment
Closed

rt: deadlock when shutting down the runtime #3869

carllerche opened this issue Jun 18, 2021 · 1 comment
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-runtime Module: tokio/runtime

Comments

@carllerche
Copy link
Member

Originally reported here. Tokio shouldn't be calling shutdown here for tasks that are already on the runtime.

@carllerche carllerche added C-bug Category: This is a bug. A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Jun 18, 2021
carllerche added a commit that referenced this issue Jun 18, 2021
Tokio 1.7.0 introduced a change intended to eagerly shutdown newly
spawned tasks if the runtime is in the process of shutting down.
However, it introduced a bug where already spawned tasks could be
shutdown too early, resulting in the potential introduction of deadlocks
if tasks acquired mutexes in drop handlers.

Fixes #3869
carllerche added a commit that referenced this issue Jun 18, 2021
Tokio 1.7.0 introduced a change intended to eagerly shutdown newly
spawned tasks if the runtime is in the process of shutting down.
However, it introduced a bug where already spawned tasks could be
shutdown too early, resulting in the potential introduction of deadlocks
if tasks acquired mutexes in drop handlers.

Fixes #3869
carllerche added a commit that referenced this issue Jun 18, 2021
Tokio 1.7.0 introduced a change intended to eagerly shutdown newly
spawned tasks if the runtime is in the process of shutting down.
However, it introduced a bug where already spawned tasks could be
shutdown too early, resulting in the potential introduction of deadlocks
if tasks acquired mutexes in drop handlers.

Fixes #3869
@Darksonn
Copy link
Contributor

Fixed by #3870.

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-bug Category: This is a bug. M-runtime Module: tokio/runtime
Projects
None yet
Development

No branches or pull requests

3 participants
@carllerche @Darksonn and others