unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48855: Segfault while attempting to use --with-git-url
@ 2021-06-05 23:45 Maxim Cournoyer
  2021-06-26  8:52 ` Ludovic Courtès
  2021-06-30 10:02 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2021-06-05 23:45 UTC (permalink / raw)
  To: 48855

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#48855: Segfault while attempting to use --with-git-url
  2021-06-05 23:45 bug#48855: Segfault while attempting to use --with-git-url Maxim Cournoyer
@ 2021-06-26  8:52 ` Ludovic Courtès
  2021-06-30 10:02 ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-06-26  8:52 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 48855

[-- Attachment #1: Type: text/plain, Size: 918 bytes --]

Hello,

Maxim Cournoyer <maxim.cournoyer@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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 580 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 2744 bytes --]


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@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
--8<---------------cut here---------------end--------------->8---

To be continued…

Ludo’.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#48855: Segfault while attempting to use --with-git-url
  2021-06-05 23:45 bug#48855: Segfault while attempting to use --with-git-url Maxim Cournoyer
  2021-06-26  8:52 ` Ludovic Courtès
@ 2021-06-30 10:02 ` Ludovic Courtès
  2021-06-30 17:32   ` Maxim Cournoyer
  2021-07-21 22:04   ` Ludovic Courtès
  1 sibling, 2 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-06-30 10:02 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 48855

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#48855: Segfault while attempting to use --with-git-url
  2021-06-30 10:02 ` Ludovic Courtès
@ 2021-06-30 17:32   ` Maxim Cournoyer
  2021-07-21 22:04   ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2021-06-30 17:32 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 48855

Hello!

Ludovic Courtès <ludo@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#48855: Segfault while attempting to use --with-git-url
  2021-06-30 10:02 ` Ludovic Courtès
  2021-06-30 17:32   ` Maxim Cournoyer
@ 2021-07-21 22:04   ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-07-21 22:04 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 48855-done

Hey!

Ludovic Courtès <ludo@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-21 22:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 23:45 bug#48855: Segfault while attempting to use --with-git-url Maxim Cournoyer
2021-06-26  8:52 ` Ludovic Courtès
2021-06-30 10:02 ` Ludovic Courtès
2021-06-30 17:32   ` Maxim Cournoyer
2021-07-21 22:04   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).