GNU bug report logs - #69401
/etc/guix/machines.scm symlink can be garbage collected

Previous Next

Package: guix;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Mon, 26 Feb 2024 06:54:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69401 in the body.
You can then email your comments to 69401 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#69401; Package guix. (Mon, 26 Feb 2024 06:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 26 Feb 2024 06:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: bug-guix <at> gnu.org
Subject: /etc/guix/machines.scm symlink can be garbage collected
Date: Mon, 26 Feb 2024 08:53:11 +0200
[Message part 1 (text/plain, inline)]
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 <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#69401; Package guix. (Thu, 04 Apr 2024 21:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 69401 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 69401 <at> debbugs.gnu.org
Subject: Re: bug#69401: /etc/guix/machines.scm symlink can be garbage collected
Date: Thu, 04 Apr 2024 23:55:07 +0200
Hi,

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

> 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:

--8<---------------cut here---------------start------------->8---
root <at> hydra-guix-108 ~# guix gc -R $(readlink -f /run/current-system) |grep machines.scm
/gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm
root <at> 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 <at> hydra-guix-108 ~# stat -L /etc/guix/machines.scm
stat: cannot statx '/etc/guix/machines.scm': No such file or directory
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
root <at> 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'
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
root <at> 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 <at> 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
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
root <at> 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)))
--8<---------------cut here---------------end--------------->8---

To be continued…

Ludo’.




Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 04 Apr 2024 21:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#69401; Package guix. (Sat, 06 Apr 2024 16:01:02 GMT) Full text and rfc822 format available.

Message #13 received at 69401 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 69401 <at> debbugs.gnu.org
Subject: Re: bug#69401: /etc/guix/machines.scm symlink can be garbage collected
Date: Sat, 06 Apr 2024 18:00:41 +0200
Ludovic Courtès <ludo <at> gnu.org> skribis:

> root <at> hydra-guix-108 ~# guix gc -R $(readlink -f /run/current-system) |grep machines.scm
> /gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm
> root <at> 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’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 07 Apr 2024 23:13:03 GMT) Full text and rfc822 format available.

Notification sent to Efraim Flashner <efraim <at> flashner.co.il>:
bug acknowledged by developer. (Sun, 07 Apr 2024 23:13:03 GMT) Full text and rfc822 format available.

Message #18 received at 69401-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 69401-done <at> debbugs.gnu.org
Subject: Re: bug#69401: /etc/guix/machines.scm symlink can be garbage collected
Date: Mon, 08 Apr 2024 01:11:43 +0200
Ludovic Courtès <ludo <at> gnu.org> skribis:

> Ludovic Courtès <ludo <at> gnu.org> skribis:
>
>> root <at> hydra-guix-108 ~# guix gc -R $(readlink -f /run/current-system) |grep machines.scm
>> /gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm
>> root <at> 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’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 May 2024 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.