GNU bug report logs - #41119
[PATCH] fix some issues with (guix nar)

Previous Next

Package: guix-patches;

Reported by: Caleb Ristvedt <caleb.ristvedt <at> cune.org>

Date: Thu, 7 May 2020 03:53:01 UTC

Severity: normal

Tags: fixed

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Caleb Ristvedt <caleb.ristvedt <at> cune.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] fix some issues with (guix nar)
Date: Wed, 06 May 2020 22:52:11 -0500
[Message part 1 (text/plain, inline)]
I noticed two issues while looking at (guix nar):

1. The proper store-lock-handling protocol isn't used in
   FINALIZE-STORE-FILE. Lock acquisition needs to check for a deletion
   token, retrying if it exists, and lock release needs to delete the
   lock file and write the deletion token.

2. WITH-TEMPORARY-STORE-FILE opens a new daemon connection every time it
   retries with a new filename, and only closes any of them after the
   body has completed. So if we retry 20 times, we get 20 concurrent
   daemon connections. This also prevents the call to LOOP from being a
   tail call.

The attached patches resolve these issues. There are of course going to
be more places we need to (properly) acquire and release store locks as
guile-daemon code gets merged, but for now this should work as a bandaid
fix.

- reepca

[0001-nar-finalize-store-file-follows-proper-store-lock-pr.patch (text/x-patch, attachment)]
[0002-nar-with-temporary-store-file-uses-a-single-connecti.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 349 days ago.

Previous Next


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