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

rt: skip defer queue in block_in_place context #7216

Merged
merged 4 commits into from
Mar 13, 2025
Merged

Conversation

carllerche
Copy link
Member

The defer queue is not drained while in a block_in_place context. Pushing tasks to the defer
queue in this state could lead to a deadlock.

Fixes: #7209, #7210

@github-actions github-actions bot added the R-loom-multi-thread Run loom multi-thread tests on this PR label Mar 12, 2025
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime M-coop Module: tokio/coop labels Mar 12, 2025
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM.

carllerche and others added 3 commits March 12, 2025 11:46
The defer queue is not drained while in a `block_in_place` context. Pushing
tasks to the defer queue in this state could lead to a deadlock.
@carllerche carllerche changed the base branch from master to tokio-1.44.x March 12, 2025 18:47
@Darksonn Darksonn merged commit addbfb9 into tokio-1.44.x Mar 13, 2025
81 checks passed
@Darksonn Darksonn deleted the fix-7210 branch March 13, 2025 07:18
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request Mar 13, 2025
Bumps tokio from 1.44.0 to 1.44.1.

Release notes
Sourced from tokio's releases.

Tokio v1.44.1
1.44.1 (March 13th, 2025)
Fixed

rt: skip defer queue in block_in_place context (#7216)

#7216: tokio-rs/tokio#7216



Commits

d413c9c chore: prepare Tokio v1.44.1 (#7217)
addbfb9 rt: skip defer queue in block_in_place context (#7216)
See full diff in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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 M-coop Module: tokio/coop M-runtime Module: tokio/runtime R-loom-multi-thread Run loom multi-thread tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling lock().await on tokio::sync::Mutex gets stuck after locking it 128 times in a loop
2 participants