GNU bug report logs - #35631
shepherd: dies on invalid code

Previous Next

Package: guix;

Reported by: Gábor Boskovits <boskovits <at> gmail.com>

Date: Wed, 8 May 2019 11:50:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35631 in the body.
You can then email your comments to 35631 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#35631; Package guix. (Wed, 08 May 2019 11:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gábor Boskovits <boskovits <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 08 May 2019 11:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: shepherd: dies on invalid code
Date: Wed, 8 May 2019 13:49:32 +0200
[Message part 1 (text/plain, inline)]
Observed behaviour:
Shepherd dies on loading invalid code.

Expected behaviour:
Send an error message to the log and back to the herd, that the given
service could not be loaded. (Maybe a more detailed one, that helps in
debugging).
Continue operation without the offending service.

Steps to reproduce:
shepherd -s ~/shepherd.sock -c ok-service.scm &

and then

herd -s ~/shepherd.sock load root failing-service.scm

results in the following backtrace:
Backtrace:
          15 (primitive-load "/root/.guix-profile/bin/shepherd")
In shepherd.scm:
   270:10 14 (main . _)
    58:17 13 (call-with-server-socket "/root/shepherd.sock" _)
   288:20 12 (_ #<input-output: socket 15>)
In ice-9/boot-9.scm:
    829:9 11 (catch system-error #<procedure 17fe9c0 at shepherd.sc…> …)
In shepherd.scm:
    325:9 10 (_)
In ice-9/boot-9.scm:
    829:9  9 (catch quit #<procedure 191e100 at shepherd.scm:357:7 …> …)
In shepherd.scm:
   378:11  8 (_)
   380:50  7 (_ _ #<condition &action-runtime-error [service: #<<ser…>)
In shepherd/service.scm:
   270:14  6 (condition->sexp #<condition &action-runtime-error [ser…>)
In srfi/srfi-1.scm:
   592:29  5 (map1 (#f "definition in expression context, where d…" …))
   592:29  4 (map1 ("definition in expression context, where defi…" …))
   592:17  3 (map1 (((line . 2) (column . 40) (filename . "fai…")) …))
   592:17  2 (map1 ((line . 2) (column . 40) (filename . "failing…")))
    589:5  1 (map #<<generic> result->sexp (8)> (line . 2))
In unknown file:
           0 (scm-error wrong-type-arg "map" "Wrong type argument: …" …)

ERROR: In procedure scm-error:
In procedure map: Wrong type argument: (line . 2)
herd: premature end-of-file while talking to shepherd

and shepherd dies:
[1]+  Kilépett(1)            shepherd -s ~/shepherd.sock -c ok-service.scm
at the end of ps ax output.

The only relevant line in the logs is:
May  8 13:35:46 localhost shepherd[365]: Loading failing-service.scm.

This causes serious problems when shepherd is running as pid1.

The content of the configuration files:
ok-service.scm:
(register-services (make <service>
             #:provides '(ok-service)
             #:start ((const #t))))
failing-service.scm:
(register-services (make <service>
             #:provides '(failing-service)
             #:start ((const #t)(define x 1))))
[Message part 2 (text/html, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 08 May 2019 14:28:02 GMT) Full text and rfc822 format available.

Notification sent to Gábor Boskovits <boskovits <at> gmail.com>:
bug acknowledged by developer. (Wed, 08 May 2019 14:28:02 GMT) Full text and rfc822 format available.

Message #10 received at 35631-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: 35631-done <at> debbugs.gnu.org
Subject: Re: bug#35631: shepherd: dies on invalid code
Date: Wed, 08 May 2019 16:27:09 +0200
Hello!

Gábor Boskovits <boskovits <at> gmail.com> skribis:

> In shepherd/service.scm:
>    270:14  6 (condition->sexp #<condition &action-runtime-error [ser…>)
> In srfi/srfi-1.scm:
>    592:29  5 (map1 (#f "definition in expression context, where d…" …))
>    592:29  4 (map1 ("definition in expression context, where defi…" …))
>    592:17  3 (map1 (((line . 2) (column . 40) (filename . "fai…")) …))
>    592:17  2 (map1 ((line . 2) (column . 40) (filename . "failing…")))
>     589:5  1 (map #<<generic> result->sexp (8)> (line . 2))
> In unknown file:
>            0 (scm-error wrong-type-arg "map" "Wrong type argument: …" …)
>
> ERROR: In procedure scm-error:
> In procedure map: Wrong type argument: (line . 2)
> herd: premature end-of-file while talking to shepherd

Thanks a lot for the reduced test case.  Fixed in Shepherd commit
15c032da1cd294f8141607e0bf36e257f8b1d91a!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 06 Jun 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 287 days ago.

Previous Next


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