November Happy Hour will be moved to Thursday December 5th.

Site hangs because of thread deadlock

Found in

EPiServer.CMS.UI 11.32.0

Fixed in

EPiServer.CMS.UI 11.35.1

(Or a related package)

Created

Apr 12, 2021

Updated

Jun 14, 2021

Area

CMS UI

State

Closed, Fixed and tested


Description

In CMS UI 11.32.0, ITelemetryProvider was introduced. The internal implementation CmsTelemetryProvider causes sites to hang occasionally.

StructureMap is used to get an instance of the CmsTelemetryProvider. While StructureMap instanciates it, it holds a writer lock, blocking other threads from getting instances from StructureMap's service container. In CmsTelemetryProvider ctor, Parallel.ForEach is used to find and load modules (ThreadA). If any of those modules needs StructureMap to get an instance (ThreadB), they will deadlock with the Parallel.ForEach thread.