/etc/guix/machines.scm symlink can be garbage collected

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Ludovic Courtès
Owner
unassigned
Submitted by
Efraim Flashner
Severity
important
E
E
Efraim Flashner wrote on 26 Feb 07:53 +0100
(address . bug-guix@gnu.org)
Zdw1V9N-SX6wOhLi@3900XT
Some of the build nodes behind the Berlin build farm have a childhurd
which can build packages. Unfortunately, the symlink from
/etc/guix/machines.scm to the generated file in the store to setup
offloading has been garbage collected on several of the machines.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXcNVQACgkQQarn3Mo9
g1GIXw/7B9ElWhW0KCVviD/MnieTjab20Ix9hEkV23v8EGMp76qmQ3/mkh4Sam0y
WVWrxv6Dtzjacd2aM+Uo8FgEzcogPSwN1279XZyZAUb3vWuI+V8uUB5jKV41KPLc
WMMTB8uzVtRm4uy+PN0v0tO84fACRqe3VNO/94F7HIf5iqdkR2tZ82dGvmYkjGII
kEd+95oe6rGf3wdaIrt1itfYjVGZbuclDXx+9HaCjaQJUxLZjbPF6MxbnpnCQfKf
m3Equb8a35jU+TMaVraMltx+duKP5RFk/ihqXNAgiTPhln0iGWBwvvtbHZh3RoAO
GCuhzmCKp25ivCT5JZTU4dqGvEPc0vCdhgdM9Gd54CERgAPnQMxCCyNINxp+y9RD
3hwBDs2JQ31AVae7ILH4DZ5vSSUEgp3ZCxEddv0kCixFARE0VsF6+FWHQSJ3jjL8
MSMO1BZOgwZutR22msrrcmMTwKuqXQGBSjRtsKgy0ktgp8VCn9V+rKLBh4crkOOv
yQwLjnkOUHhWcFiGxZgQnKy6em5IQo5/lJcJpWkQQfNn+WIT3bYpbHRB97S9k181
4cgkCzcDYb7QpexDeBvdWvGzBbZMOiQBsCw3H/ND4hBeZSNNpnQkhi/AHKEq9pUJ
2RKK9kFPGXxumNgYkonFlmByGTwghHVwzY3YsLLZibJ395kIewY=
=vHBp
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 4 Apr 23:55 +0200
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69401@debbugs.gnu.org)
871q7ku72c.fsf@gnu.org
Hi,

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (5 lines)
> Some of the build nodes behind the Berlin build farm have a childhurd
> which can build packages. Unfortunately, the symlink from
> /etc/guix/machines.scm to the generated file in the store to setup
> offloading has been garbage collected on several of the machines.

Indeed. Here’s an example:

Toggle snippet (8 lines)
root@hydra-guix-108 ~# guix gc -R $(readlink -f /run/current-system) |grep machines.scm
/gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm
root@hydra-guix-108 ~# ls -l /etc/guix/machines.scm
lrwxrwxrwx 1 root root 56 Mar 7 11:53 /etc/guix/machines.scm -> /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm
root@hydra-guix-108 ~# stat -L /etc/guix/machines.scm
stat: cannot statx '/etc/guix/machines.scm': No such file or directory

Here /etc/guix/machines.scm points to a different ‘machines.scm’ than
the one that is current. The old one was removed last week:

Toggle snippet (4 lines)
root@hydra-guix-108 ~# zgrep 1171q4xhph07ll3mlzlg7igcwg3c98i1 /var/log/mcron.log.1.gz
2024-03-27 03:00:05 23100 guix gc -F 150G: [46%] deleting '/gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm'

The /etc/guix/machines.scm link was created on the last deployment
though:

Toggle snippet (17 lines)
root@hydra-guix-108 ~# ls -l /etc/guix/machines.scm
lrwxrwxrwx 1 root root 56 Mar 7 11:53 /etc/guix/machines.scm -> /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm
root@hydra-guix-108 ~# guix system describe
Generation 109 Mar 07 2024 11:53:30 (current)
file name: /var/guix/profiles/system-109-link
canonical file name: /gnu/store/5m0sjf3x0pslipcbdxm9ml99h0lbh7c8-system
label: GNU with Linux-Libre 6.6.18
bootloader: grub-efi
root device: label: "my-root"
kernel: /gnu/store/jcr3d8yy531q4i6kgkfmb0r3ghw418mc-linux-libre-6.6.18/bzImage
channels:
guix:
repository URL: https://git.savannah.gnu.org/git/guix.git
commit: 64d269b983b76553466ac93945d58c7865cf190e
configuration file: /gnu/store/d4z76lw515padizhl62hydxwygh57p6k-configuration.scm

Could it be that the “wrong” activation snippet was run by ‘guix
deploy’? Here we see the right one:

Toggle snippet (4 lines)
root@hydra-guix-108 ~# grep machines.scm $(guix gc -R $(readlink -f /run/current-system) |grep activate-service)
/gnu/store/pgmb9swcx0pljhbw88mgd3zjagz5axvn-activate-service.scm:(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/iqbchmbmhmi34bwgv4sm14li9m24dpnl-module-import-compiled" (map (lambda (extension) (string-append extension "/lib/guile/" (effective-version) "/site-ccache")) extensions)) %load-compiled-path))))(begin (unless (or #f (file-exists? "/etc/guix/signing-key.pub")) (system* "/gnu/store/59y43hrlffs8hg1584vg5074jsbfhwjy-guix-1.4.0-16.aeb4943/bin/guix" "archive" "--generate-key")) (begin (use-modules (guix build utils)) (define acl-file "/etc/guix/acl") (if (file-exists? acl-file) (if (and (symbolic-link? acl-file) (store-file-name? (readlink acl-file))) (delete-file acl-file) (rename-file acl-file (string-append acl-file ".bak"))) (mkdir-p (dirname acl-file))) (symlink "/gnu/store/np3babd2h4xh4x4dvm51k6rp3xbsrzyl-acl" acl-file)) (begin (use-modules (guix build utils)) (define machines-file "/etc/guix/machines.scm") (if (file-exists? machines-file) (if (and (symbolic-link? machines-file) (store-file-name? (readlink machines-file))) (delete-file machines-file) (rename-file machines-file (string-append machines-file ".bak"))) (mkdir-p (dirname machines-file))) (symlink "/gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm" machines-file)))

To be continued…

Ludo’.
L
L
Ludovic Courtès wrote on 4 Apr 23:55 +0200
control message for bug #69401
(address . control@debbugs.gnu.org)
87zfu8sshm.fsf@gnu.org
severity 69401 important
quit
L
L
Ludovic Courtès wrote on 6 Apr 18:00 +0200
Re: bug#69401: /etc/guix/machines.scm symlink can be garbage collected
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69401@debbugs.gnu.org)
87y19qo506.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (5 lines)
> root@hydra-guix-108 ~# guix gc -R $(readlink -f /run/current-system) |grep machines.scm
> /gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm
> root@hydra-guix-108 ~# ls -l /etc/guix/machines.scm
> lrwxrwxrwx 1 root root 56 Mar 7 11:53 /etc/guix/machines.scm -> /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm

Turns out that both files are identical, but:

• /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm is built
with
/gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9/bin/guile
(‘guile-final’ ungrafted);

• /gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm is built
with
/gnu/store/g49b4v7dff8xwfi7wpi8pps1ixhld3n7-guile-3.0.9/bin/guile
(‘guile-final’ grafted).

As it turns out, <scheme-file> (used for “machines.scm”) uses
‘gexp->file’, which, unlike ‘gexp->script’, does not default to
(default-guile). That probably explains the difference.

Ludo’.
L
L
Ludovic Courtès wrote on 8 Apr 01:11 +0200
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69401-done@debbugs.gnu.org)
878r1oojio.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (23 lines)
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> root@hydra-guix-108 ~# guix gc -R $(readlink -f /run/current-system) |grep machines.scm
>> /gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm
>> root@hydra-guix-108 ~# ls -l /etc/guix/machines.scm
>> lrwxrwxrwx 1 root root 56 Mar 7 11:53 /etc/guix/machines.scm -> /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm
>
> Turns out that both files are identical, but:
>
> • /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm is built
> with
> /gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9/bin/guile
> (‘guile-final’ ungrafted);
>
> • /gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm is built
> with
> /gnu/store/g49b4v7dff8xwfi7wpi8pps1ixhld3n7-guile-3.0.9/bin/guile
> (‘guile-final’ grafted).
>
> As it turns out, <scheme-file> (used for “machines.scm”) uses
> ‘gexp->file’, which, unlike ‘gexp->script’, does not default to
> (default-guile). That probably explains the difference.

I believe this is fixed by b30b838d5055e36be19d030db28838fec4474d98.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 69401@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69401
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch