On Mon, Jul 11, 2016 at 11:49:08PM +0200, Ludovic Courtès wrote:
> > Andreas Enge <andr...@enge.fr> 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


Reply via email to