GNU bug report logs - #48855
Segfault while attempting to use --with-git-url

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sat, 5 Jun 2021 23:46: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 48855 in the body.
You can then email your comments to 48855 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#48855; Package guix. (Sat, 05 Jun 2021 23:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 05 Jun 2021 23:46:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Segfault while attempting to use --with-git-url
Date: Sat, 05 Jun 2021 19:45:02 -0400
Hi,

Trying to build our latest ppsspp package using:

$ ./pre-inst-env guix build ppsspp \
  --with-git-url=ppsspp=https://github.com/hrydgard/ppsspp

I get either

--8<---------------cut here---------------start------------->8---
updating submodule 'ext/SPIRV-Cross'...
indexing objects  91% [##########################################################################################################################################################################                 ]Segmentation fault
--8<---------------cut here---------------end--------------->8---

or

--8<---------------cut here---------------start------------->8---
updating checkout of 'https://github.com/hrydgard/ppsspp'...
updating submodule 'dx9sdk'...
updating submodule 'ext/SPIRV-Cross'...
updating submodule 'ext/armips'...
receiving objects  73% [########################################################################################################################################                                                  ]Illegal instruction
--8<---------------cut here---------------end--------------->8---

or

--8<---------------cut here---------------start------------->8---
updating checkout of 'https://github.com/hrydgard/ppsspp'...
updating submodule 'dx9sdk'...
updating submodule 'ext/SPIRV-Cross'...
updating submodule 'ext/armips'...
updating submodule 'ext/discord-rpc'...
updating submodule 'ext/glslang'...
updating submodule 'ext/miniupnp'...
updating submodule 'ext/native/tools/prebuilt'...
updating submodule 'ext/rapidjson'...
updating submodule 'thirdparty/gtest'...
Backtrace:
In guix/packages.scm:
  1244:18 19 (_)
In guix/store.scm:
  2068:24 18 (run-with-store #<store-connection 256.99 7fe81af09910> _ #:guile-for-build _ #:system _ #:target _)
   1902:8 17 (_ _)
In guix/gexp.scm:
   256:18 16 (_ _)
In ice-9/boot-9.scm:
  1747:15 15 (with-exception-handler #<procedure 7fe80c6ed060 at ice-9/boot-9.scm:1831:7 (exn)> _ #:unwind? _ #:unwind-for-type _)
In guix/git.scm:
   574:16 14 (_)
    473:8 13 (latest-repository-commit #<store-connection 256.99 7fe81af09910> "https://github.com/hrydgard/ppsspp" #:recursive? _ #:log-port _ #:cache-directory _ #:ref _)
    403:7 12 (update-cached-checkout _ #:ref _ #:recursive? _ #:check-out? _ #:starting-commit _ #:log-port _ #:cache-directory _)
In srfi/srfi-1.scm:
    634:9 11 (for-each #<procedure 7fe80c6f3db0 at guix/git.scm:289:12 (name)> _)
In guix/git.scm:
   301:20 10 (_ _)
In srfi/srfi-1.scm:
    634:9  9 (for-each #<procedure 7fe80c499a20 at guix/git.scm:289:12 (name)> ("thirdparty/gtest"))
In guix/git.scm:
   293:16  8 (_ _)
In git/submodule.scm:
   204:14  7 (_ . _)
In unknown file:
Exception thrown while printing backtrace:
In procedure primitive-call-ip: Wrong type argument in position 1 (expecting PRIMITIVE_P): #<procedure 7fe80b9a4fc0 (_ _ _)>

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure scm_from_stringn: NULL string pointer
--8<---------------cut here---------------end--------------->8---

It seems there's a bug in guile-git.

Thank you,

Maxim




Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 06 Jun 2021 21:15:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#48855; Package guix. (Sat, 26 Jun 2021 08:53:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 48855 <at> debbugs.gnu.org
Subject: Re: bug#48855: Segfault while attempting to use --with-git-url
Date: Sat, 26 Jun 2021 10:52:44 +0200
[Message part 1 (text/plain, inline)]
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> $ ./pre-inst-env guix build ppsspp \
>   --with-git-url=ppsspp=https://github.com/hrydgard/ppsspp
>
> I get either
>
> updating submodule 'ext/SPIRV-Cross'...
> indexing objects  91% [##########################################################################################################################################################################                 ]Segmentation fault
>
>
> or
>
> updating checkout of 'https://github.com/hrydgard/ppsspp'...
> updating submodule 'dx9sdk'...
> updating submodule 'ext/SPIRV-Cross'...
> updating submodule 'ext/armips'...
> receiving objects  73% [########################################################################################################################################                                                  ]Illegal instruction

For the record, a possible workaround is:

[Message part 2 (text/x-patch, inline)]
diff --git a/guix/git.scm b/guix/git.scm
index 9c6f326c36..a180d12acc 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -291,7 +291,8 @@ dynamic extent of EXP."
                 (format log-port (G_ "updating submodule '~a'...~%")
                         name)
                 (submodule-update submodule
-                                  #:fetch-options fetch-options)
+                                  #:fetch-options
+                                  (make-default-fetch-options))
 
                 ;; Recurse in SUBMODULE.
                 (let ((directory (string-append
[Message part 3 (text/plain, inline)]
This has to do with fetch options/progress callbacks being reclaimed too
early.  The backtrace upon segfault looks like this:

--8<---------------cut here---------------start------------->8---
(gdb) bt
#0  0x00007f83dc798a3e in get_callee_vcode (thread=thread <at> entry=0x7f83dbe2fd80) at vm.c:1499
#1  0x00007f83dc7a08a4 in scm_call_n (
    proc=proc <at> entry=<error reading variable: ERROR: Cannot access memory at address 0xe0>0xe0, 
    argv=argv <at> entry=0x7ffe6426d200, nargs=2) at vm.c:1606
#2  0x00007f83dc729fcc in invoke_closure (cif=0x7f83cbbfc580, ret=0x7ffe6426d420, args=0x7ffe6426d270, data=0xe0)
    at foreign.c:1100
#3  0x00007f83dc463ed1 in ffi_closure_unix64_inner ()
   from /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/lib/libffi.so.7
#4  0x00007f83dc464800 in ffi_closure_unix64 ()
   from /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/lib/libffi.so.7
#5  0x00007f83c6e452a1 in do_progress_callback (stats=stats <at> entry=0xd843c0, idx=<optimized out>, idx=<optimized out>)
    at /tmp/guix-build-libgit2-1.1.0.drv-0/libgit2-1.1.0/src/indexer.c:562
#6  0x00007f83c6e457cb in git_indexer_append (idx=0xdc3930, data=<optimized out>, size=<optimized out>, 
    stats=0xd843c0) at /tmp/guix-build-libgit2-1.1.0.drv-0/libgit2-1.1.0/src/indexer.c:809
#7  0x00007f83c6e9c6df in git_smart__download_pack (transport=0xda08a0, repo=<optimized out>, stats=0xd843c0, 
    progress_cb=0x7f83d8da50b8, progress_payload=<optimized out>)
    at /tmp/guix-build-libgit2-1.1.0.drv-0/libgit2-1.1.0/src/transports/smart_protocol.c:582
#8  0x00007f83c6e7a15b in git_remote_download (remote=remote <at> entry=0xd842f0, refspecs=refspecs <at> entry=0x0, 
    opts=opts <at> entry=0x7ffe6426d808) at /tmp/guix-build-libgit2-1.1.0.drv-0/libgit2-1.1.0/src/remote.c:989
#9  0x00007f83c6e7ae0e in git_remote_fetch (remote=0xd842f0, refspecs=refspecs <at> entry=0x0, 
    opts=opts <at> entry=0x7ffe6426d808, reflog_message=reflog_message <at> entry=0x0)
    at /tmp/guix-build-libgit2-1.1.0.drv-0/libgit2-1.1.0/src/remote.c:1025
#10 0x00007f83c6e909d9 in git_submodule_update (sm=0xd81360, init=1, _update_options=<optimized out>)
    at /tmp/guix-build-libgit2-1.1.0.drv-0/libgit2-1.1.0/src/submodule.c:1352
#11 0x00007f83dc46466d in ffi_call_unix64 ()
   from /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/lib/libffi.so.7
#12 0x00007f83dc462ac0 in ffi_call_int () from /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/lib/libffi.so.7
#13 0x00007f83dc72a33e in scm_i_foreign_call (cif_scm=<optimized out>, pointer_scm=<optimized out>, 
    errno_ret=errno_ret <at> entry=0x7ffe6426dc9c, argv=0x7f83ce7d7880) at foreign.c:1073
--8<---------------cut here---------------end--------------->8---

To be continued…

Ludo’.

Information forwarded to bug-guix <at> gnu.org:
bug#48855; Package guix. (Wed, 30 Jun 2021 10:03:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 48855 <at> debbugs.gnu.org
Subject: Re: bug#48855: Segfault while attempting to use --with-git-url
Date: Wed, 30 Jun 2021 12:02:28 +0200
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> $ ./pre-inst-env guix build ppsspp \
>   --with-git-url=ppsspp=https://github.com/hrydgard/ppsspp
>
> I get either
>
> updating submodule 'ext/SPIRV-Cross'...
> indexing objects  91% [##########################################################################################################################################################################                 ]Segmentation fault
>
>
> or
>
> updating checkout of 'https://github.com/hrydgard/ppsspp'...
> updating submodule 'dx9sdk'...
> updating submodule 'ext/SPIRV-Cross'...
> updating submodule 'ext/armips'...
> receiving objects  73% [########################################################################################################################################                                                  ]Illegal instruction

I believe this is now fixed in Guile-Git:

  https://gitlab.com/guile-git/guile-git/-/commit/1d7cc8cdb61fc231eca4291005ff74f3fb8ae502

You can give it a try for instance by first building Guix against the
latest Guile-Git:

  guix build guix \
    --with-git-url=guile-git=https://gitlab.com/guile-git/guile-git

and then clearing your cache and retrying the command above against that
freshly-built Guix:

  rm -rf ~/.cache/guix/checkouts/o5kwpub222hrjpef5n2t7chjqb2rptwgkolyld3e6u7tvukuhjra
  /gnu/store/…/bin/guix build ppsspp \
    --with-git-url=ppsspp=https://github.com/hrydgard/ppsspp

If it works for you, I’ll cut a 0.5.2 Guile-Git release.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#48855; Package guix. (Wed, 30 Jun 2021 17:34:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 48855 <at> debbugs.gnu.org
Subject: Re: bug#48855: Segfault while attempting to use --with-git-url
Date: Wed, 30 Jun 2021 13:32:51 -0400
Hello!

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

[...]

> I believe this is now fixed in Guile-Git:
>
>   https://gitlab.com/guile-git/guile-git/-/commit/1d7cc8cdb61fc231eca4291005ff74f3fb8ae502
>
> You can give it a try for instance by first building Guix against the
> latest Guile-Git:
>
>   guix build guix \
>     --with-git-url=guile-git=https://gitlab.com/guile-git/guile-git
>
> and then clearing your cache and retrying the command above against that
> freshly-built Guix:
>
>   rm -rf ~/.cache/guix/checkouts/o5kwpub222hrjpef5n2t7chjqb2rptwgkolyld3e6u7tvukuhjra
>   /gnu/store/…/bin/guix build ppsspp \
>     --with-git-url=ppsspp=https://github.com/hrydgard/ppsspp
>
> If it works for you, I’ll cut a 0.5.2 Guile-Git release.

The above test succeeds for me!  Thank you for the prompt resolution
:-).

Maxim




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 21 Jul 2021 22:05:01 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Wed, 21 Jul 2021 22:05:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 48855-done <at> debbugs.gnu.org
Subject: Re: bug#48855: Segfault while attempting to use --with-git-url
Date: Thu, 22 Jul 2021 00:04:27 +0200
Hey!

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

> I believe this is now fixed in Guile-Git:
>
>   https://gitlab.com/guile-git/guile-git/-/commit/1d7cc8cdb61fc231eca4291005ff74f3fb8ae502
>
> You can give it a try for instance by first building Guix against the
> latest Guile-Git:
>
>   guix build guix \
>     --with-git-url=guile-git=https://gitlab.com/guile-git/guile-git
>
> and then clearing your cache and retrying the command above against that
> freshly-built Guix:
>
>   rm -rf ~/.cache/guix/checkouts/o5kwpub222hrjpef5n2t7chjqb2rptwgkolyld3e6u7tvukuhjra
>   /gnu/store/…/bin/guix build ppsspp \
>     --with-git-url=ppsspp=https://github.com/hrydgard/ppsspp
>
> If it works for you, I’ll cut a 0.5.2 Guile-Git release.

Done and upgraded in commit de1ae96184ecf538e27dc9c42b820476c48fe609!

Ludo’.




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

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

Previous Next


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