From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 42047@debbugs.gnu.org
Subject: bug#42047: [PATCH v2] guix: gc: Support for the Hurd.
Date: Sat, 27 Jun 2020 13:25:13 +0200 [thread overview]
Message-ID: <87eeq0wy1y.fsf_-_@gnu.org> (raw)
In-Reply-To: <87d05m9qpx.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 26 Jun 2020 10:27:38 +0200")
[-- Attachment #1: Type: text/plain, Size: 5169 bytes --]
Jan Nieuwenhuizen writes:
Hello,
>> 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
>>> (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
--8<---------------cut here---------------start------------->8---
(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))
""))))
--8<---------------cut here---------------end--------------->8---
gives
--8<---------------cut here---------------start------------->8---
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>
--8<---------------cut here---------------end--------------->8---
which shows 'system-error as well as conditions. But using "catch
'system-error' or even
--8<---------------cut here---------------start------------->8---
(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))))
--8<---------------cut here---------------end--------------->8---
shows no debug printing at all except "gonna call", and the
exception/condition/raisy-thing somehow "escapes".
Greetings,
Janneke
[-- Attachment #2: v2-0001-guix-gc-Support-for-the-Hurd.patch --]
[-- Type: text/x-patch, Size: 1848 bytes --]
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(-)
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
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2020-06-27 11:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 20:34 bug#42047: [PATCH 0/3] Running guix gc on the Hurd Jan (janneke) Nieuwenhuizen
2020-06-25 20:38 ` bug#42047: [PATCH 1/3] image: hurd: Create hurd-compatible ext2 file-system Jan (janneke) Nieuwenhuizen
2020-06-25 20:38 ` bug#42047: [PATCH 2/3] image: hurd: Initialize root partition for the Hurd Jan (janneke) Nieuwenhuizen
2020-06-25 20:38 ` bug#42047: [PATCH 3/3] guix: gc: Support " Jan (janneke) Nieuwenhuizen
2020-06-25 20:48 ` Ludovic Courtès
2020-06-25 22:25 ` Bengt Richter
2020-06-25 20:44 ` bug#42047: [PATCH 1/3] image: hurd: Create hurd-compatible ext2 file-system Ludovic Courtès
2020-06-25 20:53 ` Jan Nieuwenhuizen
2020-06-26 8:27 ` bug#42047: [PATCH 3/3] guix: gc: Support for the Hurd Jan Nieuwenhuizen
2020-06-27 11:25 ` Jan Nieuwenhuizen [this message]
2020-06-28 14:31 ` bug#42047: [PATCH v2] " Ludovic Courtès
2020-06-26 15:46 ` bug#42047: [PATCH 0/3] Running guix gc on " Ludovic Courtès
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=87eeq0wy1y.fsf_-_@gnu.org \
--to=janneke@gnu.org \
--cc=42047@debbugs.gnu.org \
--cc=ludo@gnu.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).