Subject: Re: bug#77401: [Shepherd] Timer spawns too many commands
From: Ludovic Courtès <[email-masked]>
To: "Timo Wilken" <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Mon, 31 Mar 2025 23:21:56 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Timo,

"Timo Wilken" <[email-masked]> skribis:

> Last night, this hit the exact moment of the CET/CEST change and seems to have
> confused the Shepherd a lot, to the point where it kept spamming the same
> message to /var/log/messages, and used up 80% of my system's total memory,
> according to htop. (This led to various things getting oom-killed, and the
> system grinding to a halt until I had a look at it in the afternoon.)
>
> First, at 01:00, the Shepherd spawned about 30 processes for this one timer:

This is now fixed:

  https://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=b36e97a730596dbf3c376f940150d5fd1f08ecf1

Let me know if you find something fishy.

The irony is that the work I did for <https://issues.guix.gnu.org/75622>
helped, but the one test that would have caught this issue was wrong: it
was looking at the wrong date when testing the CET->CEST change.

Setting #:wait-for-termination? #true would have mitigated this bug (it
wouldn’t have triggered).

Thanks,
Ludo’.