Guile Segfaulting on guix build -f

  • Done
  • quality assurance status badge
Details
4 participants
  • Nicolò Balzarotti
  • Julien Lepiller
  • Leo Prikler
  • Ludovic Courtès
Owner
unassigned
Submitted by
Nicolò Balzarotti
Severity
important
N
N
Nicolò Balzarotti wrote on 13 Apr 2021 23:36
(address . bug-guix@gnu.org)
87im4pooif.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Hi guix!

A package definition that used to build fine, recently (don't know
exactly when) started failing, with guile segfaulting.

After removing a few things, it seems that the MWE is this:

echo '(use-modules (guix git-download)) (git-predicate "repo")'>m.scm
mkdir repo
guix build -f m.scm
Segmentation fault

guix describe:

guix 2a62425
branch: master
commit: 2a624253bc55e2a94f6581d6e790303575436c96

One of the two computers provides substitute to the other, so maybe my
guile is somehow damaged? Can any of you reproduce it?

Thanks, Nicolò
N
N
Nicolò Balzarotti wrote on 13 Apr 2021 23:52
(address . bug-guix@gnu.org)
87eefdonrf.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Nicolò Balzarotti <anothersms@gmail.com> writes:

Toggle quote (4 lines)
> mkdir repo
> guix build -f m.scm
> Segmentation fault

I wanted to add that

$ guile m.scm

does not crash, don't know if this is of any help
J
J
Julien Lepiller wrote on 14 Apr 2021 00:33
Re: bug#47761: Guile Segfaulting on guix build -f
(name . Nicolò Balzarotti)(address . anothersms@gmail.com)(address . 47761@debbugs.gnu.org)
20210414003358.54fa9c37@tachikoma.lepiller.eu
Le Tue, 13 Apr 2021 23:36:40 +0200,
Nicolò Balzarotti <anothersms@gmail.com> a écrit :

Toggle quote (27 lines)
> Hi guix!
>
> A package definition that used to build fine, recently (don't know
> exactly when) started failing, with guile segfaulting.
>
> After removing a few things, it seems that the MWE is this:
>
> echo '(use-modules (guix git-download)) (git-predicate "repo")'>m.scm
> mkdir repo
> guix build -f m.scm
> Segmentation fault
>
> guix describe:
>
> guix 2a62425
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 2a624253bc55e2a94f6581d6e790303575436c96
>
> One of the two computers provides substitute to the other, so maybe my
> guile is somehow damaged? Can any of you reproduce it?
>
> Thanks, Nicolò
>
>
>

I can reproduce the segfault when "repo" is a directory that exists
(seems to be independent from content, I can reproduce with an empty
directory and an actually git repository), from guix repl:

scheme@(guix-user)> (use-modules (guix git-download))
scheme@(guix-user)> (git-predicate "repo")
Erreur de segmentation
L
L
Leo Prikler wrote on 14 Apr 2021 00:54
Re: Guile Segfaulting on guix build -f
f3d7037dc9fa22d3d71134dd752cca39cd32ce5d.camel@student.tugraz.at
Hi Nicolò

Am Dienstag, den 13.04.2021, 23:36 +0200 schrieb Nicolò Balzarotti:
Toggle quote (22 lines)
> Hi guix!
>
> A package definition that used to build fine, recently (don't know
> exactly when) started failing, with guile segfaulting.
>
> After removing a few things, it seems that the MWE is this:
>
> echo '(use-modules (guix git-download)) (git-predicate "repo")'>m.scm
> mkdir repo
> guix build -f m.scm
> Segmentation fault
>
> guix describe:
>
> guix 2a62425
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 2a624253bc55e2a94f6581d6e790303575436c96
>
> One of the two computers provides substitute to the other, so maybe
> my
> guile is somehow damaged? Can any of you reproduce it?
I managed to somewhat isolate the bug even further:

(let* ((directory (string-append (canonicalize-path directory) "/"))
(dot-git (repository-discover directory)) ; <- here
(repository (repository-open dot-git))
(workdir (repository-working-directory repository))
(head (repository-head repository))
(oid (reference-target head))
(commit (commit-lookup repository oid))
(tree (commit-tree commit))
(files (tree-list tree)))

repository-discover is an FFI call into libgit2, that appears to be
segfaulting while… trying to prettify some filename? At least that's
what "git_path_prettify", which lies on the call trace sounds like.

Regards,
Leo
L
L
Ludovic Courtès wrote on 18 Apr 2021 12:21
control message for bug #47761
(address . control@debbugs.gnu.org)
87y2dflwpk.fsf@gnu.org
severity 47761 important
quit
L
L
Ludovic Courtès wrote on 18 Apr 2021 12:22
Re: bug#47761: Guile Segfaulting on guix build -f
(name . Nicolò Balzarotti)(address . anothersms@gmail.com)(address . 47761-done@debbugs.gnu.org)
87tuo3lwof.fsf@gnu.org
Hi Nicolò,

Nicolò Balzarotti <anothersms@gmail.com> skribis:

Toggle quote (10 lines)
> A package definition that used to build fine, recently (don't know
> exactly when) started failing, with guile segfaulting.
>
> After removing a few things, it seems that the MWE is this:
>
> echo '(use-modules (guix git-download)) (git-predicate "repo")'>m.scm
> mkdir repo
> guix build -f m.scm
> Segmentation fault

This is now fixed:


Thanks!

Ludo’.
Closed
?