You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requesting a task dump can deadlock. When a task dump is requested, OwnedTasks is locked and iterated over, which each task being polled.
Tasks are polled in 'tracing mode', causing most tokio leaf futures to produce Poll::Pending, even if they are otherwise ready. However, if a non-tokio or non-instrumented leaf future is used and completes during tracing, the system will deadlock: completed futures are removed from OwnedTasks and doing so requires locking OwnedTasks (which can't happen, because it's already locked for tracing).
The text was updated successfully, but these errors were encountered:
If a polled tasks completes while `OwnedTasks` is locked, it will
not be able to remove itself from `OwnedTasks`, resulting in a
deadlock.
Fixestokio-rs#6035.
jswrenn
added a commit
to jswrenn/tokio
that referenced
this issue
Sep 27, 2023
If a polled tasks completes while `OwnedTasks` is locked, it will
not be able to remove itself from `OwnedTasks`, resulting in a
deadlock.
Fixestokio-rs#6035.
If a polled tasks completes while `OwnedTasks` is locked, it will
not be able to remove itself from `OwnedTasks`, resulting in a
deadlock.
Fixestokio-rs#6035.
Requesting a task dump can deadlock. When a task dump is requested,
OwnedTasks
is locked and iterated over, which each task being polled.Tasks are polled in 'tracing mode', causing most tokio leaf futures to produce
Poll::Pending
, even if they are otherwise ready. However, if a non-tokio or non-instrumented leaf future is used and completes during tracing, the system will deadlock: completed futures are removed fromOwnedTasks
and doing so requires lockingOwnedTasks
(which can't happen, because it's already locked for tracing).The text was updated successfully, but these errors were encountered: