JabbR/JabbR — pull request #1213 by richardszalay (2014-12-22 01:41:19+00:00)
Title: Fixed deadlock race condition by locking access around non-threadsafe method ResourceManager.GetResourceSet

We were running into a sporadic deadlock-on-startup issue in production (IIS 8 / Windows Server 2012 R2) and, after analysing the issue offline via WinDBG, traced it back to a race condition within ResourceManager.GetResourceSet as it was used in HomeModule.BuildClientResources().

The ResourceManager.GetResourceSet documentation definitely specifies it as "non threadsafe", but we have multiple localised LanguageResources which may explain why it hasn't been spotted on jabbr.net.

As a solution, we've added a lock (w/ cache) around access to it. We've not had the deadlock issue since we pushed the change.