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
Investigate improving synchronization mechanism between BaseTraceService/JsonTraceService and MessageLogHandler.
Currently, the synchronization mechanism is to lock on an shared object between the BaseTraceService/JsonTraceService and MessageLogHandler.
A synchronization mechanism is needed to avoid a deadlock that can occur between the two classes. This deadlock occurs when trace is set to *=all and occurs quickly during server start up.
The deadlock occurs due to the synchronized methods of FileLogHolder and a (previously) synchronized method synchronousWrite in MessageLogHandler which makes calls to FileLogHolder. Under a high trace volume, the synchronousWrite frequently locks (lock 1) on the calling thread. When a server configuration update is called, certain update logic is made to FileLogHolder through a separate thread (lock 2). This lock prevents any other threads that are trying to write via MessageLogHandler. Further into the update stack, a tracing event is emitted and is stuck waiting for lock 1 to unlock.
The text was updated successfully, but these errors were encountered:
Investigate improving synchronization mechanism between BaseTraceService/JsonTraceService and MessageLogHandler.
Currently, the synchronization mechanism is to lock on an shared object between the BaseTraceService/JsonTraceService and MessageLogHandler.
A synchronization mechanism is needed to avoid a deadlock that can occur between the two classes. This deadlock occurs when trace is set to *=all and occurs quickly during server start up.
The deadlock occurs due to the synchronized methods of FileLogHolder and a (previously) synchronized method synchronousWrite in MessageLogHandler which makes calls to FileLogHolder. Under a high trace volume, the synchronousWrite frequently locks (lock 1) on the calling thread. When a server configuration update is called, certain update logic is made to FileLogHolder through a separate thread (lock 2). This lock prevents any other threads that are trying to write via MessageLogHandler. Further into the update stack, a tracing event is emitted and is stuck waiting for lock 1 to unlock.
The text was updated successfully, but these errors were encountered: