-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Service Arch 2023-12-11
-
162
Both OperationIdManager and LatchAnalyzer, which are both ServiceContext decorations, have related client decorations, ClientState and LatchSetState. When we destroy a client object and are destroying all of its decorations, we do two things in an undefined order:
- We destroy the LatchSetState decoration on the Client
- We destroy the OperationIdManager::ClientState decoration, during which we acquire a mutex on the OperationIdManager, which triggers the LatchAnalyzer to be run for that mutex. However, if the LatchSetState has already been destroyed on the Client, then we when encounter undefined behavior, and the program aborts.
We can fix this by making the OperationIdManager use a stdx::mutex, to avoid triggering the LatchAnalyzer.