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

Fix deadlock when we request a ReJIT due to an inlined method #98400

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

davmason
Copy link
Member

By holding the CodeVersionManager and then calling ReJIT lock we set ourselves up for a deadlock with a ReJIT thread which grabs the ReJIT lock first and then tries to get the CodeVersionManager lock to publish the new IL.

Fixes #97771

@davmason davmason added this to the 9.0.0 milestone Feb 14, 2024
@davmason davmason requested a review from a team February 14, 2024 07:57
@davmason davmason self-assigned this Feb 14, 2024
@ghost
Copy link

ghost commented Feb 14, 2024

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

By holding the CodeVersionManager and then calling ReJIT lock we set ourselves up for a deadlock with a ReJIT thread which grabs the ReJIT lock first and then tries to get the CodeVersionManager lock to publish the new IL.

Fixes #97771

Author: davmason
Assignees: davmason
Labels:

area-Diagnostics-coreclr

Milestone: 9.0.0

src/coreclr/vm/jitinterface.cpp Show resolved Hide resolved
@davmason davmason merged commit 96e5e6e into dotnet:main Feb 15, 2024
108 of 111 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling RequestReJIT in the profiler API can cause a deadlock
4 participants