Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guix pull segfaults #7

Closed
mschilli87 opened this issue May 25, 2020 · 7 comments
Closed

guix pull segfaults #7

mschilli87 opened this issue May 25, 2020 · 7 comments

Comments

@mschilli87
Copy link

I installed guix, started the daemon and all is fine. I can seach and install packages to my profile without root, create containers etc.

However, guix pull segfaults right away after printing

Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...

This is an issue as a) I won't get updates for packages without updating the guix package using portage (requires root), and b) I can't add any channels to build software non-foss software.

Is there anything special I might have missed that I need to do to get guix pull working on Gentoo or is this a (known) bug/limitation?

Thanks for your help and getting me this far to begin with.

@trofi
Copy link
Owner

trofi commented May 25, 2020

Having SIGSEGV is unexpected. guix pull works here:

guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git	868a186
downloading from https://ci.guix.gnu.org/nar/gzip/l1iakyjw5lacjbnynm6z7b31clyh1llx-ghostscript-9.27-doc...
 ghostscript-9.27-doc  3.9MiB
...
Computing Guix derivation for 'x86_64-linux'...
...
News for channel 'guix'
  Add support to boot from a Btrfs subvolume
  `guix pack -RR' introduces a new execution engine
  New `--path' option for `guix graph'
  GNU C Library upgraded
  Guix Cookbook now available as Info
  Further reduced binary seed bootstrap
  Rottlog service added to `%base-services'
  `guile' package now refers to version 3.0
  `guix pull' now supports SSH authenticated repositories
  Guix now runs on Guile 3.0

Seems to work.

Can you extract a backtrace? Also check if dmesg complain about OOM crash in case it's a problem in lack of memory.

@mschilli87
Copy link
Author

mschilli87 commented May 25, 2020

dmesg only has

[18146.392676] guix[6148]: segfault at c800010009 ip 00007fbb320cf144 sp 00007ffe7b5c8e80 error 4 in libgit2.so.0.28.4[7fbb3203e000+ad000]

There is over 15 GB of memory free on this machine.

This is the backtrace I got:

/usr/lib64/libgit2.so(+0xa6144)[0x7f01a3454144]
/usr/lib64/libhttp_parser.so.2.9(http_parser_execute+0x1dbf)[0x7f01a312e1ef]
/usr/lib64/libgit2.so(+0xa7e72)[0x7f01a3455e72]
/usr/lib64/libgit2.so(+0xa94d1)[0x7f01a34574d1]
/usr/lib64/libgit2.so(+0xab6b0)[0x7f01a34596b0]
/usr/lib64/libgit2.so(+0xa9c3c)[0x7f01a3457c3c]
/usr/lib64/libgit2.so(+0x89069)[0x7f01a3437069]
/usr/lib64/libgit2.so(git_remote_fetch+0xbe)[0x7f01a34389fe]
//usr/lib64/libffi.so.7(+0x6c2d)[0x7f01b57b1c2d]
//usr/lib64/libffi.so.7(+0x61ac)[0x7f01b57b11ac]
/usr/lib64/libguile-2.2.so.1(+0x561e1)[0x7f01b5a3b1e1]
/usr/lib64/libguile-2.2.so.1(+0xc4e31)[0x7f01b5aa9e31]
/usr/lib64/libguile-2.2.so.1(scm_call_n+0x1a0)[0x7f01b5aaf690]
/usr/lib64/libguile-2.2.so.1(scm_primitive_eval+0x27)[0x7f01b5a2f8c7]
/usr/lib64/libguile-2.2.so.1(scm_eval+0x56)[0x7f01b5a2f926]
/usr/lib64/libguile-2.2.so.1(scm_shell+0x46)[0x7f01b5a7cb26]
/usr/lib64/libguile-2.2.so.1(+0x619bd)[0x7f01b5a469bd]
/usr/lib64/libguile-2.2.so.1(+0x4368a)[0x7f01b5a2868a]
/usr/lib64/libguile-2.2.so.1(+0xc4d28)[0x7f01b5aa9d28]
/usr/lib64/libguile-2.2.so.1(scm_call_n+0x1a0)[0x7f01b5aaf690]
/usr/lib64/libguile-2.2.so.1(+0xb8d18)[0x7f01b5a9dd18]
/usr/lib64/libguile-2.2.so.1(+0x43c83)[0x7f01b5a28c83]
/usr/lib64/libguile-2.2.so.1(scm_c_with_continuation_barrier+0x45)[0x7f01b5a28d65]
/usr/lib64/libguile-2.2.so.1(+0xb7786)[0x7f01b5a9c786]
//usr/lib64/libgc.so.1(GC_call_with_stack_base+0x27)[0x7f01b57c7af7]
/usr/lib64/libguile-2.2.so.1(scm_with_guile+0x38)[0x7f01b5a9cb78]
/usr/lib64/libguile-2.2.so.1(scm_boot_guile+0x52)[0x7f01b5a46b82]
/usr/bin/guile(+0x1130)[0x5570f1846130]
/lib64/libc.so.6(__libc_start_main+0xeb)[0x7f01b584fe0b]
/usr/bin/guile(+0x11da)[0x5570f18461da]

@trofi
Copy link
Owner

trofi commented May 25, 2020

Aha, looks like a memory corruption, possibly in guile/libgit/http-parser bindings. What versions of dev-libs/libgit2 / dev-scheme/guile-git / net-libs/http-parser you have installed?

The following should dump it:

$ emerge --info dev-libs/libgit2 dev-scheme/guile-git net-libs/http-parser

I'll try to reproduce locally and if that fails we might need more detailed backtrace.

@mschilli87
Copy link
Author

mschilli87 commented May 25, 2020

dev-libs/libgit2-0.28.4::gentoo was built with the following:
USE="libressl ssh threads -examples -gssapi -test -trace" ABI_X86="(64)"
FEATURES="usersync preserve-libs unmerge-logs distlocks ipc-sandbox binpkg-docompress config-protect-if-modified userpriv sfperms pid-sandbox binpkg-logs unknown-features-warn ebuild-locks sandbox parallel-fetch usersandbox xattr multilib-strict unmerge-orphans assume-digests userfetch merge-sync news strict protect-owned fixlafiles binpkg-dostrip network-sandbox"


dev-scheme/guile-git-0.3.0::gentoo was built with the following:
USE="" ABI_X86="(64)"


net-libs/http-parser-2.9.3::gentoo was built with the following:
USE="-static-libs" ABI_X86="(64) -32 (-x32)"

@mschilli87
Copy link
Author

@trofi: Let me know if there is any additional information I could provide to track this down.

@mschilli87
Copy link
Author

Updating dev-libs/libgit2 from 0.28.4 to 1.0.0-r1 seems to have fixed the issue.

@trofi: Thank you so much for your quick response. ❤️

@trofi
Copy link
Owner

trofi commented Jun 5, 2020

Ahm thanks for tracking it down! Sorry, my input was not very useful. I hoped to get to SIGSEGV reproduction to understand why it happens (if it's an API change problem or some random bug). Let's then increase lower bound of libgit in guile-git.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jun 5, 2020
It's not clear why old libgit2 crashes, but upgrading
to newer one helps. Let's encode it in dependencies.

Reported-by: Marcel Schilling
Bug: trofi/nix-guix-gentoo#7
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants