unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Bengt Richter <bokr@bokr.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 42047@debbugs.gnu.org
Subject: bug#42047: [PATCH 3/3] guix: gc: Support for the Hurd.
Date: Fri, 26 Jun 2020 00:25:04 +0200	[thread overview]
Message-ID: <20200625222504.GA6055@LionPure> (raw)
In-Reply-To: <87pn9mq3bo.fsf@gnu.org>

On +2020-06-25 22:48:43 +0200, Ludovic Courtès wrote:
> "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 ;)

> “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




  reply	other threads:[~2020-06-25 22: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 [this message]
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   ` bug#42047: [PATCH v2] " Jan Nieuwenhuizen
2020-06-28 14:31     ` 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=20200625222504.GA6055@LionPure \
    --to=bokr@bokr.com \
    --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).