Actions:
|
2008-04-16 14:03 AEST by Arthur Barrett - Kill server process if it is hung.
We get occasional reports of cvs server processes (particularly on windows)
being hung - either at 100% cpu, or 0% cpu.
Ideally we want to work out 'why' this is happening, but a 'kludge workaround'
is to have a supervisor thread that is initiated when the server starts and
closed at the end. A semaphore/mailbox/shared memory block can be set up by
the two threads to communicate (eg: every time the server thread allocates
memory/operates on a file it can reset the semaphore).
If the supervisor thread finds that the server thread has not reset the
semaphore for a long period of time (to be set by the user, but 5 minutes
should be enough really) then the supervisor can crash/stop the process. |