Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Service Watchdog Race Condition Possible?

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 449 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      demux
      last edited by

      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.)

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.