GNU bug report logs - #77283
[Shepherd] System log crashes when parsing message

Previous Next

Package: guix;

Reported by: MSavoritias <email <at> msavoritias.me>

Date: Wed, 26 Mar 2025 13:43:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: MSavoritias <email <at> msavoritias.me>
Cc: 77283 <at> debbugs.gnu.org
Subject: bug#77283: Shepherd can't parse logs.
Date: Sun, 30 Mar 2025 23:02:06 +0200
Hi MSavoritias,

MSavoritias <email <at> msavoritias.me> skribis:

> Shepherd has been crashing our system with the message:
>
> https://upload.magicbroccoli.de/fb6e7843fef693538a5c7c156c0a98fc0aeb6bac/KmA7ovtC2Fcw0Nm0PSCtphwSyDLI1VUF3QrT9PtD/Kuvakaappaus_-_2025-03-26_13-27-11.png
>
>
> This ends up with prosody and openssh crashing, nginx still
> working. the picture shows shepherd system-log crashing with:
>
> uncaught exception, value out of range in fibers. It references an
> "unknown file" and a string with prosody.

The code that throws that out-of-range exception on ‘substring’ is
(match:substring m 3) in ‘parse-system-log-message’.

Normally, ‘regexp-exec’ returns match structures with correct
boundaries, but in this case it didn’t.  I reported it here:

  https://issues.guix.gnu.org/77392

Several options come to mind:

  1. Run shepherd in a UTF-8 locale; a quick workaround is to run:

       sudo herd eval root '(setlocale LC_ALL "C.UTF-8")'

     but we could also do that in Guix System.

  2. Avoid (ice-9 regex) altogether in ‘system-log.scm’ and use a pure
     Scheme implementation, SRFI-115-style.

Thanks for your bug report!

Ludo’.




This bug report was last modified 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.