You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventListener and TplEventSource with managed threadpool doesn't seem to play nicely together.
When an EventListener tries to enable TplEventSource while TplEventSource is being created, it's possible for that to deadlock with EventListnersLock + a lock within the runtime / user-defined lock in EventListener instance.
For example, a thread can try to initialize TplEventSource (which tries to grab the EventListener lock in EventSource ctor) while holding the AppDomain class init lock while another thread that's enabling EventListener for TplEventSource tries to start the Task for dispatching the events to EventListeners which then tries to get the AppDomain class init lock while holding the EventListener lock.
An example of this can be seen in the callstack below:
EventListener and TplEventSource with managed threadpool doesn't seem to play nicely together.
When an EventListener tries to enable TplEventSource while TplEventSource is being created, it's possible for that to deadlock with EventListnersLock + a lock within the runtime / user-defined lock in EventListener instance.
For example, a thread can try to initialize TplEventSource (which tries to grab the EventListener lock in EventSource ctor) while holding the AppDomain class init lock while another thread that's enabling EventListener for TplEventSource tries to start the Task for dispatching the events to EventListeners which then tries to get the AppDomain class init lock while holding the EventListener lock.
An example of this can be seen in the callstack below:
Thread 1:
Thread 2:
The text was updated successfully, but these errors were encountered: