-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
ALL
-
Sharding 5 06/26/16
If terminate is called from within the terminate handler, as can happen in some runtimes when trying to deduce the runtime type of an active exception within myTerminate, the re-entered invocation of myTerminate deadlocks on the streamMutex.
The fix is to make myTerminate immediately call quickExit when it is re-entered in the same thread. We want to keep the existing behavior that other threads simultaneously entering myTerminate block indefinitely on the stream mutex, so that the first caller of terminate gets ample time to write messages to the logs.