GNU bug report logs -
#48521
opendht-service-type hangs Shepherd at boot
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 19 May 2021 22:52:06 -0400
with message-id <87v97eglrd.fsf <at> gmail.com>
and subject line Re: bug#48521: opendht-service-type hangs Shepherd at boot
has caused the debbugs.gnu.org bug report #48521,
regarding opendht-service-type hangs Shepherd at boot
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
48521: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48521
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello,
I just noticed about this problem following a reboot. I can also
reproduce it in 'guix system vm', simply adding the opendht-service-type
to my operating-system declaration.
The boot proceeds until 'error in finalization thread: Success' then
hangs indefinitely.
What is troubling for me is that the service is rather straightforwardly
defined. It uses the make-forkexec-constructor/container like so:
--8<---------------cut here---------------start------------->8---
(define (opendht-shepherd-service config)
"Return a <shepherd-service> running OpenDHT."
(shepherd-service
(documentation "Run an OpenDHT node.")
(provision '(opendht dhtnode dhtproxy))
(requirement '(user-processes syslogd))
(start #~(make-forkexec-constructor/container
(list #$@(opendht-configuration->command-line-arguments config))
#:mappings (list (file-system-mapping
(source "/dev/log") ;for syslog
(target source)))
#:user "opendht"))
(stop #~(make-kill-destructor))))
--8<---------------cut here---------------end--------------->8---
I'm not sure how using such basic building blocks could lead to a hang
in Shepherd ?
Thanks,
Maxim
[Message part 3 (message/rfc822, inline)]
Hello,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> Hello,
>
> I just noticed about this problem following a reboot. I can also
> reproduce it in 'guix system vm', simply adding the opendht-service-type
> to my operating-system declaration.
>
> The boot proceeds until 'error in finalization thread: Success' then
> hangs indefinitely.
>
> What is troubling for me is that the service is rather straightforwardly
> defined. It uses the make-forkexec-constructor/container like so:
>
> (define (opendht-shepherd-service config)
> "Return a <shepherd-service> running OpenDHT."
> (shepherd-service
> (documentation "Run an OpenDHT node.")
> (provision '(opendht dhtnode dhtproxy))
> (requirement '(user-processes syslogd))
> (start #~(make-forkexec-constructor/container
> (list #$@(opendht-configuration->command-line-arguments config))
> #:mappings (list (file-system-mapping
> (source "/dev/log") ;for syslog
> (target source)))
> #:user "opendht"))
> (stop #~(make-kill-destructor))))
>
> I'm not sure how using such basic building blocks could lead to a hang
> in Shepherd ?
It seems Shepherd can't cope with a failing start procedure/script when
a variable was not bound. To diagnose the problem, the best way ended
up being to extract the code of the constructor in a separate script to
run it separately. This made the error quickly apparent: "Unbound
variable: file-system-mapping".
We should try to handle this class of errors in Shepherd and report a
useful message and *not* crash Shepherd or otherwise hang.
Pushed with commit a09cdf1f9d.
Closing.
Maxim
This bug report was last modified 4 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.