-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 in TestUtilities.TestEventListener #101493
Fix deadlock in TestUtilities.TestEventListener #101493
Conversation
Tagging subscribers to this area: @dotnet/ncl |
{ | ||
EnableEvents(eventSource, EventLevel.LogAlways); | ||
} | ||
// Second pass called after our ctor, allow logging for specified source names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do a second pass now, do we? You've removed the OnEventSourceCreated
call...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see from the callstack above, scratch that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch
I hit this surprisingly often and mistook it for test hang. From a dotnet dump
Simply not holding the
lock (this)
for so long should be enough.