GNU bug report logs - #58035
sync-before-registering is false, possibly the cause of empty files in the store

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Sat, 24 Sep 2022 01:36:01 UTC

Severity: normal

Tags: moreinfo

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: 58035 <at> debbugs.gnu.org
Subject: [bug#58035] sync-before-registering is false, possibly the cause of empty files in the store
Date: Sat, 24 Sep 2022 03:35:01 +0200
[Message part 1 (text/plain, inline)]
libstore/local-store.cc has the following comment:

void LocalStore::registerValidPaths(const ValidPathInfos & infos)
{
    /* SQLite will fsync by default, but the new valid paths may not be 
fsync-ed.
     * So some may want to fsync them before registering the validity, 
at the
     * expense of some speed of the path registering operation. */
    if (settings.syncBeforeRegistering) sync();

    [...]
}

However, currently sync-before-registering is set to 'false' AFAICT.  I 
think this might be the cause of bugs like 
<https://issues.guix.gnu.org/58013> (‘Can't use "guix pull"’), and maybe 
<https://issues.guix.gnu.org/57838> (‘failing to boot, probably due to 
guix gc’).

As such, I think we need to set it to 'true' by default instead.  Or if 
that turns out to be too expensive, instead do a recursive 'fsync' on 
the 'paths' (store items) that are about to be registered (and maybe 
some other tricks like disabling the 'fsync/sync' for most tests).

(Unverified if this solves those issues, just an idea ...)

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.