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

Notify the debugger of a cross-thread dependency in Lock #101501

Merged
merged 2 commits into from
May 2, 2024

Conversation

kouvel
Copy link
Member

@kouvel kouvel commented Apr 24, 2024

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.
@kouvel kouvel added this to the 9.0.0 milestone Apr 24, 2024
@kouvel kouvel requested a review from noahfalk April 24, 2024 16:55
@kouvel kouvel self-assigned this Apr 24, 2024
Copy link
Contributor

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

@kouvel
Copy link
Member Author

kouvel commented Apr 24, 2024

CC @tommcdon. I tried testing this locally and wasn't seeing an early abort, may be due to a different issue. Anyway based on the intent I believe this should enable an early abort.

@kouvel
Copy link
Member Author

kouvel commented Apr 24, 2024

With a small change to testing, I was able to verify that this works to enable quick-abort of a FuncEval when it attempts to acquire a contented lock. Thanks @tommcdon!

Copy link
Member

@tommcdon tommcdon left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kouvel kouvel merged commit 71e9c46 into dotnet:main May 2, 2024
145 of 150 checks passed
@kouvel kouvel deleted the LockFuncEvalFix branch May 2, 2024 16:51
michaelgsharp pushed a commit to michaelgsharp/runtime that referenced this pull request May 9, 2024
* Notify the debugger of a cross-thread dependency in Lock

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.
@kouvel kouvel mentioned this pull request May 14, 2024
8 tasks
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* Notify the debugger of a cross-thread dependency in Lock

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 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.

2 participants