[PATCH 0/3] Running guix gc on the Hurd.

  • Open
  • quality assurance status badge
Details
3 participants
  • Bengt Richter
  • Jan (janneke) Nieuwenhuizen
  • Ludovic Courtès
Owner
unassigned
Submitted by
Jan (janneke) Nieuwenhuizen
Severity
normal
J
J
Jan (janneke) Nieuwenhuizen wrote on 25 Jun 2020 22:34
(address . bug-guix@gnu.org)(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)
20200625203400.24644-1-janneke@gnu.org
From: Jan Nieuwenhuizen <janneke@gnu.org>

Hi!

As discussed on IRC, we would like to get "guix gc" to work on the Hurd. It's
kind of essential to get the build nodes running a Childhurd. We discussed
several workarounds, but an acceptable one is non-trivial; so better look into
a proper fix first.

We found that /proc is missing, so I have added that. And then we found that
/proc/1/environ (and others) may return EIO; so I've added a catch/workaround
for that.

However, when trying to test this I found that the hurd disk image on master
is pretty broken:

* it creates an ext2, but not of hurd flavor (fixed in 0001)
* it fails to call make-hurd-device-nodes (fixed in 0002)

With these two fixes, it boots again. These are really minor fixes/typo-like
oversights and I was considering to "just push" them... but then I found that
the "guix build" command is also broken:

Toggle snippet (17 lines)
root@guixygnu ~# guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
Backtrace:
In ice-9/boot-9.scm:
1736:10 4 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
3 (apply-smob/0 #<thunk 2d5380>)
In ice-9/boot-9.scm:
718:2 2 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
619:8 1 (_ #(#(#<directory (guile-user) 2cc820>)))
In guix/ui.scm:
1948:12 0 (run-guix-command _ . _)

guix/ui.scm:1948:12: In procedure run-guix-command:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f

How sad!

I'm a bit stuck on this, probably because I'm feeling somewhat discouraged.
Any ideas what could have broken this, how to look into it, fix this?

Greetings,
Janneke

Jan (janneke) Nieuwenhuizen (3):
image: hurd: Create hurd-compatible ext2 file-system.
image: hurd: Initialize root partition for the Hurd.
guix: gc: Support for the Hurd.

gnu/build/hurd-boot.scm | 21 ++++++++++++++-------
gnu/system/image.scm | 7 -------
gnu/system/images/hurd.scm | 11 ++++++++++-
guix/store/roots.scm | 12 +++++++++---
4 files changed, 33 insertions(+), 18 deletions(-)

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
J
J
Jan (janneke) Nieuwenhuizen wrote on 25 Jun 2020 22:38
[PATCH 2/3] image: hurd: Initialize root partition for the Hurd.
(address . 42047@debbugs.gnu.org)
20200625203850.25057-2-janneke@gnu.org
This is a follow-up to commit b904b59ce592c89dfb4675a8c06757afed6738a0.

* gnu/system/image.scm (hurd-initialize-root-partition): Move to ...
* gnu/system/images/hurd.scm (hurd-initialize-root-partition): ... here.
(hurd-disk-image): Use it.
---
gnu/system/image.scm | 7 -------
gnu/system/images/hurd.scm | 9 ++++++++-
2 files changed, 8 insertions(+), 8 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index bb73aea65a..a4cc2d1ef9 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -96,13 +96,6 @@
(flags '(boot))
(initializer (gexp initialize-root-partition))))
-(define hurd-initialize-root-partition
- #~(lambda* (#:rest args)
- (apply initialize-root-partition
- (append args
- (list #:make-device-nodes
- make-hurd-device-nodes)))))
-
(define efi-disk-image
(image
(format 'disk-image)
diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm
index e5e120d49c..31942e7386 100644
--- a/gnu/system/images/hurd.scm
+++ b/gnu/system/images/hurd.scm
@@ -57,6 +57,13 @@
(password-authentication? #t)))
%base-services/hurd))))
+(define hurd-initialize-root-partition
+ #~(lambda* (#:rest args)
+ (apply initialize-root-partition
+ (append args
+ (list #:make-device-nodes
+ make-hurd-device-nodes)))))
+
(define hurd-disk-image
(image
(format 'disk-image)
@@ -69,7 +76,7 @@
(file-system "ext2")
(file-system-options '("-o" "hurd" "-O" "ext_attr"))
(flags '(boot))
- (initializer (gexp initialize-root-partition)))))))
+ (initializer hurd-initialize-root-partition))))))
(define hurd-barebones-disk-image
(image
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
J
J
Jan (janneke) Nieuwenhuizen wrote on 25 Jun 2020 22:38
[PATCH 3/3] guix: gc: Support for the Hurd.
(address . 42047@debbugs.gnu.org)
20200625203850.25057-3-janneke@gnu.org
* guix/store/roots.scm (proc-environ-roots): Handle EIO, for the Hurd.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Mount /proc. Add
symlink to /etc/mtab. Remove duplicate calls to 'scope'.
---
gnu/build/hurd-boot.scm | 21 ++++++++++++++-------
guix/store/roots.scm | 13 ++++++++++---
2 files changed, 24 insertions(+), 10 deletions(-)

Toggle diff (77 lines)
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index aea2ac3307..2db99cdcce 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -191,7 +191,8 @@ set."
"10.0.2.15" ;the default QEMU guest IP
"--netmask" "255.255.255.0"
"--gateway" "10.0.2.2"
- "--ipv6" "/servers/socket/16"))))
+ "--ipv6" "/servers/socket/16"))
+ ("proc" ("/hurd/procfs" "--stat-mode=444"))))
(define devices
'(("dev/full" ("/hurd/null" "--full") #o666)
@@ -232,17 +233,23 @@ set."
#o666)))
(for-each scope-set-translator servers)
- (mkdir* (scope "dev/vcs/1"))
- (mkdir* (scope "dev/vcs/2"))
- (mkdir* (scope "dev/vcs/2"))
- (rename-file (scope "/dev/console") (scope "/dev/console-"))
+ (mkdir* "dev/vcs/1")
+ (mkdir* "dev/vcs/2")
+ (mkdir* "dev/vcs/2")
+ (rename-file (scope "/dev/console") (scope "dev/console-"))
(for-each scope-set-translator devices)
(false-if-EEXIST (symlink "/dev/random" (scope "dev/urandom")))
- (mkdir* (scope "dev/fd"))
+ (mkdir* "dev/fd")
(false-if-EEXIST (symlink "/dev/fd/0" (scope "dev/stdin")))
(false-if-EEXIST (symlink "/dev/fd/1" (scope "dev/stdout")))
- (false-if-EEXIST (symlink "/dev/fd/2" (scope "dev/stderr"))))
+ (false-if-EEXIST (symlink "/dev/fd/2" (scope "dev/stderr")))
+
+ ;; Make sure /etc/mtab is a symlink to /proc/mounts.
+ (false-if-exception
+ (delete-file (scope "etc/mtab")))
+ (mkdir* (scope "etc"))
+ (symlink "/proc/mounts" (scope "etc/mtab")))
(define* (boot-hurd-system #:key (on-error 'debug))
diff --git a/guix/store/roots.scm b/guix/store/roots.scm
index 58653507f8..9b4a05b149 100644
--- a/guix/store/roots.scm
+++ b/guix/store/roots.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -197,9 +198,15 @@ or the empty list."
(string-append dir "/environ"))
(append-map rhs-file-names
- (split-on-nul
- (call-with-input-file environ
- get-string-all))))
+ (catch 'system-error
+ (lambda _
+ (split-on-nul
+ (call-with-input-file environ
+ get-string-all)))
+ (lambda args
+ (if (= EIO (system-error-errno args))
+ '()
+ (apply throw args))))))
(define (referenced-files)
"Return the list of referenced store items."
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
J
J
Jan (janneke) Nieuwenhuizen wrote on 25 Jun 2020 22:38
[PATCH 1/3] image: hurd: Create hurd-compatible ext2 file-system.
(address . 42047@debbugs.gnu.org)
20200625203850.25057-1-janneke@gnu.org
This is a follow-up to commit b904b59ce592c89dfb4675a8c06757afed6738a0.

* gnu/system/images/hurd.scm (hurd-disk-image): Add file-system-options to
create an ext2 file-system that is compatible with the Hurd.
---
gnu/system/images/hurd.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm
index 4417f03cc8..e5e120d49c 100644
--- a/gnu/system/images/hurd.scm
+++ b/gnu/system/images/hurd.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66,6 +67,7 @@
(offset root-offset)
(label root-label)
(file-system "ext2")
+ (file-system-options '("-o" "hurd" "-O" "ext_attr"))
(flags '(boot))
(initializer (gexp initialize-root-partition)))))))
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 25 Jun 2020 22:44
(name . Jan (janneke) Nieuwenhuizen)(address . janneke@gnu.org)(address . 42047@debbugs.gnu.org)
87y2oaq3jg.fsf@gnu.org
Hi,

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

Toggle quote (5 lines)
> This is a follow-up to commit b904b59ce592c89dfb4675a8c06757afed6738a0.
>
> * gnu/system/images/hurd.scm (hurd-disk-image): Add file-system-options to
> create an ext2 file-system that is compatible with the Hurd.

[...]

Toggle quote (6 lines)
> This is a follow-up to commit b904b59ce592c89dfb4675a8c06757afed6738a0.
>
> * gnu/system/image.scm (hurd-initialize-root-partition): Move to ...
> * gnu/system/images/hurd.scm (hurd-initialize-root-partition): ... here.
> (hurd-disk-image): Use it.

You can definitely push these two patches.

Breakage occurred as a result of the introduction of (gnu system images
hurd)?

If you know which commit introduced the regression, I think it’s useful
to mention it in the commit message.

Thank you!

Ludo’.
L
L
Ludovic Courtès wrote on 25 Jun 2020 22:48
Re: bug#42047: [PATCH 3/3] guix: gc: Support for the Hurd.
(name . Jan (janneke) Nieuwenhuizen)(address . janneke@gnu.org)(address . 42047@debbugs.gnu.org)
87pn9mq3bo.fsf@gnu.org
"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

Toggle quote (4 lines)
> * guix/store/roots.scm (proc-environ-roots): Handle EIO, for the Hurd.
> * gnu/build/hurd-boot.scm (set-hurd-device-translators): Mount /proc. Add
> symlink to /etc/mtab. Remove duplicate calls to 'scope'.

Nitpick: I see 3 mostly unrelated patches: (1) fix duplicate called to
‘scope’, (2) mount /proc, and (3) handle EIO. I think it’s clearer to
view them separately.

(1) and (2) LGTM!

Toggle quote (4 lines)
> - (mkdir* (scope "dev/vcs/1"))
> - (mkdir* (scope "dev/vcs/2"))
> - (mkdir* (scope "dev/vcs/2"))

Was it creating like /some/root/some/root/dev/vcs/1?

Toggle quote (14 lines)
> (append-map rhs-file-names
> - (split-on-nul
> - (call-with-input-file environ
> - get-string-all))))
> + (catch 'system-error
> + (lambda _
> + (split-on-nul
> + (call-with-input-file environ
> + get-string-all)))
> + (lambda args
> + (if (= EIO (system-error-errno args))
> + '()
> + (apply throw args))))))

This may be papering over a real problem. Before doing that, I think
“we” :-) should investigate why procfs returns EIO in some cases and
look into fixing it.

Then maybe we can still have the ‘catch’ above, but this time as a
temporary measure and with a reference to the upstream issue/commit.

WDYT?

Thank you!

Ludo’.
J
J
Jan Nieuwenhuizen wrote on 25 Jun 2020 22:53
Re: bug#42047: [PATCH 1/3] image: hurd: Create hurd-compatible ext2 file-system.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42047@debbugs.gnu.org)
87wo3ueuk8.fsf@gnu.org
Ludovic Courtès writes:

Hey Ludo',

Toggle quote (23 lines)
> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> This is a follow-up to commit b904b59ce592c89dfb4675a8c06757afed6738a0.
>>
>> * gnu/system/images/hurd.scm (hurd-disk-image): Add file-system-options to
>> create an ext2 file-system that is compatible with the Hurd.
>
> [...]
>
>> This is a follow-up to commit b904b59ce592c89dfb4675a8c06757afed6738a0.
>>
>> * gnu/system/image.scm (hurd-initialize-root-partition): Move to ...
>> * gnu/system/images/hurd.scm (hurd-initialize-root-partition): ... here.
>> (hurd-disk-image): Use it.
>
> You can definitely push these two patches.
>
> Breakage occurred as a result of the introduction of (gnu system images
> hurd)?
>
> If you know which commit introduced the regression, I think it’s useful
> to mention it in the commit message.

Yes, breakage occured in the mentioned commit above
(b904b59ce592c89dfb4675a8c06757afed6738a0)

Pushed the two fixups to master as 2463a78d17673581978debff6c6c9fce7966980a.

Now to look into "guix build", i'd like to fix that first before
considering "guix gc".

Thanks.
Janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
B
B
Bengt Richter wrote on 26 Jun 2020 00:25
Re: bug#42047: [PATCH 3/3] guix: gc: Support for the Hurd.
(name . Ludovic Courtès)(address . ludo@gnu.org)
20200625222504.GA6055@LionPure
On +2020-06-25 22:48:43 +0200, Ludovic Courtès wrote:
Toggle quote (34 lines)
> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
> > * guix/store/roots.scm (proc-environ-roots): Handle EIO, for the Hurd.
> > * gnu/build/hurd-boot.scm (set-hurd-device-translators): Mount /proc. Add
> > symlink to /etc/mtab. Remove duplicate calls to 'scope'.
>
> Nitpick: I see 3 mostly unrelated patches: (1) fix duplicate called to
> ‘scope’, (2) mount /proc, and (3) handle EIO. I think it’s clearer to
> view them separately.
>
> (1) and (2) LGTM!
>
> > - (mkdir* (scope "dev/vcs/1"))
> > - (mkdir* (scope "dev/vcs/2"))
> > - (mkdir* (scope "dev/vcs/2"))
>
> Was it creating like /some/root/some/root/dev/vcs/1?
>
> > (append-map rhs-file-names
> > - (split-on-nul
> > - (call-with-input-file environ
> > - get-string-all))))
> > + (catch 'system-error
> > + (lambda _
> > + (split-on-nul
> > + (call-with-input-file environ
> > + get-string-all)))
> > + (lambda args
> > + (if (= EIO (system-error-errno args))
> > + '()
> > + (apply throw args))))))
>
> This may be papering over a real problem. Before doing that, I think

I fear paperings-over ;) Would this idea be worth implementing?:

To make sure a "papering over" does not remain un-noticed in an executable,
create a catch-wrapping macro that would generate code acting like catch but
before entering catch, start emitting complaint messages on and
after a calendar date, e.g. checked with (> (car (gettimeofday)) *macro-produced-date-constant*)

E.g., something to use in place of catch, like (borrowing above for example)
(catch-with-sunset "date-string" "complaint-message"
'system-error
(lambda _
(split-on-nul
...etc...
(apply throw args))))

"complaint-message" could obviously contain bug#number, commit id, or plea for report, etc.

(gettimeofday) on my machine is about 50ns (i.e., often get 20 equal values within the microsecond resolution),
so there shouldn't be a performance hit ;)

Toggle quote (15 lines)
> “we” :-) should investigate why procfs returns EIO in some cases and
> look into fixing it.
>
> Then maybe we can still have the ‘catch’ above, but this time as a
> temporary measure and with a reference to the upstream issue/commit.
>
> WDYT?
>
> Thank you!
>
> Ludo’.
>
>
>

--
Regards,
Bengt Richter
J
J
Jan Nieuwenhuizen wrote on 26 Jun 2020 10:27
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42047@debbugs.gnu.org)
87d05m9qpx.fsf@gnu.org
Ludovic Courtès writes:

Hello,

A new day!

Toggle quote (10 lines)
> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> * guix/store/roots.scm (proc-environ-roots): Handle EIO, for the Hurd.
>> * gnu/build/hurd-boot.scm (set-hurd-device-translators): Mount /proc. Add
>> symlink to /etc/mtab. Remove duplicate calls to 'scope'.
>
> Nitpick: I see 3 mostly unrelated patches: (1) fix duplicate called to
> ‘scope’, (2) mount /proc, and (3) handle EIO. I think it’s clearer to
> view them separately.

Yes, I agree. I will split into 3 patches.

(Initially my plan was to post a DRAFT/RFC for (3) that would either fix
"guix gc", or show us the next error. Then I needed the other two and
found there was yet another problem...)

Toggle quote (6 lines)
>> - (mkdir* (scope "dev/vcs/1"))
>> - (mkdir* (scope "dev/vcs/2"))
>> - (mkdir* (scope "dev/vcs/2"))
>
> Was it creating like /some/root/some/root/dev/vcs/1?

No... "just" //dev/vcs/1. However, in my bare-iron experiments I
stumbled upon several "Not a directory", so...just being careful here.

Toggle quote (18 lines)
>> (append-map rhs-file-names
>> - (split-on-nul
>> - (call-with-input-file environ
>> - get-string-all))))
>> + (catch 'system-error
>> + (lambda _
>> + (split-on-nul
>> + (call-with-input-file environ
>> + get-string-all)))
>> + (lambda args
>> + (if (= EIO (system-error-errno args))
>> + '()
>> + (apply throw args))))))
>
> This may be papering over a real problem. Before doing that, I think
> “we” :-) should investigate why procfs returns EIO in some cases and
> look into fixing it.

Sure, let "us" look into that! :)

Toggle quote (5 lines)
> Then maybe we can still have the ‘catch’ above, but this time as a
> temporary measure and with a reference to the upstream issue/commit.
>
> WDYT?

Sure, thanks.

So...I think that I found the problem: Using guile-3.0.[34]. This patch

Toggle snippet (23 lines)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index a32bd33293..b191a7b93b 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -312,14 +312,14 @@ without requiring the source code to be rewritten.")
;; TODO: Make this 'guile-3.0' on the next rebuild cycle.
(package
(inherit guile-3.0)
- (version "3.0.4")
+ (version "3.0.2")
(source (origin
(inherit (package-source guile-3.0))
(uri (string-append "mirror://gnu/guile/guile-"
version ".tar.xz"))
(sha256
(base32
- "0c8dkyvs6xbxp7rgnhkyakajzhakay7qn9kahj1mj49x5vf4fybb"))))))
+ "12lziar4j27j9whqp2n18427q45y9ghq7gdd8lqhmj1k0lr7vi2k"))))))
(define-public guile-next
(deprecated-package "guile-next" guile-3.0))

fixes guix build...(terrible!) What shall "we" do with this, maybe
"someone" wants to have a look? Guess this should find its way into a
Guile bug report?

[later...]

I checked-out guile master on Debian/Hurd and ran the Guile test suite,
which (apart from known failures) passed. Leaving that for now.

So, then it "must" be our cross-compiled guile-3.0.4 for the Hurd; best
to check that, right? Look:

Toggle snippet (85 lines)
root@guixydevel ~/guile# ./check-guile -i /run/current-system/profile/bin/guile
Testing /run/current-system/profile/bin/guile ...
with GUILE_LOAD_PATH=/root/guile/test-suite:/run/current-system/profile/share/guile/site/3.0
WARNING: Use of `load' in declarative module (test-suite guile-test). Add #:declarative? #f to your define-module invocation.
Running 00-initial-env.test
Running 00-repl-server.test
Running 00-socket.test
UNRESOLVED: 00-socket.test: AF_INET6/SOCK_STREAM: bind
UNRESOLVED: 00-socket.test: AF_INET6/SOCK_STREAM: bind/sockaddr
UNRESOLVED: 00-socket.test: AF_INET6/SOCK_STREAM: listen
UNRESOLVED: 00-socket.test: AF_INET6/SOCK_STREAM: connect
UNRESOLVED: 00-socket.test: AF_INET6/SOCK_STREAM: connect/sockaddr
UNRESOLVED: 00-socket.test: AF_INET6/SOCK_STREAM: accept
[...]
Running asyncs.test
ERROR: asyncs.test: preemption via sigprof - arguments: ((system-error "setitimer" "~A" ("Function not implemented") (1073741902)))
[...]
Running bytevectors.test
FAIL: bytevectors.test: 2.8 Operations on IEEE-754 Representations: bytevector-ieee-single-native-{ref,set!} (compile -O2)
FAIL: bytevectors.test: 2.8 Operations on IEEE-754 Representations: bytevector-ieee-double-native-{ref,set!} (compile -O2)
[...]
Running ftw.test
ERROR: ftw.test: file-system-fold: test-suite - arguments: ((match-error "match" "no matching pattern" ((error "/tmp/guix-build-guile-3.0.4.drv-0/guile-3.0.4/test-suite"))))
FAIL: ftw.test: file-system-fold: test-suite (never enter) - arguments: (expected-value ((skip "/tmp/guix-build-guile-3.0.4.drv-0/guile-3.0.4/test-suite")) actual-value ((error "/tmp/guix-build-guile-3.0.4.drv-0/guile-3.0.4/test-suite")))
FAIL: ftw.test: file-system-fold: test-suite/lib.scm (flat file) - arguments: (expected-value ((leaf "/tmp/guix-build-guile-3.0.4.drv-0/guile-3.0.4/test-suite/test-suite/lib.scm")) actual-value ((error "/tmp/guix-build-guile-3.0.4.drv-0/guile-3.0.4/test-suite/test-suite/lib.scm")))
UNRESOLVED: ftw.test: file-system-fold: EACCES
ERROR: ftw.test: file-system-tree: test-suite (never enter) - arguments: ((match-error "match" "no matching pattern" #f))
ERROR: ftw.test: file-system-tree: test-suite/* - arguments: ((match-error "match" "no matching pattern" #f))
ERROR: ftw.test: file-system-tree: test-suite (recursive) - arguments: ((match-error "match" "no matching pattern" #f))
ERROR: ftw.test: scandir: top-srcdir - arguments: ((match-error "match" "no matching pattern" #f))
ERROR: ftw.test: scandir: test-suite - arguments: ((match-error "match" "no matching pattern" #f))
FAIL: ftw.test: scandir: no select
Running popen.test
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /root/guile/module/ice-9/command-line.scm
;;; compiling /root/guile/module/system/base/compile.scm
;;; it seems /root/guile/module/system/base/compile.scm
;;; is part of the compiler; skipping auto-compilation
;;; compiling /root/guile/module/system/base/language.scm
;;; WARNING: compilation of /root/guile/module/system/base/language.scm failed:
;;; In procedure variable-ref: variable is unbound: #<variable 3882d0 value: #<undefined>>
;;; compiling /root/guile/module/system/base/syntax.scm
[hmm?]
Running ports.test
ERROR: ports.test: %file-port-name-canonicalization: absolute canonicalization from ice-9 - arguments: ((system-error "canonicalize-path" "~A" ("No such file or directory") (1073741826)))
[...]
Running signals.test
ERROR: signals.test: setitimer: current itimers are 0: ITIMER_VIRTUAL - arguments: ((system-error "setitimer" "~A" ("Function not implemented") (1073741902)))
ERROR: signals.test: setitimer: current itimers are 0: ITIMER_PROF - arguments: ((system-error "setitimer" "~A" ("Function not implemented") (1073741902)))
ERROR: signals.test: setitimer: setting values correctly: initial setting - arguments: ((system-error "setitimer" "~A" ("Function not implemented") (1073741902)))
ERROR: signals.test: setitimer: setting values correctly: reset to zero - arguments: ((system-error "setitimer" "~A" ("Function not implemented") (1073741902)))
ERROR: signals.test: setitimer: usecs > 1e6: initial setting - arguments: ((system-error "setitimer" "~A" ("Function not implemented") (1073741902)))
ERROR: signals.test: setitimer: usecs > 1e6: reset to zero - arguments: ((system-error "setitimer" "~A" ("Function not implemented") (1073741902)))
[...]
Running srfi-18.test
FAIL: srfi-18.test: thread-sleep!: thread sleeps fractions of a second
[...]
Running srfi-4.test
FAIL: srfi-4.test: f32 vectors: f32vector-ref
FAIL: srfi-4.test: f32 vectors: f32vector-set!/ref
FAIL: srfi-4.test: f32 vectors: f32vector->list/array->list
FAIL: srfi-4.test: f64 vectors: f64vector-ref
FAIL: srfi-4.test: f64 vectors: f64vector-set!/ref
FAIL: srfi-4.test: f64 vectors: f64vector->list/array->list
FAIL: srfi-4.test: c32 vectors: c32vector-ref
FAIL: srfi-4.test: c32 vectors: c32vector-set!/ref
FAIL: srfi-4.test: c32 vectors: c32vector->list/array->list
FAIL: srfi-4.test: c32 vectors: array-ref
FAIL: srfi-4.test: c64 vectors: c64vector-ref
FAIL: srfi-4.test: c64 vectors: c64vector-set!/ref
FAIL: srfi-4.test: c64 vectors: c64vector->list/list->c64vector
FAIL: srfi-4.test: c64 vectors: c64vector->list/array->list
FAIL: srfi-4.test: c64 vectors: array-ref
[...]
Running suspendable-ports.test
warning: call to primitive-fork while multiple threads are running;
further behavior unspecified. See "Processes" in the
manual, for more information.
ERROR: suspendable-ports.test: %file-port-name-canonicalization: absolute canonicalization from ice-9 - arguments: ((system-error "canonicalize-path" "~A" ("No such file or directory") (1073741826)))
[...]
Running weaks.test
ERROR: weaks.test: weak-hash: assoc can do anything - arguments: ((out-of-range #f "Value out of range ~S to ~S: ~S" (1 4294967295 18446744073709551615) (18446744073709551615)))

Some of these are "known" and I didn't run a "baseline" using 3.0.2
(which works). However the srfi-4 and bytevector look real bad to me.

(FTW could also be real bad, but running "find-files" from (guix build
utils) by hand just works; looks like a compilation-time file name
problem with the/how I ran the/ test-suite.?)

Greetings,
Janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 26 Jun 2020 17:46
Re: bug#42047: [PATCH 0/3] Running guix gc on the Hurd.
(name . Jan (janneke) Nieuwenhuizen)(address . janneke@gnu.org)(address . 42047@debbugs.gnu.org)
87tuyxn83n.fsf@gnu.org
"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

Toggle quote (20 lines)
> With these two fixes, it boots again. These are really minor fixes/typo-like
> oversights and I was considering to "just push" them... but then I found that
> the "guix build" command is also broken:
>
> root@guixygnu ~# guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
> Backtrace:
> In ice-9/boot-9.scm:
> 1736:10 4 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
> 3 (apply-smob/0 #<thunk 2d5380>)
> In ice-9/boot-9.scm:
> 718:2 2 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
> In ice-9/eval.scm:
> 619:8 1 (_ #(#(#<directory (guile-user) 2cc820>)))
> In guix/ui.scm:
> 1948:12 0 (run-guix-command _ . _)
>
> guix/ui.scm:1948:12: In procedure run-guix-command:
> In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f

For the record, janneke found that this was cause by ‘open-connection’
returning #f; that, in turn, happened due to a bug introduced in Guile
3.0.4:


Guix commit 641631c1a2590acb1778ebb7b3a141beb8e7448b solves this
problem.

Ludo’.
J
J
Jan Nieuwenhuizen wrote on 27 Jun 2020 13:25
[PATCH v2] guix: gc: Support for the Hurd.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42047@debbugs.gnu.org)
87eeq0wy1y.fsf_-_@gnu.org
Jan Nieuwenhuizen writes:

Hello,

Toggle quote (6 lines)
>> Nitpick: I see 3 mostly unrelated patches: (1) fix duplicate called to
>> ‘scope’, (2) mount /proc, and (3) handle EIO. I think it’s clearer to
>> view them separately.

> Yes, I agree. I will split into 3 patches.

I have split and pushed the trivial hurd-boot patches as
65d95e5d852e47343b9acc1717918c9db7364c01

Toggle quote (20 lines)
>>> (append-map rhs-file-names
>>> - (split-on-nul
>>> - (call-with-input-file environ
>>> - get-string-all))))
>>> + (catch 'system-error
>>> + (lambda _
>>> + (split-on-nul
>>> + (call-with-input-file environ
>>> + get-string-all)))
>>> + (lambda args
>>> + (if (= EIO (system-error-errno args))
>>> + '()
>>> + (apply throw args))))))
>>
>> This may be papering over a real problem. Before doing that, I think
>> “we” :-) should investigate why procfs returns EIO in some cases and
>> look into fixing it.
>
> Sure, let "us" look into that! :)

I have (with some kind fixup help from Marius) created a gdb-minimal
package that cross-builds and works on the Hurd. I tried to gain
insight by attaching to guix-daemon or just running guix-daemon in gdb,
but it does not seem to run under gdb; but that could be my
inexperience. I'm only getting mig/ipc or thread messages...

So...attached is a pretty blunt hack that does "fix" guix gc. Where the
above "tried" to paper over the problem, "catch #t" is the only thing I
could get to actually work.

I'm really puzzled here. This

Toggle snippet (12 lines)
(append-map rhs-file-names
(split-on-nul
(catch #t ;;'system-error
(lambda _
(call-with-input-file environ
get-string-all))
(lambda args
(format (current-error-port) "KETS: args=~s\n" args)
(format (current-error-port) "sys: ~s\n" (system-error-errno args))
""))))

gives

Toggle snippet (40 lines)
KETS: args=(r6rs:exception #<r6rs:record:&raise-object-wrapper>)
sys: #f
Backtrace:
19 (apply-smob/1 #<catch-closure 4003b0>)
In ice-9/boot-9.scm:
705:2 18 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
619:8 17 (_ #(#(#<directory (guile-user) 3ec910>)))
In guix/ui.scm:
1948:12 16 (run-guix-command _ . _)
In ice-9/boot-9.scm:
829:9 15 (catch _ _ #<procedure 5f5df8 at guix/ui.scm:662:2 (key c)> _)
829:9 14 (catch _ _ #<procedure 5f5e08 at guix/ui.scm:796:6 (key proc format-string format-args . rest)> _)
In guix/scripts/gc.scm:
280:14 13 (_)
In guix/store/roots.scm:
290:39 12 (busy-store-items)
madvise failed: Function not implemented
In srfi/srfi-1.scm:
679:15 11 (append-map _ _ . _)
592:29 10 (map1 _)
592:29 9 (map1 _)
592:29 8 (map1 _)
592:29 7 (map1 _)
592:29 6 (map1 ("5" "6" "7" "9" "10" "12" "19" "23" "24" "25" "26" "27" "42" "93" "95" "109" "197" "503" …))
592:29 5 (map1 ("6" "7" "9" "10" "12" "19" "23" "24" "25" "26" "27" "42" "93" "95" "109" "197" "503" "5…" …))
592:29 4 (map1 ("7" "9" "10" "12" "19" "23" "24" "25" "26" "27" "42" "93" "95" "109" "197" "503" "516" # …))
592:17 3 (map1 ("9" "10" "12" "19" "23" "24" "25" "26" "27" "42" "93" "95" "109" "197" "503" "516" "538" …))
In ice-9/boot-9.scm:
829:9 2 (catch system-error #<procedure 3846800 at guix/store/roots.scm:254:20 ()> #<procedure 3d28048 a…> …)
In guix/store/roots.scm:
259:30 1 (_)
204:15 0 (proc-environ-roots _)

guix/store/roots.scm:204:15: In procedure proc-environ-roots:
ERROR: R6RS exception:
1. &i/o-read
2. &i/o-port: #<input: /proc/9/environ 13>

which shows 'system-error as well as conditions. But using "catch
'system-error' or even

Toggle snippet (16 lines)
(append-map rhs-file-names
(split-on-nul
(guard (c (else ;;(i/o-read-error? c)
(format #t "KETS\n")
(format (current-error-port) "KETS\n")
(format (current-error-port) "~a: ignoring EIO: Good luck!\n" environ)
"")
;; (#t
;; (format (current-error-port) "~a: DUNNO\n" c)
;; "")
)
(format (current-error-port) "gonna call\n")
(call-with-input-file environ
get-string-all))))

shows no debug printing at all except "gonna call", and the
exception/condition/raisy-thing somehow "escapes".

Greetings,
Janneke
From 751423e35e9b4b30e066de9ae6305748fd8f3b0d Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
Date: Thu, 25 Jun 2020 17:07:25 +0200
Subject: [PATCH v2] guix: gc: Support for the Hurd.

* guix/store/roots.scm (proc-environ-roots): Handle EIO, for the Hurd.
---
guix/store/roots.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

Toggle diff (40 lines)
diff --git a/guix/store/roots.scm b/guix/store/roots.scm
index 58653507f8..ad4f111b79 100644
--- a/guix/store/roots.scm
+++ b/guix/store/roots.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,9 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
+ #:use-module (rnrs exceptions)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 rdelim)
@@ -198,8 +202,13 @@ or the empty list."
(append-map rhs-file-names
(split-on-nul
- (call-with-input-file environ
- get-string-all))))
+ (catch #t
+ (lambda _
+ (call-with-input-file environ
+ get-string-all))
+ (lambda args
+ (format (current-error-port) "~a: ignoring EIO: Good luck!\n" environ)
+ "")))))
(define (referenced-files)
"Return the list of referenced store items."
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 28 Jun 2020 16:31
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)(address . 42047@debbugs.gnu.org)
87k0zri7nn.fsf@gnu.org
Hi,

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (18 lines)
> I'm really puzzled here. This
>
> (append-map rhs-file-names
> (split-on-nul
> (catch #t ;;'system-error
> (lambda _
> (call-with-input-file environ
> get-string-all))
> (lambda args
> (format (current-error-port) "KETS: args=~s\n" args)
> (format (current-error-port) "sys: ~s\n" (system-error-errno args))
> ""))))
>
>
> gives
>
> KETS: args=(r6rs:exception #<r6rs:record:&raise-object-wrapper>)

Ah yes, it’s really an R6RS condition here, not 'system-error, because
we’re using ‘get-string-all’ (from R6RS). So we’d need to use ‘guard’
and the R6RS I/O error predicate.

But I do think we should take a closer look at procfs; we’ll have to fix
it anyway, and it’s relatively little code, so the sooner the better
IMO. As discussed yesterday on IRC, gdb is a somewhat flaky, so perhaps
we can try (cross)building procfs and with a bunch of printfs, and then
starting it as an active translator so it has stdout/stderr. High tech! :-)

Thanks,
Ludo’.
?