[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19512: Failed substitution yields incomplete store item
From: |
Ludovic Courtès |
Subject: |
bug#19512: Failed substitution yields incomplete store item |
Date: |
Mon, 05 Jan 2015 16:28:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
David Thompson <address@hidden> skribis:
> While working on 'guix publish', I managed to mess up the store. :(
>
> Here's the first substitution that failed due to an invalid eof marker
> for some reason:
>
> address@hidden ~$ sudo
> _NIX_OPTIONS="substitute-urls=http://192.168.1.157:8080" guix
> substitute-binary --substitute
> /gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0
> /tmp/guile-toxcore
>
> found valid signature for
> '/gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0', from
> 'http://192.168.1.157:8080/nar/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0'
> sha256:xl35awxl6kgl5b2eum7kfgqlnap7a7itczpyxptf4kq25pasafka
> downloading
> `/gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0' (0.1
> MiB installed)...
>
> http://192.168.1.157/.../iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0
> 100.0% of 127.5 KiBguix substitute-binary: error: invalid nar
> end-of-file marker
>
>
> When the same command is run again, there's a new error:
>
> address@hidden ~$ sudo
> _NIX_OPTIONS="substitute-urls=http://192.168.1.157:8080" guix
> substitute-binary --substitute
> /gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0
> /tmp/guile-toxcore
>
> found valid signature for
> '/gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0', from
> 'http://192.168.1.157:8080/nar/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0'
> sha256:xl35awxl6kgl5b2eum7kfgqlnap7a7itczpyxptf4kq25pasafka
> downloading
> `/gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0' (0.1
> MiB installed)...
>
> http://192.168.1.157/.../iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0
> 6.3% of 127.5 KiBguix substitute-binary: error: mkdir: File exists
>
> Any idea what could be going wrong?
Nothing! :-)
The store item that substitute-binary created on the first run is
actually invalid. You can see that from the fact that you get an error
if you run, say:
guix gc --references
/gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0
So you can either “rm -rf” it (use with care!), or, better, run ‘guix
gc’, which will automatically remove it and other invalid items.
(A store item is considered valid iff guix-daemon or guix-register has
added it to db.sqlite. guix-daemon does that upon successful
substitution or build.)
HTH,
Ludo’.