GNU bug report logs - #72340
guix should not ask me to report a bug if it fails due to running out of memory

Previous Next

Package: guix;

Reported by: "Zack Weinberg" <zack <at> owlfolio.org>

Date: Sun, 28 Jul 2024 16:04:02 UTC

Severity: normal

To reply to this bug, email your comments to 72340 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#72340; Package guix. (Sun, 28 Jul 2024 16:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Zack Weinberg" <zack <at> owlfolio.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 28 Jul 2024 16:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Zack Weinberg" <zack <at> owlfolio.org>
To: bug-guix <at> gnu.org
Subject: guix should not ask me to report a bug if it fails due to running out
 of memory
Date: Sun, 28 Jul 2024 16:02:33 +0000
If a guix operation fails due to running out of memory, it's reported
to the user as an internal error, instructing them to report a bug to
bug-guix.  For example:

# guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git	46a64c7
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
 module-import  2KiB                  56KiB/s 00:00 ▕██████████████████▏ 100.0%
 module-import-compiled  1.3MiB      2.4MiB/s 00:01 ▕██████████████████▏ 100.0%
 compute-guix-derivation  1KiB       877KiB/s 00:00 ▕██████████████████▏ 100.0%
Computing Guix derivation for 'x86_64-linux'... \
GC Warning: Failed to expand heap by 8388608 bytes
[previous line repeats 79 more times]
GC Warning: Failed to expand heap by 69632 bytes
GC Warning: Out of Memory! Heap size: 402 MiB. Returning NULL!
Warning: Unwind-only out of memory exception; skipping pre-unwind handler.
guix pull: error: You found a bug: the program
'/gnu/store/6pckga173mjbpfz7a2bl93h4gimd8fp5-compute-guix-derivation'
failed to compute the derivation for Guix (version:
"46a64c7fdd057283063aae6df058579bb07c4b6a"; system: "x86_64-linux";
host version: "e4aabf42b33346849cb565199cfafc49d4f0aeff";
pull-version: 1).  Please report the COMPLETE output above by email to
<bug-guix <at> gnu.org>.

The fact that it ran the computer out of RAM is *not* a bug per se --
perhaps we could talk about reducing "guix pull"'s memory
requirements, but that's a big hairy design challenge probably.

But that means there *is* a bug: the fatal exception handler should
have a dedicated message for out-of-memory conditions, directing the
user to add more swap or something, instead of reporting a bug.

For reference, this is a server with this much RAM as of when I ran
the above command:

# free -h
               total        used        free      shared  buff/cache   available
Mem:           969Mi       229Mi       557Mi          0B       319Mi       739Mi
Swap:          613Mi        39Mi       574Mi

Enabling zswap did not permit a successful "guix pull" but increasing
the amount of available swap space to 2Gi did.  (Memory overcommit is
disabled.  Peak memory usage, with the increased swap, was roughly
1.5Gi.)

zw




Information forwarded to bug-guix <at> gnu.org:
bug#72340; Package guix. (Tue, 03 Sep 2024 15:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 72340 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Zack Weinberg <zack <at> owlfolio.org>, 72340 <at> debbugs.gnu.org
Subject: Re: bug#72340: guix should not ask me to report a bug if it fails
 due to running out of memory
Date: Tue, 03 Sep 2024 16:39:27 +0200
Hi,

On Sun, 28 Jul 2024 at 16:02, "Zack Weinberg" via Bug reports for GNU Guix <bug-guix <at> gnu.org> wrote:

> Computing Guix derivation for 'x86_64-linux'... \
> GC Warning: Failed to expand heap by 8388608 bytes
> [previous line repeats 79 more times]
> GC Warning: Failed to expand heap by 69632 bytes
> GC Warning: Out of Memory! Heap size: 402 MiB. Returning NULL!
> Warning: Unwind-only out of memory exception; skipping pre-unwind handler.
> guix pull: error: You found a bug: the program
> '/gnu/store/6pckga173mjbpfz7a2bl93h4gimd8fp5-compute-guix-derivation'
> failed to compute the derivation for Guix (version:
> "46a64c7fdd057283063aae6df058579bb07c4b6a"; system: "x86_64-linux";
> host version: "e4aabf42b33346849cb565199cfafc49d4f0aeff";

I guess this bug had been fixed since then.  Do you still have it?

Aside, I am not able to reproduce it:

    guix time-machine -q --commit=e4aabf42b33346849cb565199cfafc49d4f0aeff \
      -- time-machine -q --commit=46a64c7fdd057283063aae6df058579bb07c4b6a \
      -- describe

This passes for me.

Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#72340; Package guix. (Tue, 03 Sep 2024 15:33:01 GMT) Full text and rfc822 format available.

Message #11 received at 72340 <at> debbugs.gnu.org (full text, mbox):

From: "Zack Weinberg" <zack <at> owlfolio.org>
To: "Simon Tournier" <zimon.toutoune <at> gmail.com>, 72340 <at> debbugs.gnu.org
Subject: Re: bug#72340: guix should not ask me to report a bug if it fails due
 to running out of memory
Date: Tue, 03 Sep 2024 11:30:41 -0400
On Tue, Sep 3, 2024, at 10:39 AM, Simon Tournier wrote:
> On Sun, 28 Jul 2024 at 16:02, "Zack Weinberg" via Bug reports for GNU 
> Guix <bug-guix <at> gnu.org> wrote:
>
>> Computing Guix derivation for 'x86_64-linux'... \
>> GC Warning: Failed to expand heap by 8388608 bytes
>> [previous line repeats 79 more times]
>> GC Warning: Failed to expand heap by 69632 bytes
>> GC Warning: Out of Memory! Heap size: 402 MiB. Returning NULL!
>> Warning: Unwind-only out of memory exception; skipping pre-unwind handler.
>> guix pull: error: You found a bug: the program
>> '/gnu/store/6pckga173mjbpfz7a2bl93h4gimd8fp5-compute-guix-derivation'
>> failed to compute the derivation for Guix (version:
>> "46a64c7fdd057283063aae6df058579bb07c4b6a"; system: "x86_64-linux";
>> host version: "e4aabf42b33346849cb565199cfafc49d4f0aeff";
>
> I guess this bug had been fixed since then.  Do you still have it?

I reconfigured my Guix system to avoid the bug, so I cannot easily
trigger it anymore.  However, this is not a bug that would go away by
accident.  Until someone writes code specifically intended to produce
a better error message when Guile runs out of memory, the bug will be
live.

> Aside, I am not able to reproduce it:
>
>     guix time-machine -q --commit=e4aabf42b33346849cb565199cfafc49d4f0aeff \
>       -- time-machine -q --commit=46a64c7fdd057283063aae6df058579bb07c4b6a \
>       -- describe

In order to reproduce the bug you need to be working in an environment
(probably a virtual machine is easiest) with a limited amount of
system memory (512MB of RAM and no swap should do it) and memory
overcommit disabled (sysctl -w vm.overcommit_memory=2).

Also, I don't know what "guix time-machine" does but I would not
expect "guix describe" to use substantial amounts of memory.  You need
to run a command that computes a large derivation, such as "guix pull"
or "guix system reconfigure".

zw




Information forwarded to bug-guix <at> gnu.org:
bug#72340; Package guix. (Tue, 03 Sep 2024 16:12:01 GMT) Full text and rfc822 format available.

Message #14 received at 72340 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: "Zack Weinberg" <zack <at> owlfolio.org>
Cc: 72340 <at> debbugs.gnu.org
Subject: Re: bug#72340: guix should not ask me to report a bug if it fails
 due to running out of memory
Date: Tue, 03 Sep 2024 18:09:39 +0200
Hi,

On Tue, 03 Sep 2024 at 11:30, "Zack Weinberg" <zack <at> owlfolio.org> wrote:

> I reconfigured my Guix system to avoid the bug, so I cannot easily
> trigger it anymore.  However, this is not a bug that would go away by
> accident.

Yes for sure, that’s not what I meant. :-)

This can happen if a cycle is introduced, i.e., package foo depending on
package foo.  Or it can happen for other reasons, as it seems the case here.

Well, this bug seems an instance of bug#47543 [1].

1: bug#47543: “Repeated allocation of very large block” during ‘guix pull’
Ludovic Courtès <ludovic.courtes <at> inria.fr>
Thu, 01 Apr 2021 16:00:06 +0200
id:87v9966r6h.fsf <at> inria.fr
https://issues.guix.gnu.org/47543
https://issues.guix.gnu.org/msgid/87v9966r6h.fsf <at> inria.fr
https://yhetil.org/guix/87v9966r6h.fsf <at> inria.fr


> Also, I don't know what "guix time-machine" does but I would not
> expect "guix describe" to use substantial amounts of memory.  You need
> to run a command that computes a large derivation, such as "guix pull"
> or "guix system reconfigure".

“guix time-machine” runs “guix pull”, other said:

     guix time-machine -q --commit=e4aabf42b33346849cb565199cfafc49d4f0aeff \
       -- time-machine -q --commit=46a64c7fdd057283063aae6df058579bb07c4b6a \
       -- describe

is more or less equivalent to:

    guix pull --commit=e4aabf42b33346849cb565199cfafc49d4f0aeff -p /tmp/host
    /tmp/host/bin/guix pull --commit=46a64c7fdd057283063aae6df058579bb07c4b6a

which minimicks what you ran.  Indeed, I’ve run it on my machine and not
inside some VM with constrained memory.  However, considering bug#47543
[1], I am not convinced the crash comes from this constrained memory.

Hum, maybe it’s worth merging with bug#47543 [1].  WDYT?

Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#72340; Package guix. (Tue, 03 Sep 2024 18:25:02 GMT) Full text and rfc822 format available.

Message #17 received at 72340 <at> debbugs.gnu.org (full text, mbox):

From: "Zack Weinberg" <zack <at> owlfolio.org>
To: "Simon Tournier" <zimon.toutoune <at> gmail.com>
Cc: 72340 <at> debbugs.gnu.org
Subject: Re: bug#72340: guix should not ask me to report a bug if it fails due
 to running out of memory
Date: Tue, 03 Sep 2024 14:23:16 -0400
On Tue, Sep 3, 2024, at 12:09 PM, Simon Tournier wrote:
>
> Well, this bug seems an instance of bug#47543 [1].

It is not.  This bug is "When guix runs out of memory, it prints an error
message that gives the user unhelpful advice."  That is not the same as
any particular reason why guix might run out of memory.

> “guix time-machine” runs “guix pull”, other said:
>
>      guix time-machine -q --commit=e4aabf42b33346849cb565199cfafc49d4f0aeff \
>        -- time-machine -q --commit=46a64c7fdd057283063aae6df058579bb07c4b6a \
>        -- describe
>
> is more or less equivalent to:
>
>     guix pull --commit=e4aabf42b33346849cb565199cfafc49d4f0aeff -p /tmp/host
>     /tmp/host/bin/guix pull --commit=46a64c7fdd057283063aae6df058579bb07c4b6a
>
> which minimicks what you ran.

Thanks for the explanation.

zw




This bug report was last modified 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.