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

Awaiting Read and Write Half concurrently causes spin lock. #6396

Closed
Frostie314159 opened this issue Mar 13, 2024 · 1 comment · Fixed by #6403
Closed

Awaiting Read and Write Half concurrently causes spin lock. #6396

Frostie314159 opened this issue Mar 13, 2024 · 1 comment · Fixed by #6403
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-io Module: tokio/io

Comments

@Frostie314159
Copy link

Version

│       └── tokio-io v0.1.13
│   └── tokio v1.36.0
│       └── tokio-macros v2.2.0 (proc-macro)
│   └── tokio v1.36.0 (*)
└── tokio v1.36.0 (*)
└── tokio v1.36.0 (*)

Platform
Linux simon-framework 6.1.80-1-MANJARO #1 SMP PREEMPT_DYNAMIC Fri Mar 1 18:09:53 UTC 2024 x86_64 GNU/Linux

Description
When using the split function and awaiting both the read and write half concurrently, a spin lock is triggered, which causes cpu usage to skyrocket. This is actually noted in the code at tokio/io/split.rs.

@Frostie314159 Frostie314159 added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Mar 13, 2024
@Darksonn Darksonn added the M-io Module: tokio/io label Mar 13, 2024
@Darksonn
Copy link
Contributor

Thank you for the issue. We should probably fix the spinlock, I agree.

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-io Module: tokio/io
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants