[bug#63943] The Shepherd on GNU/Hurd
Commit Message
Ludovic Courtès <ludo@gnu.org> skribis:
> To me it’s important so we can upgrade the Shepherd in use on GNU/Hurd
> (it’s still stuck at 0.8 because so far Fibers lacked support for
> non-Linux systems), which in turn means we can use the newer Shepherd
> APIs in its config file. Unfortunately, while shepherd cross-builds
> and runs on GNU/Hurd, I’m not confident it “works”. I’ll write more
> in a separate message.
The patch I ended up not including in this series is use of current
Shepherd on GNU/Hurd (attached).
Problems that I see are:
• ‘networking’ gets stuck in ‘starting’ state. My guess is that it
uses ‘system*’ (the replacement provided by shepherd) and that one
does not return because we never get SIGCHLD.
• (@ (ice-9 threads) all-threads) says there are two threads. That
was already the case with 0.8, but it’s no good.
Also, I haven’t tried to run the Shepherd’s test suite natively on
GNU/Hurd; I’m sure it’d uncover problems.
Overall, I’m pessimistic about signal handling without ‘signalfd’. We
could try to get shepherd to kinda work without ‘signalfd’ (we could
even test that code path on GNU/Linux), but that’s going to be brittle
as we can already see.
What d’ya think, comrades?
Ludo’.
Comments
Ludovic Courtès writes:
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> To me it’s important so we can upgrade the Shepherd in use on GNU/Hurd
>> (it’s still stuck at 0.8 because so far Fibers lacked support for
>> non-Linux systems), which in turn means we can use the newer Shepherd
>> APIs in its config file. Unfortunately, while shepherd cross-builds
>> and runs on GNU/Hurd, I’m not confident it “works”. I’ll write more
>> in a separate message.
>
> The patch I ended up not including in this series is use of current
> Shepherd on GNU/Hurd (attached).
>
> Problems that I see are:
>
> • ‘networking’ gets stuck in ‘starting’ state. My guess is that it
> uses ‘system*’ (the replacement provided by shepherd) and that one
> does not return because we never get SIGCHLD.
>
> • (@ (ice-9 threads) all-threads) says there are two threads. That
> was already the case with 0.8, but it’s no good.
>
> Also, I haven’t tried to run the Shepherd’s test suite natively on
> GNU/Hurd; I’m sure it’d uncover problems.
>
> Overall, I’m pessimistic about signal handling without ‘signalfd’. We
> could try to get shepherd to kinda work without ‘signalfd’ (we could
> even test that code path on GNU/Linux), but that’s going to be brittle
> as we can already see.
>
> What d’ya think, comrades?
It would be great, if it works ;-)
While I'd like to test it and I'm still making progress building
natively on the Hurd but it's hard to predict when I'll get to building
fibers:
--8<---------------cut here---------------start------------->8---
root@guixydevel ~/src/guix/wip-hurd# ./pre-inst-env guix build guile-fibers@1.3.1
The following derivations will be built:
/gnu/store/rc75bjs5pjni9w6dvhjvmik55vgdk501-guile-fibers-1.3.1.drv
/gnu/store/l9pvk6ari19l5j8bvbjij4df8rx8a943-guile-fibers-1.3.1-checkout.drv
/gnu/store/79j9l6rxqpayvrh2fmk665xiw6izfd9v-guile-fibers-1.3.1-checkout.drv
/gnu/store/71lgpvpmgjb40n6r5qkrk7zp5cgmc67x-guile-json-4.7.3.drv
/gnu/store/b8wcy6aw9zsd3s7rjp6idmzzh0slp9xn-module-import-compiled.drv
/gnu/store/kkgkbhg583zplxd75kivl3s06xp3id7i-guile-gnutls-3.7.12.drv
/gnu/store/2nnnqgifm6kwwaard67vmlxsqg9z4dbn-guile-gnutls-3.7.12.tar.xz.drv
/gnu/store/lxhq4z01ihalnbxp592z4mm9iyjbvb3p-texinfo-6.8.drv
/gnu/store/78nfa0r179gs408gxf50i0q0c2cd3mi7-texinfo-6.8.tar.xz.drv
/gnu/store/p6hq43iga4kb4g09h2baq5mdca5m5h29-git-minimal-2.40.1.drv
/gnu/store/7j5v82rv9ar36xxnh3sk5srw1dr48azn-curl-7.85.0.drv
/gnu/store/74n0wvcc4c8qjdalf2mw77ij3my7amcc-nghttp2-1.49.0.drv
/gnu/store/8z7cr0bgayis4qc97n72hia0qy2y7cx9-jansson-2.14.drv
/gnu/store/cma9bgjc8a2wx4qfrzyxbzhwhyxpabdc-python-3.10.7.drv
/gnu/store/00rah96n5lqi6ciz6xwnp1pxjh87sxak-sqlite-3.39.3.drv
/gnu/store/6g1l3r6bz60rbpf589wldflgnv91aiql-sqlite-autoconf-3390300.tar.xz.drv
/gnu/store/0mwhankh574hrcyjcbpiv4vzgz79fx3d-libxext-1.3.4.drv
/gnu/store/agp5cags2viz3i03qpgwbrvsxwzq905j-tk-8.6.12.drv
/gnu/store/479v3x0adq8i592v84b65zp4ssz9k3k6-libxft-2.3.4.drv
/gnu/store/6zhyims30137hinkqki2fs1r7906nys6-fontconfig-minimal-2.14.0.drv
/gnu/store/bfxx8cznlb4hszg1qm0limhyjsv7d7yr-font-dejavu-2.37.drv
/gnu/store/svnq4kdgyvh6zp8vb0swcnrkj039wwqy-module-import-compiled.drv
/gnu/store/qvqxdab06klfn40bdf4fmmmflrgaah6q-tk8.6.12-src.tar.xz.drv
/gnu/store/jzjsa7b6ly6a4wz4a9k0s66fnxv0imb0-libev-4.33.drv
/gnu/store/bhxa1vsdx7qm2cdqwqr0j7k6zdvhnv6l-mit-krb5-1.20.drv
/gnu/store/a552az04c0fwd1hs936gsq6ivszhiimd-krb5-1.20.tar.xz.drv
/gnu/store/pg26yqmmv4fz2if4k6fd5hbnh5xnqy2r-libevent-2.1.12.drv
/gnu/store/3861750mi7r1faq24va47dc6dqr122pj-python-wrapper-3.10.7.drv
--8<---------------cut here---------------end--------------->8---
most (all?) of these dependencies are on my list working towards
a self-hosting guix.
Greetings,
janneke
Janneke Nieuwenhuizen writes:
hi!
> Ludovic Courtès writes:
>
>> Ludovic Courtès <ludo@gnu.org> skribis:
>>
>>> To me it’s important so we can upgrade the Shepherd in use on GNU/Hurd
>>> (it’s still stuck at 0.8 because so far Fibers lacked support for
>>> non-Linux systems), which in turn means we can use the newer Shepherd
>>> APIs in its config file. Unfortunately, while shepherd cross-builds
>>> and runs on GNU/Hurd, I’m not confident it “works”. I’ll write more
>>> in a separate message.
>>
>> The patch I ended up not including in this series is use of current
>> Shepherd on GNU/Hurd (attached).
>>
>> Problems that I see are:
[..]
> It would be great, if it works ;-)
>
> While I'd like to test it and I'm still making progress building
> natively on the Hurd but it's hard to predict when I'll get to building
> fibers:
Finally up to guile-fibers@1.3.1, I broke off the test suite after 2h.
I'll retry using --verbosity=2 during the night (hopefully today or
tomorrow).
Greetings,
Janneke
@@ -804,9 +804,7 @@ (define (hurd-default-essential-services os)
%boot-service
%hurd-startup-service
%activation-service
- (service shepherd-root-service-type
- (shepherd-configuration
- (shepherd shepherd-0.8))) ;no Fibers
+ (service shepherd-root-service-type)
(service user-processes-service-type)
(account-service (append (operating-system-accounts os)
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -68,7 +68,7 @@ (define %base-packages/hurd
;; Note: the Shepherd comes before the Hurd, not just because its duty is to
;; shepherd the herd, but also because we want its 'halt' and 'reboot'
;; commands to take precedence.
- (list shepherd-0.8 hurd bash coreutils file findutils grep sed
+ (list shepherd-0.10 hurd bash coreutils file findutils grep sed
diffutils patch gawk tar gzip bzip2 xz lzip
guile-3.0-latest guile-colorized guile-readline
net-base inetutils less shadow sudo which