Service Watchdog Race Condition Possible?
-
I have been running service watchdog without any problems for a long time now.
But now I would like to ask.When restarting pfSense service watchdog comes up telling me that <1 to many> services are not running.
I understand this - the machine is coming up...
But it also says that it will restart all mentioned services.
Yes, I understand...But is there a possibility that race conditions can occur if the same service is starting twice at the same time? (One instance by system start and one by service watchdog.)
-
The service watchdog package is not smart. It only knows to run on a timer from cron, and it only knows to see if a process is running or not.
So yes, race conditions are easily possible. Not just at boot but also during any deliberate stop/restart of a service, package ugprades, etc.