unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: Removing corrupted items from a mirror
Date: Sun, 24 Jul 2016 23:18:20 +0200	[thread overview]
Message-ID: <87fuqyag6b.fsf@gnu.org> (raw)
In-Reply-To: <20160724002620.GC26863@jasmine> (Leo Famulari's message of "Sat, 23 Jul 2016 20:26:20 -0400")

Hi!

Leo Famulari <leo@famulari.name> skribis:

> My question is: How can I remove this corrupted file from the mirror? I
> don't know how to figure the name of the file to remove.

So first, note that there’s a narinfo cache in
/var/guix/substitute/cache.  First step is to rm -rf that.

Next, you can remove all the narinfo cache of your nginx instance.  If
that’s unreasonable, you can find the file corresponding to the faulty
narinfo by grepping it in the nginx cache.  So in your case:

> Found valid signature for /gnu/store/vsrcn35rjpgrrak1w31m7yhc12zz3hd1-coreutils-8.24
> From https://my-mirror/nar/vsrcn35rjpgrrak1w31m7yhc12zz3hd1-coreutils-8.24

… you would:

  cd /var/cache/nginx/narinfo
  grep -r vsrcn35rjpgrrak1w31m7yhc12zz3hd1 .
  rm the-file-that-matches

Not very convenient!

I realize I’m answering a slightly different question, because your
problem is:

> @ substituter-failed /gnu/store/vsrcn35rjpgrrak1w31m7yhc12zz3hd1-coreutils-8.24 0 hash mismatch in downloaded path `/gnu/store/vsrcn35rjpgrrak1w31m7yhc12zz3hd1-coreutils-8.24': expected a91641b020926f42d7dcbe6e9d82be3b5d39f401b7328ea6d0cd79f7893aabb0, got fc8cf24465d8a97fef7cc41dfccddca158b6258ad0e0929e002552d258dec7da

That is, you got a binary whose content do not match what the narinfo
advertises.

That can happen with non-deterministic build processes, which I think is
the case with Coreutils.  Namely, we can have this scenario:

  1. nginx caches the narinfo for coreutils, which contains the hash of
     a first build;

  2. first build is removed from the machine that nginx mirrors;

  3. a second build is performed on that machine, leading different
     contents (different hash);

  4. Guix client requests coreutils binary, gets narinfo with old hash
     and contents with new hash, and errors out.

I’ve never seen this happen on mirror.hydra.gnu.org, but anyway, our
best protection is reproducible builds.

In the meantime, removing the old narinfo from nginx’s cache would help.

HTH!

Ludo’.

      parent reply	other threads:[~2016-07-24 21:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-24  0:26 Removing corrupted items from a mirror Leo Famulari
2016-07-24  7:58 ` Efraim Flashner
2016-07-24 21:18 ` Ludovic Courtès [this message]

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=87fuqyag6b.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    /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).