Subject: bug#41429: Shepherd Sometimes Crashes

From: Katherine Cox-Buday <[email-masked]>
Date: Thu, 21 May 2020 10:59:43 -0500

Efraim Flashner <[email-masked]> writes:

>> Your comment is kind of scary though! Shepherd is the thing I want to
>> stay up no matter what since it's responsible for monitoring and
>> restarting things. The idea that a misbehaving or poorly written service
>> could bring down the entire Shepherd process is a problem! Is there no
>> isolation?
>
> I have a whole collection of attempts to integrate mcron with shepherd,
> to create loops and add jobs only when the service is active. Attempting
> to fork off and then collect the child process and then fail just enough
> to make the service restart. Lots of cringe-worthy code. The more common
> fail scenarios I see are shepherd fails to start because it doesn't like
> my start code of one of the services or actually starting the service
> somehow kills it. All of those were with straight lambdas to the start
> command though.

I'm not familiar with Shepherd's internals, so I don't know why
interacting with a cron is relevant.

> Do you have your services writing out any logs? Maybe there's a clue
> there.

Not yet, but I should be enabling this soon, and if they display
anything I'll report back.

Still, this seems beside the point: the bug is that Shepherd needs to
stay up regardless of what the services it's monitoring do.

-- 
Katherine