GNU bug report logs - #47761
Guile Segfaulting on guix build -f

Previous Next

Package: guix;

Reported by: Nicolò Balzarotti <anothersms <at> gmail.com>

Date: Tue, 13 Apr 2021 21:37:02 UTC

Severity: important

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47761 in the body.
You can then email your comments to 47761 AT debbugs.gnu.org in the normal way.

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#47761; Package guix. (Tue, 13 Apr 2021 21:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolò Balzarotti <anothersms <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 13 Apr 2021 21:37:02 GMT) Full text and rfc822 format available.

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

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Guile Segfaulting on guix build -f
Date: Tue, 13 Apr 2021 23:36:40 +0200
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ò




Information forwarded to bug-guix <at> gnu.org:
bug#47761; Package guix. (Tue, 13 Apr 2021 21:54:02 GMT) Full text and rfc822 format available.

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

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: Guile Segfaulting on guix build -f
Date: Tue, 13 Apr 2021 23:52:52 +0200
Nicolò Balzarotti <anothersms <at> gmail.com> writes:

> 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




Information forwarded to bug-guix <at> gnu.org:
bug#47761; Package guix. (Tue, 13 Apr 2021 22:35:01 GMT) Full text and rfc822 format available.

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

From: Julien Lepiller <julien <at> lepiller.eu>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: 47761 <at> debbugs.gnu.org
Subject: Re: bug#47761: Guile Segfaulting on guix build -f
Date: Wed, 14 Apr 2021 00:33:58 +0200
Le Tue, 13 Apr 2021 23:36:40 +0200,
Nicolò Balzarotti <anothersms <at> gmail.com> a écrit :

> 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




Information forwarded to bug-guix <at> gnu.org:
bug#47761; Package guix. (Tue, 13 Apr 2021 22:55:02 GMT) Full text and rfc822 format available.

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

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Nicolò Balzarotti <anothersms <at> gmail.com>, 
 47761 <at> debbugs.gnu.org
Subject: Re: Guile Segfaulting on guix build -f
Date: Wed, 14 Apr 2021 00:54:27 +0200
Hi Nicolò

Am Dienstag, den 13.04.2021, 23:36 +0200 schrieb Nicolò Balzarotti:
> 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





Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Apr 2021 10:22:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 18 Apr 2021 10:23:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolò Balzarotti <anothersms <at> gmail.com>:
bug acknowledged by developer. (Sun, 18 Apr 2021 10:23:02 GMT) Full text and rfc822 format available.

Message #21 received at 47761-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: 47761-done <at> debbugs.gnu.org
Subject: Re: bug#47761: Guile Segfaulting on guix build -f
Date: Sun, 18 Apr 2021 12:22:08 +0200
Hi Nicolò,

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

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

  https://issues.guix.gnu.org/47797

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 May 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 346 days ago.

Previous Next


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