Excessive temproots size when running guix build

  • Open
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Christopher Baines
  • Maxime Devos
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 3 Sep 2021 11:53
(address . bug-guix@gnu.org)
874kb2q91r.fsf@cbaines.net
I spotted a problem with data.guix.gnu.org trying to process this old
revision [1]


The machine ran out of disk space, as a ~30GiB file had been created in
/var/guix/temproots.

I think I can reproduce the situation by running this command.

guix time-machine --commit=75dabac633bb9a33efbebf859f8aa4bb3b9582b2 -- build --system=armhf-linux guix

It's the build of the guix package that seems to be involved.

For some reason though, I can't reproduce this on my local machine, I
get a build failure for [2].

2: /gnu/store/cz4sr5whzf3qhp8c47bzlfzcxxwl485i-python2-2.7.15.drv

Any ideas? Is there a known issue (perhaps with grafts) for old
revisions of Guix which could lead to excessive temproots file sizes in
some situations?
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmEx8LBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XcE4w//Zmzb8V7WIr306iusWbnwm+uu+i1uYMlr
gG0EAZNAbrWxi0tax+ZXf2/oUu7cBQWiTnTV1wjHAAtE4QnNC4Tm87IF+6eIb+Vx
vY5viWGQU1wXbOHQpp1bes0QspRSQE7l0axI3NkpNt2K+JLLWuOqQt2WdtvlQD5S
AeQGcjEM3UYzwDOWOo7awuEOUwC56joGF/AuNfHz+U9VDQwXE8FQc6jeMOayypwj
HDxfev/AfjkmjI6vPwLTg7E0PgwsvVqGQL8Elo89cUm6NIYw6biz2KG6s4AJdukl
eKZnciMWDcp+ZEn0okY8AYJ8n1x+ymCL+YjegnuMGOdB2JlywB34eLBu58G+W3ZS
4ZBbhf4JZGTYmCKg99kzoGJdO+UNAXDPx6tz8WXJSMc3tzPBOg9w9zeO7fb+EmjF
+bg2oX/Je2IzWDQuRQ7mJi2jruesJP6LYoAzinaeyOZvTCkAzYCUyLQK8rUxH9Q/
Sf54V2euZnGS9v24M6jRC9i7QVgOGAo+I08Dvr14qhPpRfxMIjteWXQIY7+8/MKm
RN4Uk9HUxYvhpmOAju9yKnHeU6fPJQBHeztvsmMOAYlvllsdG7xi/j4Ou0/RTVjX
qP9jZxjghCJKRkyHIddU9xgGsfrB6ozqFCVI+ZKzYfApcx1CU2CIOFWkI0tpm4wk
hZgolwCdBS4=
=DCfm
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 6 Sep 2021 23:18
(name . Christopher Baines)(address . mail@cbaines.net)(address . 50353@debbugs.gnu.org)
87czpl7691.fsf@gnu.org
Hi,

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (8 lines)
> I spotted a problem with data.guix.gnu.org trying to process this old
> revision [1]
>
> 1: https://data.guix.gnu.org/revision/75dabac633bb9a33efbebf859f8aa4bb3b9582b2
>
> The machine ran out of disk space, as a ~30GiB file had been created in
> /var/guix/temproots.

Sounds fishy. Those files contain a nul-separated list of GC roots
(store file names). Thus, a file in there is proportional to the number
of ‘add-temp-root’ RPCs made by the client during the session.

A client with a long-running session (‘guix publish’, Coordinator, Data
Service, Cuirass, etc.) that regularly adds temp roots makes that file
grow endlessly.

HTH!

Ludo’.
M
M
Maxime Devos wrote on 7 Sep 2021 11:45
(address . 50353@debbugs.gnu.org)
8b57f8cef097e56b0db3ae2f6bc4519bf4046776.camel@telenet.be
Ludovic Courtès schreef op ma 06-09-2021 om 23:18 [+0200]:
Toggle quote (20 lines)
> Hi,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
> > I spotted a problem with data.guix.gnu.org trying to process this old
> > revision [1]
> >
> > 1: https://data.guix.gnu.org/revision/75dabac633bb9a33efbebf859f8aa4bb3b9582b2
> >
> > The machine ran out of disk space, as a ~30GiB file had been created in
> > /var/guix/temproots.
>
> Sounds fishy. Those files contain a nul-separated list of GC roots
> (store file names). Thus, a file in there is proportional to the number
> of ‘add-temp-root’ RPCs made by the client during the session.
>
> A client with a long-running session (‘guix publish’, Coordinator, Data
> Service, Cuirass, etc.) that regularly adds temp roots makes that file
> grow endlessly.

FWIW, temp roots are added in ‘DerivationGoal::DerivationGoal’
when building things, and ‘DerivationGOal::haveDerivation’,
‘SubstitutionGoal::init’, ‘LocalStore::optimiseStore’
‘LocalStore::addToStoreFromDump’, ‘LocalStore::addTextToStore’,
‘LocalStore::createTempDirInStore’ and ‘LocalStore::importPath’.

I.e., temp roots are not only added from the add-temp-root RPC.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTc0vRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vPzAQCiSb+g4emT66LaUwlSL+R41KAn
0gi42mlTJDfrCfCN5wEA5sbGvOmrrk4BB1kFQ7vwKOAAyk/q/ZEqLXvxhX97UA8=
=4Rne
-----END PGP SIGNATURE-----


?