Closed simon-fu closed 1 year ago
Would you be able to provide more information?
It panics after running a service in production environment for several weeks.
I looked a bit at the code in question, but I didn't see an issue. It could be many things — it doesn't even have to be a bug in Tokio if there is fault unsafe code elsewhere.
If you have a backtrace, then that would be helpful.
Currently there's not enough information for me to diagnose this, unfortunately.
Closing due to lack of info.
Hi there,
I have managed to write a Rust program that systematically crashes in certain condition (expired AWS access token), although there supposedly is no unsafe code in it whatsoever. The panic message differs from one execution to the other, but seems most often to involve tokio
with errors like
thread 'main' panicked at cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/sync/task/atomic_waker.rs:335:17:
assertion failed: state == REGISTERING || state == REGISTERING | WAKING || state == WAKING
stack backtrace:
0: 0x10fbe5bf5 - std::backtrace_rs::backtrace::libunwind::trace::he87ba3c236c7ad5f
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
or the exact same error as above:
thread 'main' panicked at .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/util/linked_list.rs:130:9:
assertion `left != right` failed
left: Some(0x7f83e2821818)
right: Some(0x7f83e2821818)
stack backtrace:
0: 0x105546bf5 - std::backtrace_rs::backtrace::libunwind::trace::he87ba3c236c7ad5f
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
I'm able to provide backtraces and/or full core dumps if anyone's interested in looking into it (I'm not really familiar with debugging from core dumps).
Thanks. Chris
Please open a new issue.
Version List the versions of all
tokio
crates you are using. The easiest way to get this information is usingcargo tree
subcommand:cargo tree | grep tokio
│ │ │ ├── tokio v1.27.0 │ │ │ │ └── tokio-macros v2.0.0 (proc-macro) │ │ │ ├── tokio-util v0.6.8 │ │ │ │ └── tokio v1.27.0 () │ │ ├── tokio v1.27.0 () │ ├── tokio v1.27.0 () │ ├── tokio-util v0.6.8 () │ │ ├── tokio v1.27.0 () │ │ ├── tokio-util v0.6.8 () │ │ ├── tokio v1.27.0 () │ │ └── tokio-native-tls v0.3.0 │ │ └── tokio v1.27.0 () │ ├── tokio v1.27.0 () │ ├── tokio-native-tls v0.3.0 () ├── tokio v1.27.0 () ├── tokio-stream v0.1.12 │ ├── tokio v1.27.0 () │ └── tokio-util v0.7.7 │ ├── tokio v1.27.0 () ├── tokio-util v0.7.7 () │ ├── tokio v1.27.0 () │ ├── tokio v1.27.0 () │ ├── tokio-util v0.6.8 () ├── tokio v1.27.0 () ├── tokio-retry v0.3.0 │ └── tokio v1.27.0 () ├── tokio-rustls v0.24.0 │ └── tokio v1.27.0 () ├── tokio-stream v0.1.12 () ├── tokio-util v0.7.7 () │ ├── tokio v1.27.0 () │ ├── tokio-stream v0.1.12 () │ └── tokio-util v0.6.8 () │ ├── tokio v1.27.0 () ├── tokio v1.27.0 () ├── tokio-rustls v0.24.0 () ├── tokio-stream v0.1.12 () ├── tokio-util v0.7.7 () │ └── tokio v1.27.0 () ├── tokio v1.27.0 () ├── tokio-stream v0.1.12 () ├── tokio-util v0.7.7 ()Platform The output of
uname -a
(UNIX), or version and 32 or 64-bit (Windows) Linux ecs-734a-0706193 4.15.0-204-generic #215-Ubuntu SMP Fri Jan 20 18:24:59 UTC 2023 x86_64 x86_64 x86_64 GNU/LinuxDescription
06-08 01:56:21.605 E panic: [panicked at 'assertion failed:
(left != right)
left:Some(0x7f5608014ea8)
, right:Some(0x7f5608014ea8)
', /home/ee/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/tokio-1.27.0/src/util/linked_list.rs:130:9][short summary of the bug]
I tried this code:
[code sample that causes the bug]
I expected to see this happen: [explanation]
Instead, this happened: [explanation]