unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 34427@debbugs.gnu.org
Subject: bug#34427: guile-bootstrap@2.2 segfault?
Date: Thu, 14 Apr 2022 00:01:34 +0300	[thread overview]
Message-ID: <Ylc6LgVZ80CupiQ2@pbp> (raw)
In-Reply-To: <87sfqicmu4.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 2921 bytes --]

On Tue, Apr 12, 2022 at 06:01:39PM +0200, Ludovic Courtès wrote:
> Hi,
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > On Tue, Feb 12, 2019 at 03:27:37PM +0100, Ludovic Courtès wrote:
> >> Hello Efraim,
> >> 
> >> Efraim Flashner <efraim@flashner.co.il> skribis:
> >> 
> >> > I'm testing %bootstrap-guile from bootstrap.scm and I'm getting a
> >> > segfault when runing guile --version. I've attached an strace of the
> >> > process.
> >> 
> >> To be clear, I believe this is for a *cross-compiled* Guile, right?
> >
> > That's right, %bootstrap-guile is extracted from $(guix build
> > --target=powerpc-linux-gnu bootstrap-tarballs)
> 
> Cross-compilation to aarch64-linux-gnu works fine:
> 
> --8<---------------cut here---------------start------------->8---
> $ unshare -mrf chroot $(guix build guile-static-stripped --target=aarch64-linux-gnu) /bin/guile
> guile: warning: failed to install locale
> GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
> GC Warning: Couldn't read /proc/stat
> warning: failed to install locale: Invalid argument
> GNU Guile 3.0.7
> Copyright (C) 1995-2021 Free Software Foundation, Inc.
> 
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
> 
> Enter `,help' for help.
> scheme@(guile-user)> %host-type
> $1 = "aarch64-unknown-linux-gnu"
> scheme@(guile-user)> ,q
> $ guix describe
> Generation 210  Apr 11 2022 09:34:10    (current)
>   guix 7da907f
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 7da907f90e74a4edf96d76ee457ff958265ef8d4
> --8<---------------cut here---------------end--------------->8---
> 
> The problem has to do specifically with powerpc-linux-gnu (this is with
> transparent emulation via QEMU+binfmt_misc):
> 
> --8<---------------cut here---------------start------------->8---
> $ unshare -mrf chroot $(guix build guile-static-stripped --target=powerpc-linux-gnu) /bin/guile
> guile: warning: failed to install locale
> GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
> GC Warning: Couldn't read /proc/stat
> Pre-boot error; key: wrong-type-arg, args: (#f "Wrong type to apply: ~S" (#f) (#f))qemu: uncaught target signal 6 (Aborted) - core dumped
> Aborted
> --8<---------------cut here---------------end--------------->8---
> 
> Unfortunately I fail to get a backtrace from that core dump.
> 
> Efraim, could you get a backtrace on the bare metal?
> 
> Besides, if PPC32 is the only platform that has a problem, I think this
> bug should not be a blocker.
> 
> WDYT?
> 
> Ludo’.

Here's what I get from strace when running on bare metal. I agree, if
it's only affecting ppc32 we shouldn't have it be a blocker.

[-- Attachment #1.2: guile-bootstrap-strace.log --]
[-- Type: text/plain, Size: 10806 bytes --]

28071 execve("/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/bin/guile", ["/gnu/store/imbgn3if51jxi1nhwwdb5"...], 0xaf88c21c /* 30 vars */) = 0
28071 brk(NULL)                         = 0x10849000
28071 brk(0x108498d8)                   = 0x108498d8
28071 uname({sysname="Linux", nodename="g4", ...}) = 0
28071 set_tid_address(0x10849068)       = 28071
28071 set_robust_list(0x10849070, 12)   = 0
28071 rt_sigaction(SIGRTMIN, {sa_handler=0x101154ac, sa_mask=[], sa_flags=SA_SIGINFO}, NULL, 8) = 0
28071 rt_sigaction(SIGRT_1, {sa_handler=0x1011558c, sa_mask=[], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
28071 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
28071 ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
28071 readlink("/proc/self/exe", "/gnu/store/imbgn3if51jxi1nhwwdb5"..., 4096) = 81
28071 brk(0x1086a8d8)                   = 0x1086a8d8
28071 brk(0x1086b000)                   = 0x1086b000
28071 mprotect(0x1037f000, 4096, PROT_READ) = 0
28071 openat(AT_FDCWD, "/run/current-system/locale/2.33/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-cross-powerpc-linux-gnu-2.33/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/run/current-system/locale/2.33/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/run/current-system/locale/2.33/en_US.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/run/current-system/locale/2.33/en_US/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/run/current-system/locale/2.33/en.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/run/current-system/locale/2.33/en.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/run/current-system/locale/2.33/en/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 write(2, "guile: warning: failed to instal"..., 41) = 41
28071 futex(0x10390b7c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
28071 clock_gettime64(CLOCK_PROCESS_CPUTIME_ID, {tv_sec=0, tv_nsec=2676480}) = 0
28071 openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
28071 ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
28071 statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=0, ...}) = 0
28071 read(3, "00100000-00102000 r--p 00000000 "..., 1024) = 921
28071 close(3)                          = 0
28071 sched_getaffinity(28071, 32, [0]) = 4
28071 brk(0x1087b000)                   = 0x1087b000
28071 brk(0x1088b000)                   = 0x1088b000
28071 brk(0x1089b000)                   = 0x1089b000
28071 brk(0x108ab000)                   = 0x108ab000
28071 brk(0x108bb000)                   = 0x108bb000
28071 rt_sigaction(SIGPWR, {sa_handler=0x10105b3c, sa_mask=~[INT QUIT ABRT TERM RTMIN RT_1], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
28071 rt_sigaction(SIGXCPU, {sa_handler=0x10105538, sa_mask=~[INT QUIT ABRT TERM RTMIN RT_1], sa_flags=SA_RESTART}, NULL, 8) = 0
28071 rt_sigprocmask(SIG_UNBLOCK, [XCPU PWR], NULL, 8) = 0
28071 openat(AT_FDCWD, "/proc/stat", O_RDONLY) = 3
28071 read(3, "cpu  24857880 1840144 1968808 43"..., 4096) = 1359
28071 close(3)                          = 0
28071 swapcontext(0xafd65848, 0)        = 0
28071 brk(0x109ab000)                   = 0x109ab000
28071 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7bff000
28071 pipe2([3, 4], O_CLOEXEC)          = 0
28071 futex(0x10390ad4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
28071 clock_gettime64(CLOCK_REALTIME, {tv_sec=1649883322, tv_nsec=143410442}) = 0
28071 clock_gettime64(CLOCK_PROCESS_CPUTIME_ID, {tv_sec=0, tv_nsec=8428800}) = 0
28071 openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_LARGEFILE) = 5
28071 statx(5, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFCHR|0666, stx_size=0, ...}) = 0
28071 ioctl(5, TCGETS, 0xafd65cc8)      = -1 EINVAL (Invalid argument)
28071 read(5, "\353kNl\300\255\360d\1\345%\200s\321\301.\200\2\23*c\275\260\217j\320\325\305`\216Yn"..., 4096) = 4096
28071 close(5)                          = 0
28071 openat(AT_FDCWD, "/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-cross-powerpc-linux-gnu-2.33/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
28071 openat(AT_FDCWD, "/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-cross-powerpc-linux-gnu-2.33/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
28071 futex(0x103e3804, FUTEX_WAKE_PRIVATE, 2147483647) = 0
28071 brk(0x109bb000)                   = 0x109bb000
28071 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
28071 fcntl64(0, F_GETFL)               = 0x2 (flags O_RDWR)
28071 _llseek(0, 0, 0xafd65e08, SEEK_CUR) = -1 ESPIPE (Illegal seek)
28071 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
28071 fcntl64(1, F_GETFL)               = 0x2 (flags O_RDWR)
28071 _llseek(1, 0, 0xafd65e08, SEEK_CUR) = -1 ESPIPE (Illegal seek)
28071 ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
28071 fcntl64(2, F_GETFL)               = 0x2 (flags O_RDWR)
28071 _llseek(2, 0, 0xafd65e08, SEEK_CUR) = -1 ESPIPE (Illegal seek)
28071 readlink("/proc/self/exe", "/gnu/store/imbgn3if51jxi1nhwwdb5"..., 256) = 81
28071 readlink("/gnu", 0xafd64d90, 1023) = -1 EINVAL (Invalid argument)
28071 readlink("/gnu/store", 0xafd64d90, 1023) = -1 EINVAL (Invalid argument)
28071 readlink("/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7", 0xafd64d90, 1023) = -1 EINVAL (Invalid argument)
28071 readlink("/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/bin", 0xafd64d90, 1023) = -1 EINVAL (Invalid argument)
28071 faccessat2(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/bin/", F_OK, AT_EACCESS) = 0
28071 statx(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/share/guile/3.0/ice-9/eval.scm", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=25677, ...}) = 0
28071 statx(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/lib/guile/3.0/ccache/ice-9/eval.go", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=93765, ...}) = 0
28071 openat(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/lib/guile/3.0/ccache/ice-9/eval.go", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
28071 _llseek(5, 0, [93765], SEEK_END)  = 0
28071 mmap2(NULL, 93765, PROT_READ, MAP_PRIVATE, 5, 0) = 0xa7be8000
28071 close(5)                          = 0
28071 mprotect(0xa7bf8000, 4728, PROT_READ|PROT_WRITE) = 0
28071 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
28071 statx(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/share/guile/3.0/init.scm", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 0xafd65ad8) = -1 ENOENT (No such file or directory)
28071 statx(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/share/guile/3.0/ice-9/boot-9.scm", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=170413, ...}) = 0
28071 statx(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/lib/guile/3.0/ccache/ice-9/boot-9.go", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=828061, ...}) = 0
28071 openat(AT_FDCWD, "/gnu/store/imbgn3if51jxi1nhwwdb5q9dpkhz9aff-guile-static-stripped-3.0.7/lib/guile/3.0/ccache/ice-9/boot-9.go", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
28071 _llseek(5, 0, [828061], SEEK_END) = 0
28071 mmap2(NULL, 828061, PROT_READ, MAP_PRIVATE, 5, 0) = 0xa7b1d000
28071 close(5)                          = 0
28071 mprotect(0xa7b9d000, 104824, PROT_READ|PROT_WRITE) = 0
28071 write(2, "Pre-boot error; key: ", 21) = 21
28071 write(2, "wrong-type-arg", 14)    = 14
28071 write(2, ", args: ", 8)           = 8
28071 write(2, "(", 1)                  = 1
28071 write(2, "#f", 2)                 = 2
28071 write(2, " ", 1)                  = 1
28071 write(2, "\"", 1)                 = 1
28071 write(2, "W", 1)                  = 1
28071 write(2, "r", 1)                  = 1
28071 write(2, "o", 1)                  = 1
28071 write(2, "n", 1)                  = 1
28071 write(2, "g", 1)                  = 1
28071 write(2, " ", 1)                  = 1
28071 write(2, "t", 1)                  = 1
28071 write(2, "y", 1)                  = 1
28071 write(2, "p", 1)                  = 1
28071 write(2, "e", 1)                  = 1
28071 write(2, " ", 1)                  = 1
28071 write(2, "t", 1)                  = 1
28071 write(2, "o", 1)                  = 1
28071 write(2, " ", 1)                  = 1
28071 write(2, "a", 1)                  = 1
28071 write(2, "p", 1)                  = 1
28071 write(2, "p", 1)                  = 1
28071 write(2, "l", 1)                  = 1
28071 write(2, "y", 1)                  = 1
28071 write(2, ":", 1)                  = 1
28071 write(2, " ", 1)                  = 1
28071 write(2, "~", 1)                  = 1
28071 write(2, "S", 1)                  = 1
28071 write(2, "\"", 1)                 = 1
28071 write(2, " ", 1)                  = 1
28071 write(2, "(", 1)                  = 1
28071 write(2, "#f", 2)                 = 2
28071 write(2, ")", 1)                  = 1
28071 write(2, " ", 1)                  = 1
28071 write(2, "(", 1)                  = 1
28071 write(2, "#f", 2)                 = 2
28071 write(2, ")", 1)                  = 1
28071 write(2, ")", 1)                  = 1
28071 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
28071 rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
28071 getpid()                          = 28071
28071 gettid()                          = 28071
28071 tgkill(28071, 28071, SIGABRT)     = 0
28071 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28071 --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=28071, si_uid=1000} ---
28071 +++ killed by SIGABRT +++

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-04-13 21:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11  9:11 bug#34427: guile-bootstrap@2.2 segfault? Efraim Flashner
2019-02-12  9:17 ` bug#34427: [PATCH] build guile-static with guile-2.0 Efraim Flashner
2019-02-16 16:06   ` bug#34427: [bug#34453] " Ludovic Courtès
2022-04-12 10:10     ` bug#34427: bug#34453: " zimoun
2019-02-12 14:27 ` bug#34427: guile-bootstrap@2.2 segfault? Ludovic Courtès
2019-02-12 15:44   ` Efraim Flashner
2022-04-12 10:12     ` zimoun
2022-04-12 16:01     ` Ludovic Courtès
2022-04-13 21:01       ` Efraim Flashner [this message]
2022-04-15  7:45         ` Ludovic Courtès
2022-06-23  8:17           ` zimoun
2022-10-18 16:14             ` zimoun
2022-10-18 16:22               ` Efraim Flashner
2022-10-19 10:40                 ` zimoun
2022-10-08  2:46         ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ylc6LgVZ80CupiQ2@pbp \
    --to=efraim@flashner.co.il \
    --cc=34427@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).