guix package test failure on i686-linux (kexec-load-file test)

  • Open
  • quality assurance status badge
Details
4 participants
  • boogs
  • Dariqq
  • Ian Eure
  • Ludovic Courtès
Owner
unassigned
Submitted by
Dariqq
Severity
important
D
D
Dariqq wrote on 30 Dec 2024 17:55
(address . bug-guix@gnu.org)
781419f2-6304-4c18-b01c-412121126ee5@posteo.net
Hello,

The guix package is failing the newly added kexec-load-file syscall test
on i686-linux:


test-name: kexec-load-file
location:
/tmp/guix-build-guix-1.4.0-31.121e96d.drv-0/source/tests/syscalls.scm:688
source:
+ (test-equal
+ "kexec-load-file"
+ EPERM
+ (catch 'system-error
+ (lambda ()
+ (let ((fd1 (open-fdes "/dev/null" O_RDONLY))
+ (fd2 (open-fdes "/dev/null" O_RDONLY)))
+ (kexec-load-file fd1 fd2 "gnu.repl=yes")))
+ (lambda args (system-error-errno args))))
expected-value: 1
actual-value: 14
result: FAIL
I
I
Ian Eure wrote on 1 Jan 05:17 +0100
(address . 75205@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
87seq3uq0q.fsf@retrospec.tv
This is failing for me on aarch64-linux also:

test-name: kexec-load-file
location:
/tmp/guix-build-guix-1.4.0-31.121e96d.drv-0/source/tests/syscalls.scm:688
source:
+ (test-equal
+ "kexec-load-file"
+ EPERM
+ (catch 'system-error
+ (lambda ()
+ (let ((fd1 (open-fdes "/dev/null" O_RDONLY))
+ (fd2 (open-fdes "/dev/null" O_RDONLY)))
+ (kexec-load-file fd1 fd2 "gnu.repl=yes")))
+ (lambda args (system-error-errno args))))
expected-value: 1
actual-value: 38
result: FAIL

If I downgrade to commit 96cd163c14e68c66c6a4cf0b18261fc454f8c1ba,
guix tests pass again -- the failing test was added in the next
commit. I’m not sure what the issue here, it seems like that
syscall shouldn’t be arch-dependent, and the errnos in the
failures are unhelpful. 38 is ERANGE, 14 is EFAULT, neither of
those seem applicable here. EPERM is 1, and 38 doesn’t have its
LSB set, so it can’t be a bitmask.

I’m encountering the issue using Guix as a foreign package manager
on top of Debian 12 "bookworm" in a VM. Perhaps there’s an
implicit dependency on the host system’s kernel in the test, which
Debian’s fails to meet.

Ludo’, any thoughts?

-- Ian
L
L
Ludovic Courtès wrote 5 days ago
(name . Ian Eure)(address . ian@retrospec.tv)(address . 75205@debbugs.gnu.org)
87v7uuphyg.fsf@gnu.org
Hello,

Ian Eure <ian@retrospec.tv> skribis:

Toggle quote (19 lines)
> This is failing for me on aarch64-linux also:
>
> test-name: kexec-load-file
> location:
> /tmp/guix-build-guix-1.4.0-31.121e96d.drv-0/source/tests/syscalls.scm:688
> source:
> + (test-equal
> + "kexec-load-file"
> + EPERM
> + (catch 'system-error
> + (lambda ()
> + (let ((fd1 (open-fdes "/dev/null" O_RDONLY))
> + (fd2 (open-fdes "/dev/null" O_RDONLY)))
> + (kexec-load-file fd1 fd2 "gnu.repl=yes")))
> + (lambda args (system-error-errno args))))
> expected-value: 1
> actual-value: 38
> result: FAIL

Could you strace it, to see if strace decodes it are ‘kexec_file_load’?
For example like this:

./pre-inst-env strace -e kexec_file_load \
guile -c '(use-modules (guix build syscalls)) (kexec-load-file (open-fdes "/dev/null" O_RDONLY) (open-fdes "/dev/null" O_RDONLY) "")'

38 is ENOSYS (“Function not implemented”), not ERANGE. This could mean
that kexec support is missing in this kernel.

Thanks,
Ludo’.
B
B
boogs wrote 4 days ago
guix package test failure on i686-linux (kexec-load-file test)
(address . 75205@debbugs.gnu.org)
87pll1kyt5.fsf@venatores.group
Forwarding my reply from this other relevant thread[1]:

Toggle quote (59 lines)
> Hi,
> It looks like some people[1,2] including myself are running into an issue where the `guix system reconfigure` command fails, presumably because `KEXEC_FILE_DEBUG` is not supported in older kernel configurations.
>
> The output of reconfiguring my system is the same as Simen's[2] ending in:
>
> ```
> To complete the upgrade, run 'herd restart SERVICE' to stop,
> upgrade, and restart each service that was not automatically restarted.
> Run 'herd status' to view the list of services on your system.
> WARNING: (guile-user): imported module (guix build utils) overrides core binding `delete'
> guix system: error: kexec-load-file: Invalid argument
> ```
>
> My system runs a custom kernel configuration that I created via `make menuconfig` in the kernel repo. I suspect the issue lies here:
>
> ```
> (define (kexec-loading-program os)
> "Return a program that calls 'kexec_file_load' to allow rebooting into OS
> via 'kexec'."
> (let ((root-device (file-system-device
> (operating-system-root-file-system os))))
> (program-file
> "kexec-load-system.scm"
> (with-imported-modules '((guix build syscalls))
> #~(begin
> (use-modules (guix build syscalls))

> (let ((kernel (open-fdes #$(operating-system-kernel-file os)
> O_RDONLY))
> (initrd (open-fdes #$(operating-system-initrd-file os)
> O_RDONLY)))
> (kexec-load-file kernel initrd
> (string-join
> (list #$@(operating-system-kernel-arguments
> os root-device)))
> KEXEC_FILE_DEBUG)))))))
> ```
>
> This is the relevant snippet from my kernel configuration:
>
> ```
> #
> # Kexec and crash features
> #
> CONFIG_CRASH_CORE=y
> CONFIG_KEXEC_CORE=y
> CONFIG_KEXEC=y
> CONFIG_KEXEC_FILE=y
> CONFIG_KEXEC_JUMP=y
> CONFIG_CRASH_DUMP=y
> CONFIG_CRASH_HOTPLUG=y
> CONFIG_CRASH_MAX_MEMORY_RANGES=8192
> # end of Kexec and crash features
> # end of General setup
> ```
>
> [1] https://issues.guix.gnu.org/75320
> [2] https://issues.guix.gnu.org/75211

L
L
Ludovic Courtès wrote 3 days ago
control message for bug #75205
(address . control@debbugs.gnu.org)
87ikqs9pyj.fsf@gnu.org
severity 75205 important
quit
L
L
Ludovic Courtès wrote 3 days ago
Re: bug#75205: guix package test failure on i686-linux (kexec-load-file test)
(name . Ian Eure)(address . ian@retrospec.tv)(address . 75205@debbugs.gnu.org)
87wmf884et.fsf@gnu.org
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 75205
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