From: ludo@gnu.org (Ludovic Courtès)
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Hash mismatch for Python 2.7.10 (x86_64-linux)
Date: Mon, 21 Mar 2016 18:22:24 +0100 [thread overview]
Message-ID: <87lh5b690v.fsf_-_@gnu.org> (raw)
In-Reply-To: <20160321154731.GB26140@jasmine> (Leo Famulari's message of "Mon, 21 Mar 2016 11:47:31 -0400")
Leo Famulari <leo@famulari.name> skribis:
> Can you take a look at python-2.7.10?
>
> Specifically, /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10
>
> This is from "ifur" on #guix:
> http://paste.lisp.org/display/311051
This is an “interesting” case. There’s indeed a hash mismatch between
that narinfo and the nar (hydra.gnu.org and mirror.guixsd.org provide
the exact same narinfo and nar though):
--8<---------------cut here---------------start------------->8---
$ wget -q -O - https://hydra.gnu.org/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv.narinfo |grep Hash
NarHash: sha256:1ifhxz7ng64ckrsfp0cy6rcybwrdf2mgq7p9w73ynbwy1w2frhp5
$ wget -q -O - https://hydra.gnu.org/nar/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10 | bunzip2 | guix hash /dev/stdin
1rb34mfv32zj6ir9nkrmw2mrc00n2gf9p2chihh1qpl9fmsxhhif
$ guix hash -r /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10
1ifhxz7ng64ckrsfp0cy6rcybwrdf2mgq7p9w73ynbwy1w2frhp5
--8<---------------cut here---------------end--------------->8---
To spot the differences, I did:
--8<---------------cut here---------------start------------->8---
$ wget -O - https://mirror.guixsd.org/nar/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10 | bunzip2 | guix archive -x /tmp/python
$ diff -ur --no-dereference /tmp/python /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10
Binary files /tmp/python/lib/python2.7/_abcoll.pyc and /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/_abcoll.pyc differ
Binary files /tmp/python/lib/python2.7/abc.pyc and /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/abc.pyc differ
Binary files /tmp/python/lib/python2.7/codecs.pyc and /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/codecs.pyc differ
Binary files /tmp/python/lib/python2.7/copy_reg.pyc and /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/copy_reg.pyc differ
Binary files /tmp/python/lib/python2.7/encodings/aliases.pyc and /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/encodings/aliases.pyc differ
Binary files /tmp/python/lib/python2.7/encodings/__init__.pyc and /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/encodings/__init__.pyc differ
Binary files /tmp/python/lib/python2.7/encodings/utf_8.pyc and /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/encodings/utf_8.pyc differ
[...]
$ diffoscope --html t.html /tmp/python/lib/python2.7 /gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10/lib/python2.7/
--8<---------------cut here---------------end--------------->8---
Diffoscope shows several hundred of bytes of differences in several .pyc
files (so it’s not just 32-byte timestamps as discussed in
<http://bugs.gnu.org/22010>, IIRC.)
That the differences are so important is fishy. Could you check what
you have on your machine? Is anyone able to make an independent build
of this thing?
For non-deterministic packages, something that could in theory happen
(although it seems unlikely) is this:
1. nginx caches the narinfo of a first build with hash X;
2. nobody downloads the corresponding nar, and the result is
eventually GC’d from hydra;
3. Hydra rebuilds the thing, obtains hash Y; the nar with hash Y is
downloaded and cached by nginx, but, no luck, it doesn’t match the
hash in the narinfo that was cached in step #1.
That could happen, but it seems pretty far-fetched, especially for a
package like Python.
On my machine I looked for the corresponding “derivers”:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(guix)
scheme@(guile-user)> (define s (open-connection))
scheme@(guile-user)> (valid-derivers s "/gnu/store/4bs4mx6xyx0jx9827vmmbxyhjln7cmcv-python-2.7.10")
$4 = ("/gnu/store/a5s3mkl387wwkklj3ss5hw34ib9rb2p6-python-2.7.10.drv" "/gnu/store/pvsdsjn15rj1ciwr37vl2vqprvl57szg-python-2.7.10.drv")
--8<---------------cut here---------------end--------------->8---
And then run:
--8<---------------cut here---------------start------------->8---
$ guix build "/gnu/store/pvsdsjn15rj1ciwr37vl2vqprvl57szg-python-2.7.10.drv" --check
--8<---------------cut here---------------end--------------->8---
However that’s not very helpful since it unsurprisingly fails with a
“may not be deterministic” error.
Ludo’.
next prev parent reply other threads:[~2016-03-21 17:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-19 15:25 libcap: bzip2: Compressed file ends unexpectedly on http://mirror.guixsd.org Pjotr Prins
2016-03-19 15:30 ` Pjotr Prins
2016-03-19 21:15 ` Ludovic Courtès
2016-03-20 4:25 ` Pjotr Prins
2016-03-19 15:30 ` Leo Famulari
2016-03-19 21:22 ` Ludovic Courtès
2016-03-20 15:40 ` Pjotr Prins
2016-03-20 16:12 ` Pjotr Prins
2016-03-20 16:13 ` Pjotr Prins
2016-03-20 20:46 ` Ludovic Courtès
2016-03-21 15:47 ` Leo Famulari
2016-03-21 16:51 ` Ricardo Wurmus
2016-03-22 19:07 ` Leo Famulari
2016-03-22 19:13 ` Leo Famulari
2016-03-25 23:05 ` Ludovic Courtès
2016-03-21 17:22 ` Ludovic Courtès [this message]
2016-04-02 21:11 ` Hash mismatch for Python 2.7.10 (x86_64-linux) Ben Woodcroft
2016-04-04 20:13 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lh5b690v.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.