GNU bug report logs - #39725
/gnu/store/.links: base16 or base32?

Previous Next

Package: guix;

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

Date: Fri, 21 Feb 2020 21:52:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#39725: closed (Re: bug#39725: /gnu/store/.links: base16 or
 base32?)
Date: Sat, 22 Feb 2020 00:01:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#39725: /gnu/store/.links: base16 or base32?

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 39725 <at> debbugs.gnu.org.

-- 
39725: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39725
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: 39725-done <at> debbugs.gnu.org
Subject: Re: bug#39725: /gnu/store/.links: base16 or base32?
Date: Sat, 22 Feb 2020 01:00:23 +0100
Ludovic Courtès <ludo <at> gnu.org> skribis:

> (guix store deduplication) uses base16, but optimize-store.cc does:
>
>     /* Check if this is a known hash. */
>     Path linkPath = linksDir + "/" + printHash32(hash);
>
> … where ‘printHash32’ returns a nix-base32 string.  Oops!

Fixed in 4cb63a564d413c745983a608790a943ac07f8d67.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-Guix <at> gnu.org
Subject: /gnu/store/.links: base16 or base32?
Date: Fri, 21 Feb 2020 22:51:28 +0100
Seen while stracing guix-daemon during GC (the “deleting unused links”
phase):

--8<---------------cut here---------------start------------->8---
unlink("/gnu/store/.links/3a16c555c7c60f9c781895eec65a31a04a6cc535fff5a381499c1a4717d8f19f") = 0
unlink("/gnu/store/.links/1mm1n1xmjb1in2sv71kpa90n5iv30h24blzfj4z0icdssbly19kh") = 0
unlink("/gnu/store/.links/4213e7fe3db934f2817fbd0fb3a74e5395736fcc7633d295c557462cae88f945") = 0
unlink("/gnu/store/.links/1g46q6yf868x7wfqnzcy4rb8r780bqi986vjvb1n7xm4ln3jizzf") = 0
unlink("/gnu/store/.links/8b261f0461a89419ee4436d11ac828fc63a4d8d6473696262d020c17758964eb") = 0
unlink("/gnu/store/.links/0znm2gdxraz3i88r3iy838d86s1zfidx8gga4kwiqcsnmaz206d6") = 0
unlink("/gnu/store/.links/f3fe1645f86a6a1effd8e4f0dfcdaef8d73c8163c96d2b2cb42e0bd7c05d9b5b") = 0
unlink("/gnu/store/.links/69a86d84c31d5b728f6d7496413bac8a0bc06c388255f0b81868066463cff80f") = 0
unlink("/gnu/store/.links/0s0bb4pkm282srrdm61fd0lf9zn7r85s370llbp616pk4j2szkhs") = 0
unlink("/gnu/store/.links/a2b0c70e4c03f3247250155d4a2cfdf6a21e03458f892f4c2a9ba861259022f6") = 0
unlink("/gnu/store/.links/5faebd1dc60adbf32b430090a29248b86c56eba4805aeedc8d99c459a28b34eb") = 0
unlink("/gnu/store/.links/8d7d77f86a32f2a0a36b508dcbdc4a44c61dec284b9dc6299a8b7d18db9938dc") = 0
unlink("/gnu/store/.links/1cjlcwkyr59apcym97zaw8r2m4ahqc11zrm51aqzvwg3b0xvchhw") = 0
unlink("/gnu/store/.links/0z9cw4h1p4cm6jp4zap9db1lh60i0ynal0dxd2f8ilzp085wb1xj") = 0
unlink("/gnu/store/.links/1vzgxm1png21gf13v5ac3494h9zshy6y35cxk38pf6dd0qimcand") = 0
unlink("/gnu/store/.links/1r8xm4j57m9h99rvv80q2wgv29p3q42ws4s2f0c3jd9a77hl2qn8") = 0
--8<---------------cut here---------------end--------------->8---

There’s an inconsistency here!

(guix store deduplication) uses base16, but optimize-store.cc does:

    /* Check if this is a known hash. */
    Path linkPath = linksDir + "/" + printHash32(hash);

… where ‘printHash32’ returns a nix-base32 string.  Oops!

The effect is just that deduplication wouldn’t work as well as it could:
results from offloaded builds would be deduplicated among them but not
against other store items.

Ludo’.



This bug report was last modified 5 years and 174 days ago.

Previous Next


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