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 #) sys: #f Backtrace: 19 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 18 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 17 (_ #(#(#))) In guix/ui.scm: 1948:12 16 (run-guix-command _ . _) In ice-9/boot-9.scm: 829:9 15 (catch _ _ # _) 829:9 14 (catch _ _ # _) 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 # # …) 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: # --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