unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39725: /gnu/store/.links: base16 or base32?
@ 2020-02-21 21:51 Ludovic Courtès
  2020-02-22  0:00 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2020-02-21 21:51 UTC (permalink / raw)
  To: bug-Guix

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’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#39725: /gnu/store/.links: base16 or base32?
  2020-02-21 21:51 bug#39725: /gnu/store/.links: base16 or base32? Ludovic Courtès
@ 2020-02-22  0:00 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-02-22  0:00 UTC (permalink / raw)
  To: 39725-done

Ludovic Courtès <ludo@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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-22  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 21:51 bug#39725: /gnu/store/.links: base16 or base32? Ludovic Courtès
2020-02-22  0:00 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).