From: "Gábor Boskovits" <boskovits@gmail.com>
To: 35631@debbugs.gnu.org
Subject: bug#35631: shepherd: dies on invalid code
Date: Wed, 8 May 2019 13:49:32 +0200 [thread overview]
Message-ID: <CAE4v=piLwkQLpZKQ1VeSCyrvBQiam0sbfQ8U5Dp=Wxmp4mvszw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]
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))))
[-- Attachment #2: Type: text/html, Size: 3292 bytes --]
next reply other threads:[~2019-05-08 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 11:49 Gábor Boskovits [this message]
2019-05-08 14:27 ` bug#35631: shepherd: dies on invalid code Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE4v=piLwkQLpZKQ1VeSCyrvBQiam0sbfQ8U5Dp=Wxmp4mvszw@mail.gmail.com' \
--to=boskovits@gmail.com \
--cc=35631@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).