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
We have found a deadlock with 2 threads trying to resolve 2 components (c1 and c2) implementing 2 separate generic interfaces, but then component c1 has a dependency which is in turn dependent on component c2.
In terms of code it happens because of following:
Imagine thread t1 accessing DefaultNamingSubsystem.GetHandlers() via DefaultGenericHandler.GetSubHandler (this locks type2SubHandler in that class). Another thread t2, accesses the same DefaultNamingSubsystem.GetHandlers() from Resolve(), acquires upgradable lock, and then in GetHandlersNoLock routine calls Supports(service) on the same DefaultGenericHandler (this will require access to type2SubHandler which is already held by thread t1). Thread t1 in the mean time awaits upgradable read lock from thread t2. Deadlock
This issue was found in 3.2 and confirmed in latest 3.2.1 (which means fix to IOC-370 didn't resolve this specific case).
The text was updated successfully, but these errors were encountered:
We have found a deadlock with 2 threads trying to resolve 2 components (c1 and c2) implementing 2 separate generic interfaces, but then component c1 has a dependency which is in turn dependent on component c2.
In terms of code it happens because of following:
Imagine thread t1 accessing DefaultNamingSubsystem.GetHandlers() via DefaultGenericHandler.GetSubHandler (this locks type2SubHandler in that class). Another thread t2, accesses the same DefaultNamingSubsystem.GetHandlers() from Resolve(), acquires upgradable lock, and then in GetHandlersNoLock routine calls Supports(service) on the same DefaultGenericHandler (this will require access to type2SubHandler which is already held by thread t1). Thread t1 in the mean time awaits upgradable read lock from thread t2. Deadlock
This issue was found in 3.2 and confirmed in latest 3.2.1 (which means fix to IOC-370 didn't resolve this specific case).
The text was updated successfully, but these errors were encountered: