(Moving to guix-devel.) ludo@gnu.org (Ludovic Courtès) skribis: > 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. (This is acknowledged by the comment in ‘LocalStore::registerValidPaths’, which can call ‘sync’, a sledgehammer.) The attached patch should fix it. I think the performance overhead of the extra ‘fdatasync’ should be OK but I haven’t made any measurements. Thanks, Ludo’.