unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 53506@debbugs.gnu.org
Subject: bug#53506: guix-packages-base.drv leads to segfault on i686-linux
Date: Mon, 24 Jan 2022 18:15:09 +0100	[thread overview]
Message-ID: <87czkhqcma.fsf@gnu.org> (raw)
In-Reply-To: <87o841qdh4.fsf@inria.fr> ("Ludovic Courtès"'s message of "Mon, 24 Jan 2022 17:56:39 +0100")

Ludovic Courtès <ludo@gnu.org> skribis:

> ‘guix-packages-base.drv’ fails to build due to a Guile segfault (!):
>
> [653/656] compiling...	 99.1% of 328 files[654/656] compiling...	 99.4% of 328 files[655/656] compiling...	 99.7% of 328 filesGC Warning: Failed to expand heap by 8388608 bytes
> GC Warning: Failed to expand heap by 8388608 bytes
> GC Warning: Failed to expand heap by 8388608 bytes
>
> [...]
>
> GC Warning: Failed to expand heap by 8388608 bytes
> GC Warning: Failed to expand heap by 8388608 bytes
> builder for `/gnu/store/cnrmdbcyy8r9bs2gl2kgpnyplivrzf5c-guix-packages-base.drv' failed due to signal 11 (Segmentation fault)
> @ build-failed /gnu/store/cnrmdbcyy8r9bs2gl2kgpnyplivrzf5c-guix-packages-base.drv - 1 builder for `/gnu/store/cnrmdbcyy8r9bs2gl2kgpnyplivrzf5c-guix-packages-base.drv' failed due to signal 11 (Segmentation fault)

On closer inspection, this is caused by OOM, with Guile peaking at 2.8G
resident (!) at that point, more than on x86_64.

I’m quite sure this is because the compiler resorts to bignums more than
on x86_64 (fixnums are smaller), thereby consuming more heap.

Splitting creates-io.scm into two files might work as a temporary
workaround since the compiler creates a number of labels (integers)
roughly proportional to the number of lines in the file:

--8<---------------cut here---------------start------------->8---
$ wc -l gnu/packages/*.scm|sort -k1 -n |tail
   13977 gnu/packages/java.scm
   15275 gnu/packages/bioconductor.scm
   15929 gnu/packages/bioinformatics.scm
   16086 gnu/packages/haskell-xyz.scm
   20378 gnu/packages/lisp-xyz.scm
   28770 gnu/packages/python-xyz.scm
   29960 gnu/packages/emacs-xyz.scm
   32071 gnu/packages/cran.scm
   70442 gnu/packages/crates-io.scm
  690662 totalo
--8<---------------cut here---------------end--------------->8---

Background:

  https://lists.gnu.org/archive/html/guile-devel/2017-10/msg00035.html
  https://lists.gnu.org/archive/html/guile-devel/2020-02/msg00023.html
  https://wingolog.org/archives/2020/06/03/a-baseline-compiler-for-guile

Ludo’.




  reply	other threads:[~2022-01-24 17:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 16:56 bug#53506: guix-packages-base.drv leads to segfault on i686-linux Ludovic Courtès
2022-01-24 17:15 ` Ludovic Courtès [this message]
2022-02-07 22:00   ` Ludovic Courtès
2022-02-08 14:03     ` Maxim Cournoyer
2022-02-12  0:28     ` André Batista
2022-02-12 14:24       ` Ludovic Courtès
2022-07-18 20:12         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czkhqcma.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=53506@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).