-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
Fully Compatible
-
ALL
-
Programmability 2024-11-25
-
200
LogRotateSignalTest starts a detached signalProcessingThread that is never cleaned up. It is possible for the signalProcessingThread to be in logging when DEATH_TEST's fork() is called. This is bad because the signalProcessingThread could be holding a global RamLog mutex. Because fork will only duplicate the image of the calling thread (other threads like signalProcessingThread not copied), the global RamLog mutex will be held forever by nothing.
Possible fixes:
1) Assert on log existence at the end of the test - make sure the last log that should appear is asserted on so that when a new test starts, we know signalProcessingThread isn't doing anything. A similar effect could be achieved if kNeedToRotateLogFile is not passed into the signal processing thread.
2) Find ways around signalProcessingThread cleanup. Maybe a death test could be used so that the signalProcessing thread could be started and ended by the creation and death of a child process.
3) Make signalProcessingThread attached so that we could join the thread on shutdown. The server currently starts this thread as detached. We would also need to add functionality for a thread stop in one of the while(true) loops.