Subject: ‘guix-package-cache.drv’ eats all your memory with ‘guix-cran’

From: Ludovic Courtès <[email-masked]>
Date: Fri, 02 Jun 2023 18:22:29 +0200

Consider this:

--8<---------------cut here---------------start------------->8---
$ cat /tmp/cran.scm
(cons (channel
       (name 'guix-cran)
       (url "https://github.com/guix-science/guix-cran.git"))
      %default-channels)
$ guix time-machine -C /tmp/cran.scm -- describe
Updating channel 'guix-cran' from Git repository at 'https://github.com/guix-science/guix-cran.git'...
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...

[...]

The following derivations will be built:
  /gnu/store/90qiphp9048zgvi96lj8zqg8zhwi4js0-profile.drv
  /gnu/store/2lv56bl8ghyf2kvfkwj5iy3mrlfik4la-inferior-script.scm.drv
  /gnu/store/vnjf8gf6yf5gjm1syvz7yyfn71mmvy27-profile.drv
  /gnu/store/8x49757i1s0r6igrah8ramn9zc1v577b-guix-69dfdb7bd.drv
  /gnu/store/ll5x27npc3znyqv0rkjh945x9cr41k9q-guix-command.drv
  /gnu/store/m03hp1n62bv8gkid53g8igizbw012gai-guix-module-union.drv
  /gnu/store/pw8k2jwwyj2nwvqjcd1w3xjvz2n5zpbg-guix-69dfdb7bd-modules.drv
  /gnu/store/a6si5zgzsxyha2466v4q45hqimg31mjg-guix-config-modules.drv
  /gnu/store/3pm8aivzg3hfv95zlffxjrxvf8hfbg5n-guix-config-source.drv
  /gnu/store/rffsvls17s21v2h6gw7agah5vczwi3rm-config.scm.drv
  /gnu/store/v61jlksbgfslh27y8dbaj1jcajxz5c8z-guix-config.drv
  /gnu/store/z6r6xdcq9dyxlk8ln8cq1ka2gspxp83i-guix-daemon.drv
  /gnu/store/fshds3i961v1p3x8f7awh55lix0f7vkl-guix-cran.drv
  /gnu/store/xsnp3znb0h630kipjxd198qfd3jr2ww5-inferior-script.scm.drv

building /gnu/store/xsnp3znb0h630kipjxd198qfd3jr2ww5-inferior-script.scm.drv...
building /gnu/store/rffsvls17s21v2h6gw7agah5vczwi3rm-config.scm.drv...
building /gnu/store/3pm8aivzg3hfv95zlffxjrxvf8hfbg5n-guix-config-source.drv...
building /gnu/store/v61jlksbgfslh27y8dbaj1jcajxz5c8z-guix-config.drv...
building /gnu/store/a6si5zgzsxyha2466v4q45hqimg31mjg-guix-config-modules.drv...
building /gnu/store/pw8k2jwwyj2nwvqjcd1w3xjvz2n5zpbg-guix-69dfdb7bd-modules.drv...
building /gnu/store/m03hp1n62bv8gkid53g8igizbw012gai-guix-module-union.drv...
building /gnu/store/ll5x27npc3znyqv0rkjh945x9cr41k9q-guix-command.drv...
building /gnu/store/z6r6xdcq9dyxlk8ln8cq1ka2gspxp83i-guix-daemon.drv...
building /gnu/store/8x49757i1s0r6igrah8ramn9zc1v577b-guix-69dfdb7bd.drv...
building /gnu/store/fshds3i961v1p3x8f7awh55lix0f7vkl-guix-cran.drv...
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 2 packages...
building /gnu/store/2lv56bl8ghyf2kvfkwj5iy3mrlfik4la-inferior-script.scm.drv...
building package cache...
--8<---------------cut here---------------end--------------->8---

It goes OK until building /gnu/store/6rfaqfq693vda59a55asc4wjjg52ilns-guix-package-cache.drv, which
consumes memory until it gets OOM-killed.

It used to work fine a few months ago.

Ludo’.