From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#19512: Failed substitution yields incomplete store item Date: Mon, 05 Jan 2015 16:28:41 +0100 Message-ID: <87vbklqmae.fsf@gnu.org> References: <87lhlikstn.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y89ac-0002cf-4w for bug-guix@gnu.org; Mon, 05 Jan 2015 10:29:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y89aY-0005La-PG for bug-guix@gnu.org; Mon, 05 Jan 2015 10:29:06 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:56459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y89aY-0005LQ-MO for bug-guix@gnu.org; Mon, 05 Jan 2015 10:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y89aY-0006N9-66 for bug-guix@gnu.org; Mon, 05 Jan 2015 10:29:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87lhlikstn.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Sun, 04 Jan 2015 18:51:48 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: David Thompson Cc: 19512@debbugs.gnu.org David Thompson 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: > > dave@labrys ~$ sudo _NIX_OPTIONS=3D"substitute-urls=3Dhttp://192.168.1.= 157:8080" guix substitute-binary --substitute /gnu/store/iw3jn6a1avv78pp5v2= cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0 /tmp/guile-toxcore >=20=20=20 > found valid signature for '/gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-= guile-toxcore-0.1-6a9fbe0', from 'http://192.168.1.157:8080/nar/iw3jn6a1avv= 78pp5v2cv42vyh0d8zi0g-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: > > dave@labrys ~$ sudo _NIX_OPTIONS=3D"substitute-urls=3Dhttp://192.168.1.= 157:8080" guix substitute-binary --substitute /gnu/store/iw3jn6a1avv78pp5v2= cv42vyh0d8zi0g-guile-toxcore-0.1-6a9fbe0 /tmp/guile-toxcore >=20=20=20 > found valid signature for '/gnu/store/iw3jn6a1avv78pp5v2cv42vyh0d8zi0g-= guile-toxcore-0.1-6a9fbe0', from 'http://192.168.1.157:8080/nar/iw3jn6a1avv= 78pp5v2cv42vyh0d8zi0g-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: F= ile 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-to= xcore-0.1-6a9fbe0 So you can either =E2=80=9Crm -rf=E2=80=9D it (use with care!), or, better,= run =E2=80=98guix gc=E2=80=99, 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=E2=80=99.