Thank you Timo for pinpointing this issue and for providing a fix!

For tracking it, I've opened an issue [1].

[1] https://github.com/genodelabs/genode/issues/4815

On 2023-04-17 08:22, Christian Helmuth wrote:
AFAICS your patch fixes the issue for fetchurl. Nevertheless, I favor
the use of periodic timeouts in proper contexts over oneshot timeouts.
How about keeping the periodic timeout and handling the _initial_ state
in Fetchurl_watchdog::_handle()?

In [2], I have now created a patch in this spirit. With this approach, the watchdog handler obtains the current time from the timer to get the ground truth instead of relying on the mere sequence of handler calls.

[2] https://github.com/genodelabs/genode/commit/b5371fe3215ea2ec9514530e97a0145bef27c0b8

While being at it, I noticed that the depot_download.run script still triggered the watchdog mechanism when reducing the PERIOD_SECONDS value to 2 seconds, which made me curious. This effect was caused by the intertwining of watchdog signals and init-state signals. In cases where fetchurl exited with value 22 (due to HTTP error 404), the watchdog handler was sometimes executed right before the init-state handler had a chance to evaluate the exit code, causing unnecessary respawns. By reporting child exits more eagerly [3], this effect is mitigated.

[3] https://github.com/genodelabs/genode/issues/4814

Thanks again for bringing up this issue. It is nice to see the warning noise disappear. ;-)

Cheers
Norman

--
Dr.-Ing. Norman Feske
Genode Labs

https://www.genode-labs.com · https://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth


_______________________________________________
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Reply via email to