From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Corrupt .drv files Date: Tue, 12 Jul 2016 10:59:04 +0200 Message-ID: <87inwbkzaf.fsf@gnu.org> References: <20160711081921.GA1651@solar> <87k2gsjooh.fsf@gnu.org> <87twfv26cr.fsf_-_@gnu.org> <20160711220411.GA2470@solar> 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]:48469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMtX5-0004cg-Oa for guix-devel@gnu.org; Tue, 12 Jul 2016 04:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMtX0-0002Zw-Pr for guix-devel@gnu.org; Tue, 12 Jul 2016 04:59:10 -0400 In-Reply-To: <20160711220411.GA2470@solar> (Andreas Enge's message of "Tue, 12 Jul 2016 00:04:11 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Andreas Enge Cc: guix-devel@gnu.org Andreas Enge skribis: > On Mon, Jul 11, 2016 at 11:49:08PM +0200, Ludovic Court=C3=A8s wrote: >> > Andreas Enge skribis: >> > >> >> guix archive: error: build failed: error parsing derivation `/gnu/sto= re/k49lwfwgs8wcamys5qzn8c5n2zk0prc1-tcl8.6.4-src.tar.xz.drv': expected stri= ng `Derive([' >> > >> > It looks like the store on this machine is corrupt. >>=20 >> Indeed, the daemon doesn=E2=80=99t attempt to atomically write files com= ing from >> an add-to-store RPC, which includes .drv files. >>=20 >> So I think that if you pull the plug before the .drv has been flushed to >> disk but after the .drv has been marked as valid in the SQLite database >> (which is likely to happen in a timely fashion because SQLite does the >> =E2=80=98fdatasync=E2=80=99 dance appropriately), then you end up with a= truncated .drv >> file. > > I do not think that this was the problem. I opened the .drv files with vi= m, > and they did not contain ASCII characters. Also, the file command marked > them as binary data instead of text files. So did they contain random bytes? That could be a hard disk problem or something equally fishy. Nevertheless I think the problem I described above really exists and is worth mitigating. Thanks, Ludo=E2=80=99.