Segfault while attempting to use --with-git-url

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
important
M
M
Maxim Cournoyer wrote on 6 Jun 2021 01:45
(name . bug-guix)(address . bug-guix@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
878s3nkha9.fsf@gmail.com
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

Toggle snippet (4 lines)
updating submodule 'ext/SPIRV-Cross'...
indexing objects 91% [########################################################################################################################################################################## ]Segmentation fault

or

Toggle snippet (7 lines)
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

or

Toggle snippet (42 lines)
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

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

Thank you,

Maxim
L
L
Ludovic Courtès wrote on 6 Jun 2021 23:14
control message for bug #48855
(address . control@debbugs.gnu.org)
87a6o2k850.fsf@gnu.org
severity 48855 important
quit
L
L
Ludovic Courtès wrote on 26 Jun 2021 10:52
Re: bug#48855: Segfault while attempting to use --with-git-url
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 48855@debbugs.gnu.org)
87bl7t2ejn.fsf@gnu.org
Hello,

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

Toggle quote (17 lines)
> $ ./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:
Toggle diff (14 lines)
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
This has to do with fetch options/progress callbacks being reclaimed too
early. The backtrace upon segfault looks like this:

Toggle snippet (32 lines)
(gdb) bt
#0 0x00007f83dc798a3e in get_callee_vcode (thread=thread@entry=0x7f83dbe2fd80) at vm.c:1499
#1 0x00007f83dc7a08a4 in scm_call_n (
proc=proc@entry=<error reading variable: ERROR: Cannot access memory at address 0xe0>0xe0,
argv=argv@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@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@entry=0xd842f0, refspecs=refspecs@entry=0x0,
opts=opts@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@entry=0x0,
opts=opts@entry=0x7ffe6426d808, reflog_message=reflog_message@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@entry=0x7ffe6426dc9c, argv=0x7f83ce7d7880) at foreign.c:1073

To be continued…

Ludo’.
L
L
Ludovic Courtès wrote on 30 Jun 2021 12:02
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 48855@debbugs.gnu.org)
871r8jpt57.fsf@gnu.org
Hi Maxim,

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

Toggle quote (17 lines)
> $ ./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:


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’.
M
M
Maxim Cournoyer wrote on 30 Jun 2021 19:32
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 48855@debbugs.gnu.org)
87fswz45rw.fsf@gmail.com
Hello!

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

[...]

Toggle quote (19 lines)
> 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
L
L
Ludovic Courtès wrote on 22 Jul 2021 00:04
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 48855-done@debbugs.gnu.org)
87fsw7e32s.fsf@gnu.org
Hey!

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

Toggle quote (19 lines)
> 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’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 48855@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 48855
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch