This repository has been archived by the owner on Dec 28, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
licq: Drop log messages instead of deadlocking
If something starts flooding log messages faster than a sink can process them, the pipe in PluginLogSink will fill up and cause the sender to block. The pipe is written while mutexes are held, this will cause a deadlock as the log sinks need to take the same mutex to read the pipe. This deadlock could also be resolved by releasing the mutex in PluginLogSink before accessing the pipe. However, the caller (LogDistributor) also has a mutex for all the sinks which could also deadlock if another source tries to log something at the same time, and even if that is solved the second source would just hang on writing to the pipe.
- Loading branch information
Showing
3 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters