GNU bug report logs - #59365
make-dynamic-linker-cache OOMs for LLVM 15 on i686-linux

Previous Next

Package: guix;

Reported by: Marius Bakke <marius <at> gnu.org>

Date: Fri, 18 Nov 2022 18:42:02 UTC

Severity: important

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Marius Bakke <marius <at> gnu.org>
Cc: 59365 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Greg Hogan <code <at> greghogan.com>
Subject: bug#59365: make-dynamic-linker-cache OOMs for LLVM 15 on i686-linux
Date: Thu, 03 Apr 2025 23:30:21 +0200
Hi,

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

> diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm
> index 2a74d51dd9..8a38dde1eb 100644
> --- a/guix/build/gremlin.scm
> +++ b/guix/build/gremlin.scm
> @@ -250,7 +250,11 @@ (define (file-dynamic-info file)
>  info."
>    (call-with-input-file file
>      (lambda (port)
> -      (elf-dynamic-info (parse-elf (get-bytevector-all port))))))
> +      (elf-dynamic-info (parse-elf
> +                         ;; Read at most 10 MiB in memory, which should be
> +                         ;; enough to get the PT_DYNAMIC segment.
> +                         ;; TODO: mmap the whole file instead.
> +                         (get-bytevector-n port (* 10 (expt 2 20))))))))
>  

I was pondering whether to include it on the ‘core-packages-team’
branch, and the answer is no: I quickly found a counterexample where
this hack breaks badly:

--8<---------------cut here---------------start------------->8---
scheme@(guix build gremlin)> (file-dynamic-info "/home/ludo/.guix-home/profile/lib/libgs.so")
ice-9/boot-9.scm:1683:22: In procedure raise-exception:
ERROR:
  1. &invalid-segment-size:
      elf: #<<elf> bytes: #vu8(127 69 76 70 2 1 1 0 0 0 0 0 0 0 0 0 3 0 62 0 1 0 0 0 0 0 …
--8<---------------cut here---------------end--------------->8---

… where:

--8<---------------cut here---------------start------------->8---
$ du -hsL ~/.guix-home/profile/lib/libgs.so
22M	/home/ludo/.guix-home/profile/lib/libgs.so
$ readlink -f ~/.guix-home/profile/lib/libgs.so
/gnu/store/h63c568fnky1kjdk00q5clsba9icg88n-ghostscript-9.56.1/lib/libgs.so.9.56
--8<---------------cut here---------------end--------------->8---

Ludo’.




This bug report was last modified 72 days ago.

Previous Next


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