From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Corrupt .drv files Date: Tue, 12 Jul 2016 00:04:11 +0200 Message-ID: <20160711220411.GA2470@solar> References: <20160711081921.GA1651@solar> <87k2gsjooh.fsf@gnu.org> <87twfv26cr.fsf_-_@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMjJP-0001Vu-Or for guix-devel@gnu.org; Mon, 11 Jul 2016 18:04:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMjJJ-0002FE-Ow for guix-devel@gnu.org; Mon, 11 Jul 2016 18:04:22 -0400 Received: from mailrelay7.public.one.com ([91.198.169.215]:30254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMjJJ-0002Ex-Bn for guix-devel@gnu.org; Mon, 11 Jul 2016 18:04:17 -0400 Content-Disposition: inline In-Reply-To: <87twfv26cr.fsf_-_@gnu.org> 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: Ludovic =?iso-8859-15?Q?Court=E8s?= Cc: guix-devel@gnu.org On Mon, Jul 11, 2016 at 11:49:08PM +0200, Ludovic Courtès wrote: > > Andreas Enge skribis: > > > >> guix archive: error: build failed: error parsing derivation `/gnu/store/k49lwfwgs8wcamys5qzn8c5n2zk0prc1-tcl8.6.4-src.tar.xz.drv': expected string `Derive([' > > > > It looks like the store on this machine is corrupt. > > Indeed, the daemon doesn’t attempt to atomically write files coming from > an add-to-store RPC, which includes .drv files. > > 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 > ‘fdatasync’ 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 vim, and they did not contain ASCII characters. Also, the file command marked them as binary data instead of text files. "guix gc --verify" passed, however. There were quite a few corrupted .drv files, and I ended up doing a complete "guix gc" instead of "guix gc -d ..." on every file, and this solved the problem. Thanks for your help with this, Andreas