[berlin] guix gc throws: "error: build daemon out of memory"

  • Open
  • quality assurance status badge
Details
3 participants
  • Collin J. Doering
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
important
M
M
Maxim Cournoyer wrote on 22 Aug 2023 04:19
[cuirass] guix gc throws: "error: build daemon out of memory"
(name . bug-guix)(address . bug-guix@gnu.org)
87y1i3byz6.fsf@gmail.com
Hi,

Since a few days on Berlin, the following appears in /var/log/mcron.log:

Toggle snippet (3 lines)
2023-08-22 04:00:29 28215 /gnu/store/4lmpqf8dnk86avq5xa2l6bznxnmrz27x-guix-1.4.0-7.44bbfc2/bin/guix gc: guix gc: error: build daemon out of memory

It's not just a fluke, according to the kernel's dmesg:

Toggle snippet (3 lines)
[7190243.475312] __vm_enough_memory: pid: 28300, comm: guix-daemon, not enough memory for the allocation

Once it appears, it can be triggered simply by running 'guix gc'. The
problem can be worked around by restarting the Guix daemon, with:

Toggle snippet (3 lines)
herd restart guix-daemon

Any ideas what could cause such a condition?

The machine hasn't been rebooted in 83 days, perhaps we should start
with that.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 03:36
control message for bug #65446
(address . control@debbugs.gnu.org)
873505mflq.fsf@gmail.com
retitle 65446 [berlin] guix gc throws: "error: build daemon out of memory"
quit
L
L
Ludovic Courtès wrote on 2 Sep 2023 18:37
(address . control@debbugs.gnu.org)
87r0ngedkm.fsf@gnu.org
severity 65446 important
quit
L
L
Ludovic Courtès wrote on 2 Sep 2023 22:33
Re: bug#65446: [berlin] guix gc throws: "error: build daemon out of memory"
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87jzt8e2mv.fsf@gnu.org
Hi!

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (17 lines)
> Since a few days on Berlin, the following appears in /var/log/mcron.log:
>
> 2023-08-22 04:00:29 28215 /gnu/store/4lmpqf8dnk86avq5xa2l6bznxnmrz27x-guix-1.4.0-7.44bbfc2/bin/guix gc: guix gc: error: build daemon out of memory
>
>
> It's not just a fluke, according to the kernel's dmesg:
>
> [7190243.475312] __vm_enough_memory: pid: 28300, comm: guix-daemon, not enough memory for the allocation
>
>
> Once it appears, it can be triggered simply by running 'guix gc'. The
> problem can be worked around by restarting the Guix daemon, with:
>
> herd restart guix-daemon
>
> Any ideas what could cause such a condition?

No idea!

I ran “guix gc -C0” minutes ago, which reproduced the problem;
/var/log/guix-daemon.log reads this:

Toggle snippet (4 lines)
2023-09-02 21:40:31 accepted connection from pid 12853, user ludo
2023-09-02 21:40:50 unexpected build daemon error: std::bad_alloc

and the kernel writes what you wrote above:

Toggle snippet (5 lines)
Sep 2 21:40:50 localhost vmunix: [8204269.198144] __vm_enough_memory: pid: 12873, comm: guix-daemon, not enough memory for the allocation
Sep 2 21:40:50 localhost vmunix: [8204269.207396] __vm_enough_memory: pid: 12873, comm: guix-daemon, not enough memory for the allocation
Sep 2 21:40:50 localhost vmunix: [8204269.216639] __vm_enough_memory: pid: 12873, comm: guix-daemon, not enough memory for the allocation

My reading of the Linux code is ‘__vm_enough_memory’ is used by Linux
Security Modules (LSM), so perhaps something changed in our kernel
config, be it compile-time or run-time? (Cc: Leo just in case.)

This is with Linux-libre 6.3.4-gnu.

Ludo’.
C
C
Collin J. Doering wrote on 17 Dec 05:11 +0100
[berlin] guix gc throws: "error: build daemon out of memory"
(address . 65446@debbugs.gnu.org)
87frmnkkyz.fsf@rekahsoft.ca
Perhaps worth noting that I've seen this numerous times on cuirass.genenetwork.org.

Usually restarting guix-daemon will allow 'guix gc' to complete without error. I see dmesg errors that match what Ludo provided.

Kind regards

--
Collin J. Doering

-----BEGIN PGP SIGNATURE-----

iIoEARYKADIWIQSg4F3ACfM0j/GRGeP3fjGTl82nFgUCZ2D51BQcY29sbGluQHJl
a2Foc29mdC5jYQAKCRD3fjGTl82nFl2CAP91X5LwUGzxpdiysfRQXKKkQvpKUX+v
+N3o20omkpwUUgD+OCV1/PGU1xhR7UJZlyDTV+cD9DWBpr5VaR+F/6W8Zw8=
=25oQ
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 18 Dec 03:05 +0100
(name . Collin J. Doering via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
87o719rbi4.fsf@gmail.com
Hello,

"Collin J. Doering" via Bug reports for GNU Guix <bug-guix@gnu.org>
writes:

Toggle quote (5 lines)
> Perhaps worth noting that I've seen this numerous times on cuirass.genenetwork.org.
>
> Usually restarting guix-daemon will allow 'guix gc' to complete
> without error. I see dmesg errors that match what Ludo provided.

Thanks for tipping in; it's a useful thing to know the bug is
reproducible in other environments.

--
Thanks,
Maxim
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 65446@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65446
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch