Skip to content

Conversation

@kouvel
Copy link
Contributor

@kouvel kouvel commented Oct 20, 2022

A race condition when the object header is transitioning to a sync block can cause a concurrent recursive TryEnter to return false.

Fixes #76660

A race condition when the object header is transitioning to a sync block can cause a concurrent recursive `TryEnter` to return false.

Fixes #76660
@kouvel kouvel added this to the 8.0.0 milestone Oct 20, 2022
@kouvel kouvel requested review from eduardo-vp and mangod9 October 20, 2022 02:05
@kouvel kouvel self-assigned this Oct 20, 2022
@ghost
Copy link

ghost commented Oct 20, 2022

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

Issue Details

A race condition when the object header is transitioning to a sync block can cause a concurrent recursive TryEnter to return false.

Fixes #76660

Author: kouvel
Assignees: kouvel
Labels:

area-System.Threading

Milestone: 8.0.0

@kouvel kouvel changed the title Fix recurisve Monitor.TryEnter to not return false due to a condition Fix recurisve Monitor.TryEnter to not return false due to a race condition Oct 20, 2022
@EgorBo
Copy link
Member

EgorBo commented Oct 20, 2022

Worth backporting to .NET 7.0?

@kouvel
Copy link
Contributor Author

kouvel commented Oct 20, 2022

I don't see a compelling reason for backporting it yet.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 20, 2022
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.

Monitor.TryEnter sometimes fails even if Monitor.IsEntered returns true

4 participants