unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72340: guix should not ask me to report a bug if it fails due to running out of memory
@ 2024-07-28 16:02 Zack Weinberg via Bug reports for GNU Guix
  2024-09-03 14:39 ` Simon Tournier
  0 siblings, 1 reply; 5+ messages in thread
From: Zack Weinberg via Bug reports for GNU Guix @ 2024-07-28 16:02 UTC (permalink / raw)
  To: 72340

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@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-03 18:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-28 16:02 bug#72340: guix should not ask me to report a bug if it fails due to running out of memory Zack Weinberg via Bug reports for GNU Guix
2024-09-03 14:39 ` Simon Tournier
2024-09-03 15:30   ` Zack Weinberg via Bug reports for GNU Guix
2024-09-03 16:09     ` Simon Tournier
2024-09-03 18:23       ` Zack Weinberg via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).