Subject: bug#38167: guix pull takes over 8 GiB of memory to finish if there are no substitutes

From: Ludovic Courtès <[email-masked]>
Date: Sun, 29 Dec 2019 23:41:42 +0100

Hey Danny,

Danny Milosavljevic <[email-masked]> skribis:

> [pid 19221] mmap(0x7fb3f2d48000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb3f2d28000
> [pid 19221] mmap(0x7fb3f2d38000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb3f2d18000
> [pid 19221] mmap(0x7fb3f2d28000, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb3f2518000
> [pid 19221] mmap(0x7fb3f2d18000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb3f2508000
> [pid 19221] mmap(0x7fb3f2518000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb3f24f8000

That’s a malloc loop.

> It could be because my modules in GUIX_PACKAGE_PATH contain an import cycle
> (I don't know whether it does, but I had such a cycle before).

And that’s definitely a possibility!  Can you try unsetting
GUIX_PACKAGE_PATH?

(More generally, I recommend against GUIX_PACKAGE_PATH; use a channel or
‘-L’ when you need.)

Thanks,
Ludo’.