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

app stuck dropping tokio::runtime::runtime::Runtime #6609

Closed
DaKnig opened this issue Jun 3, 2024 · 1 comment
Closed

app stuck dropping tokio::runtime::runtime::Runtime #6609

DaKnig opened this issue Jun 3, 2024 · 1 comment
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-task Module: tokio/task

Comments

@DaKnig
Copy link

DaKnig commented Jun 3, 2024

Version

~/prog/dewduct $ cargo tree | grep tokio
├── tokio v1.37.0
│ └── tokio-macros v2.2.0 (proc-macro)

Platform

Linux angrymob 6.9.0 #1-postmarketos-allwinner SMP PREEMPT aarch64 Linux

Description

I am using tokio::task::spawn_blocking in a few places and have a #[tokio::main].

When the program finishes, it is stuck dropping the Runtime.

Debugger shows this backtrace:

#0  0x0000ffff8ec02a40 in __syscall6
    (f=<optimized out>, e=<optimized out>, d=<optimized out>, c=<optimized out>, b=<optimized out>, a=<optimized out>, n=98) at ./arch/aarch64/syscall_arch.h:71
#1  syscall (n=98) at src/misc/syscall.c:20
#2  0x0000aaaadfb4d330 in std::sys::sync::condvar::futex::Condvar::wait ()
#3  0x0000aaaadf7985e0 in std::sync::condvar::Condvar::wait<()>
    (self=0xffff8bfdae40, guard=...)
    at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sync/condvar.rs:189
#4  0x0000aaaadf7c7854 in tokio::runtime::park::Inner::park (self=0xffff8bfdae30)
    at src/runtime/park.rs:116
#5  0x0000aaaadf7c8208 in tokio::runtime::park::{impl#4}::park::{closure#0}
    (park_thread=0xffff8ec7b170) at src/runtime/park.rs:254
#6  0x0000aaaadf7c83e0 in tokio::runtime::park::{impl#4}::with_current::{closure#0}<tokio::runtime::park::{impl#4}::park::{closure_env#0}, ()> (inner=0xffff8ec7b170)
    at src/runtime/park.rs:268
#7  0x0000aaaadf7d2d94 in std::thread::local::LocalKey<tokio::runtime::park::ParkThread>::try_with<tokio::runtime::park::ParkThread, tokio::runtime::park::{impl#4}::with_current::{closure_env#0}<tokio::runtime::park::{impl#4}::park::{closure_env#0}, ()>, ()> (self=0xaaaadfd7d108, f=...)
    at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/thread/local.rs:284
#8  0x0000aaaadf7c8324 in tokio::runtime::park::CachedParkThread::with_current<tokio::runtime::park::{impl#4}::park::{closure_env#0}, ()> (self=0xffffff5d6c5e, f=...)
    at src/runtime/park.rs:268
#9  0x0000aaaadf7c8180 in tokio::runtime::park::CachedParkThread::park
    (self=0xffffff5d6c5e) at src/runtime/park.rs:254
#10 0x0000aaaadf7c8760 in tokio::runtime::park::CachedParkThread::block_on<&mut tokio::sync::oneshot::Receiver<()>> (self=0xffffff5d6c5e, f=0xffffff5d70d0)
    at src/runtime/park.rs:285

every time I look at it its stuck in roughly the same: awaiting something like a futex...

@DaKnig DaKnig added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Jun 3, 2024
@Darksonn
Copy link
Contributor

Darksonn commented Jun 3, 2024

Tokio is waiting for your spawn_blocking tasks to exit.

@Darksonn Darksonn added the M-task Module: tokio/task label Jun 3, 2024
@Darksonn Darksonn closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
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-task Module: tokio/task
Projects
None yet
Development

No branches or pull requests

2 participants