From: "Ludovic Courtès" <ludo@gnu.org>
To: 63921@debbugs.gnu.org
Cc: Brian Cully <bjc@spork.org>
Subject: bug#63921: Activation snippets in reverse order, prevent boot
Date: Tue, 06 Jun 2023 11:58:40 +0200 [thread overview]
Message-ID: <87y1kw9ajz.fsf@gnu.org> (raw)
In-Reply-To: <877csh9fb9.fsf@inria.fr> ("Ludovic Courtès"'s message of "Tue, 06 Jun 2023 10:15:54 +0200")
Ludovic Courtès <ludo@gnu.org> skribis:
> Booting a system reconfigured from
> eed55a6544d5bda2245ec853e5fa4b28e1865bea fails with shepherd saying:
>
> error: while opening socket '/var/run/shepherd/socket': Address already in use
>
> The root cause appears to be that the ‘boot’ program has expressions
> reversed:
>
> $ guix gc --references $(guix gc --derivers $(readlink -f /var/guix/profiles/system-236-link)) | grep boot
> /gnu/store/21ldhyrpji6lkkdxi4lgr5k9l5fr2b7l-boot.drv
> $ cat $(guix build /gnu/store/21ldhyrpji6lkkdxi4lgr5k9l5fr2b7l-boot.drv)
> (eval-when (expand load eval) (let ((extensions (quote ())) (prepend (lambda (items lst) (let loop ((items items) (lst lst)) (if (null? items) lst (loop (cdr items) (cons (car items) (delete (car items) lst)))))))) (set! %load-path (prepend (cons "/gnu/store/pj751v3199vmv6i6sf0szp185ryzcfdg-module-import" (map (lambda (extension) (string-append extension "/share/guile/site/" (effective-version))) extensions)) %load-path)) (set! %load-compiled-path (prepend (cons "/gnu/store/pql80c2hy38bb60c68sng74s4xa35vwk-module-import-compiled" (map (lambda (extension) (string-append extension "/lib/guile/" (effective-version) "/site-ccache")) extensions)) %load-compiled-path))))(begin (begin (false-if-exception (delete-file "/run/booted-system")) (symlink (canonicalize-path "/run/current-system") "/run/booted-system") (let loop ((fd 3)) (when (< fd 1024) (false-if-exception (let ((flags (fcntl fd F_GETFD))) (when (zero? (logand flags FD_CLOEXEC)) (fcntl fd F_SETFD (logior FD_CLOEXEC flags))))) (loop (+ fd 1)))) (execl "/gnu/store/wj5i6x3xgai7p8whwqybxwqdjdbmbzha-shepherd-0.10.99-git/bin/shepherd" "shepherd" "--config" "/gnu/store/gnjghlc3n5qbala5jfdslgfi0n3vy8v7-shepherd.conf")) (primitive-load "/gnu/store/riabgidmf6fh76klc1yam7k9j1478vvw-activate.scm") (begin (use-modules (guix build utils)) (letrec-syntax ((fail-safe (syntax-rules () ((_ exp rest ...) (begin (catch (quote system-error) (lambda () exp) (const #f)) (fail-safe rest ...))) ((_) #t)))) (fail-safe (delete-file "/etc/group.lock") (delete-file "/etc/passwd.lock") (delete-file "/etc/.pwd.lock") (setenv "GUIX_LOCPATH" "/gnu/store/5fmqijrs5f7vx8mc2q2pmq26yvhb74sm-glibc-utf8-locales-2.35/lib/locale") (setlocale LC_CTYPE "en_US.utf8") (delete-file-recursively "/tmp") (delete-file-recursively "/var/run") (mkdir "/tmp") (chmod "/tmp" 1023) (mkdir "/var/run") (chmod "/var/run" 493) (delete-file-recursively "/run/udev/watch.old")))))
>
> Namely, (execl "…/bin/shepherd") comes before the cleanup expressions,
> which is why /var/run/shepherd/socket is still around when we boot.
Fixed in 181951207339508789b28ba7cb914f983319920f.
The regression came from dbbc7e946131ba257728f1d05b96c4339b7ee88b, which
led ‘modify-services’ to change the order of services (something I had
completely overlooked while reviewing, apologies!). I ended up
rewriting ‘modify-services’. Good news is we now have tests for this.
Ludo’.
next prev parent reply other threads:[~2023-06-06 9:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:15 bug#63921: Activation snippets in reverse order, prevent boot Ludovic Courtès
2023-06-06 9:58 ` Ludovic Courtès [this message]
2023-06-07 8:57 ` pelzflorian (Florian Pelz)
2023-06-07 9:19 ` pelzflorian (Florian Pelz)
2023-06-07 9:30 ` pelzflorian (Florian Pelz)
2023-06-07 17:44 ` Jelle Licht
2023-06-07 22:02 ` Brian Cully via Bug reports for GNU Guix
2023-06-07 23:07 ` pelzflorian (Florian Pelz)
2023-06-17 13:59 ` pelzflorian (Florian Pelz)
2023-06-26 19:26 ` bug#63921: Patch proposed Felix Lechner via Bug reports for GNU Guix
2023-09-01 11:43 ` bug#63921: Activation snippets in reverse order, prevent boot Maxim Cournoyer
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=87y1kw9ajz.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=63921@debbugs.gnu.org \
--cc=bjc@spork.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).