-
Notifications
You must be signed in to change notification settings - Fork 5k
Deadlock on EventSource.EventListenersLock between EventPipeEventDispatcher.StopDispatchTask() and EventSource.Initialize() #86838
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
Comments
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsDescriptionI have encountered a deadlock on The thread holding the lock is in
Reproduction StepsI do not have an easy way to consistently reproduce the issue but I have a process dump of the deadlocked state, if it helps. Expected behaviorNo deadlocks when doing EventSource related opterations (in this case when accessing Actual behaviorDeadlock occurs. Regression?No response Known WorkaroundsNo response ConfigurationWindows 11 x64. Reproduced both with .NET 7 and .NET 8 preview 3. Other informationI have a process memory dump, if it helps. Ping me on Teams (sasaares).
|
Thanks for reporting this, @sandersaares. I was hoping to get to this sooner but it will be at least another two weeks before I will have a fix. I am still hoping to get a fix in for 8. |
Uh oh!
There was an error while loading. Please reload this page.
Description
I have encountered a deadlock on
EventSource.EventListenersLock
.The thread holding the lock is in
EventPipeEventDispatcher.StopDispatchTask()
doingm_dispatchTask.Wait()
:m_dispatchTask
is meanwhile busy dispatching events and one of these dispatches has triggered code that wants to take the same lock:Reproduction Steps
I do not have an easy way to consistently reproduce the issue but I have a process dump of the deadlocked state, if it helps.
Expected behavior
No deadlocks when doing EventSource related opterations (in this case when accessing
Activity.Current
, which appears to use EventSource internally, though the expectation is general for all EventSource related operations).Actual behavior
Deadlock occurs.
Regression?
No response
Known Workarounds
No response
Configuration
Windows 11 x64.
Reproduced both with .NET 7 and .NET 8 preview 3.
Other information
I have a process memory dump, if it helps. Ping me on Teams (sasaares).
The text was updated successfully, but these errors were encountered: