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

Panic at linked_list.rs #5782

Closed
simon-fu opened this issue Jun 9, 2023 · 6 comments
Closed

Panic at linked_list.rs #5782

simon-fu opened this issue Jun 9, 2023 · 6 comments
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug.

Comments

@simon-fu
Copy link

simon-fu commented Jun 9, 2023

Version
List the versions of all tokio crates you are using. The easiest way to get
this information is using cargo 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/Linux

Description

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]

@simon-fu simon-fu added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Jun 9, 2023
@Darksonn
Copy link
Contributor

Darksonn commented Jun 9, 2023

Would you be able to provide more information?

@simon-fu
Copy link
Author

It panics after running a service in production environment for several weeks.

@Darksonn
Copy link
Contributor

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.

@Darksonn
Copy link
Contributor

Closing due to lack of info.

@Darksonn Darksonn closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2023
@chroche
Copy link

chroche commented May 27, 2024

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

@Darksonn
Copy link
Contributor

Please open a new issue.

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.
Projects
None yet
Development

No branches or pull requests

3 participants