The uid split a while back caused the web interface to create GC roots in /nix/var/nix/gcroots/per-user/hydra-www, where they wouldn't be purged by hydra-update-gc-roots. Thus restarted builds would accumulate forever. The fix is to keep the roots in a shared directory with gid=hydra.
KKHVM4KAM6I5B4KZPIKCEBWRB3LNYCFD7XIH4NCPGLNSMRCGJC6AC WQXF2T3DFC2K72OVX46TUQ4IMZNJ5BSBQ7L7AVI7QL54DXCBEKLQC V4R3SIRMYTN4CVYWPFPFT34N3PCGVTGNWUSX4VE4B4FT5EEVWJFAC PMDWFZHWNNA764E7A4TAMX7TN2SFPGWQXWPUETAYTFU6UJEOCYDAC G2RULGMMNKPSV3CPHZOTSZ2UNISNQY5WXJ6Y4XEQMPKQ5NLIEB4AC D3MDJONYWWNXVVZDKTPDQE2H2HGMF263LXKT57B2GYCOXNM3PPOQC 4J33F22TRXXW3WRI3KAF7DQZXQ7JH3A5XBNR7BJCKK7OFUF4AHSQC AMFMXR52JXHUOWWG4VZ5DHQGLF4F7H7XSJRLX5XNEXOCCWYLDQOAC 2GK5DOU7ODF4WBSN3QTD3WIO52VTL2LOAXKGCDEMMAQPTEO4A4HAC TJK27WSBFOM6LKVCSA7LTTCWUGB4O2AL22PNIDQXS4BFOFCISH2QC AFTXA575C6JTVLVXTYJUKQGPLBO3NFORLO5XDSPHNL44HXLRH4TAC 2T42QGZDK23C5V4ZHO4R7EBJESIQ62GKWDBWVX7OBEE3YVBUNUFAC F5RYSE7TNJ6G35LFFV2F6IYDVPV4XG3A5LGDJECA7VJRS4SUER3QC A63IHCMXH3F4V56HDXJLJVVHKXRSJCJMT2PWXXI2IW3J734J6SGQC if [ ! -e ${cfg.gcRootsDir} ]; then# Move legacy roots directory.if [ -e /nix/var/nix/gcroots/per-user/hydra/hydra-roots ]; thenmv /nix/var/nix/gcroots/per-user/hydra/hydra-roots ${cfg.gcRootsDir}fimkdir -p ${cfg.gcRootsDir}fi# Move legacy hydra-www roots.if [ -e /nix/var/nix/gcroots/per-user/hydra-www/hydra-roots ]; thenfind /nix/var/nix/gcroots/per-user/hydra-www/hydra-roots/ -type f \| xargs -r mv -f -t ${cfg.gcRootsDir}/rmdir /nix/var/nix/gcroots/per-user/hydra-www/hydra-rootsfichown hydra.hydra ${cfg.gcRootsDir}chmod 2775 ${cfg.gcRootsDir}
die unless defined $ENV{LOGNAME};my $dir = ($ENV{NIX_STATE_DIR} || "/nix/var/nix" ) . "/gcroots/per-user/$ENV{LOGNAME}/hydra-roots";
my $config = getHydraConfig();my $dir = $config->{gc_roots_dir};unless (defined $dir) {die unless defined $ENV{LOGNAME};$dir = ($ENV{NIX_STATE_DIR} || "/nix/var/nix" ) . "/gcroots/per-user/$ENV{LOGNAME}/hydra-roots";}