From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UKqbFNMs917ceQAA0tVLHw (envelope-from ) for ; Sat, 27 Jun 2020 11:26:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sJyJENMs915qfwAA1q6Kng (envelope-from ) for ; Sat, 27 Jun 2020 11:26:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A9A119401AE for ; Sat, 27 Jun 2020 11:26:10 +0000 (UTC) Received: from localhost ([::1]:47292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jp8yH-00054z-36 for larch@yhetil.org; Sat, 27 Jun 2020 07:26:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jp8yA-00054r-C0 for bug-guix@gnu.org; Sat, 27 Jun 2020 07:26:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jp8yA-0006Vl-3A for bug-guix@gnu.org; Sat, 27 Jun 2020 07:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jp8yA-0005g6-0E for bug-guix@gnu.org; Sat, 27 Jun 2020 07:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42047: [PATCH v2] guix: gc: Support for the Hurd. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 27 Jun 2020 11:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42047 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 42047-submit@debbugs.gnu.org id=B42047.159325712921787 (code B ref 42047); Sat, 27 Jun 2020 11:26:01 +0000 Received: (at 42047) by debbugs.gnu.org; 27 Jun 2020 11:25:29 +0000 Received: from localhost ([127.0.0.1]:43561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jp8xc-0005fK-KB for submit@debbugs.gnu.org; Sat, 27 Jun 2020 07:25:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jp8xZ-0005f6-Gd for 42047@debbugs.gnu.org; Sat, 27 Jun 2020 07:25:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55686) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jp8xS-0006OG-Rv; Sat, 27 Jun 2020 07:25:18 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=54904 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jp8xQ-0006gI-M2; Sat, 27 Jun 2020 07:25:17 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200625203850.25057-1-janneke@gnu.org> <20200625203850.25057-3-janneke@gnu.org> <87pn9mq3bo.fsf@gnu.org> <87d05m9qpx.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sat, 27 Jun 2020 13:25:13 +0200 In-Reply-To: <87d05m9qpx.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 26 Jun 2020 10:27:38 +0200") Message-ID: <87eeq0wy1y.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42047@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.49 X-TUID: bauVs5am2eR9 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jan Nieuwenhuizen writes: Hello, >> Nitpick: I see 3 mostly unrelated patches: (1) fix duplicate called to >> =E2=80=98scope=E2=80=99, (2) mount /proc, and (3) handle EIO. I think i= t=E2=80=99s 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 (=3D EIO (system-error-errno args)) >>> + '() >>> + (apply throw args)))))) >> >> This may be papering over a real problem. Before doing that, I think >> =E2=80=9Cwe=E2=80=9D :-) should investigate why procfs returns EIO in so= me 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=3D~s\n" args) (format (current-error-port) "sys: ~s\n" (system-error-e= rrno args)) "")))) --8<---------------cut here---------------end--------------->8--- gives --8<---------------cut here---------------start------------->8--- KETS: args=3D(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" =E2=80=A6)) 592:29 5 (map1 ("6" "7" "9" "10" "12" "19" "23" "24" "25" "26" "27" "42= " "93" "95" "109" "197" "503" "5=E2=80=A6" =E2=80=A6)) 592:29 4 (map1 ("7" "9" "10" "12" "19" "23" "24" "25" "26" "27" "42" "9= 3" "95" "109" "197" "503" "516" # =E2=80=A6)) 592:17 3 (map1 ("9" "10" "12" "19" "23" "24" "25" "26" "27" "42" "93" "= 95" "109" "197" "503" "516" "538" =E2=80=A6)) In ice-9/boot-9.scm: 829:9 2 (catch system-error # # =E2=80=A6) 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: Go= od 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 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=v2-0001-guix-gc-Support-for-the-Hurd.patch Content-Transfer-Encoding: quoted-printable >From 751423e35e9b4b30e066de9ae6305748fd8f3b0d Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" 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 =C2=A9 2012, 2013, 2014, 2017, 2019 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; 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." =20 (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 lu= ck!\n" environ) + ""))))) =20 (define (referenced-files) "Return the list of referenced store items." --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--