From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1527765] Re: sh4: ghc randomly segfaults on qemu-sh4-static
Date: Mon, 22 May 2017 11:17:00 -0000 [thread overview]
Message-ID: <149545181996.6496.6895309386081423077.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 20151218220640.25998.28926.malonedeb@soybean.canonical.com
Just tested with the latest git snapshot of qemu, still no improvement:
...
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for GHC Git commit id... given 4986837f8168cacf95c24fecc84d7b36c47f3c11
checking version of ghc... 8.0.1
ghc: pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
ghc: pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
ghc: pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Bootstrapping GHC is a cross compiler. This probably isn't going to work
checking build system type... sh4-unknown-linux-gnu
checking host system type... sh4-unknown-linux-gnu
checking target system type... sh4-unknown-linux-gnu
Build platform inferred as: sh4-unknown-linux
Host platform inferred as: sh4-unknown-linux
Target platform inferred as: sh4-unknown-linux
GHC build : sh4-unknown-linux
GHC host : sh4-unknown-linux
GHC target : sh4-unknown-linux
configure: Building in-tree ghc-pwd
(hangs here)
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1527765
Title:
sh4: ghc randomly segfaults on qemu-sh4-static
Status in QEMU:
New
Bug description:
Hello!
I am currently in the process of bootstrapping ghc for the Debian sh4
port and ran into a strange problem with qemu-sh4-static which
randomly segfaults when running ghc to compile a Haskell source:
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ls
Main.hi Main.hs Setup.hs ghc-pwd.cabal ghc.mk
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[1 of 1] Compiling Main ( Main.hs, Main.o )
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[1 of 1] Compiling Main ( Main.hs, Main.o )
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[1 of 1] Compiling Main ( Main.hs, Main.o )
Bad interface file: /usr/local/lib/sh4-unknown-linux-gnu-ghc-7.10.3/time/dist-install/build/Data/Time/Format/Parse.hi
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.3 for sh4-unknown-linux):
getSymtabName:unknown known-key unique
<<details unavailable>>
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
root@jessie32:~/ghc-7.8.4/utils/ghc-pwd#
As seen above, compiling a Haskell source code often results in a
segfault but simply by retrying to run ghc over and over again, the
compile process will eventually succeed and no segfault occurs.
I have created a tarball which contains the sh4 chroot from the
example above which also includes ghc, gcc and the source code in
question (in /root/ghc-7.8.4/utils/ghc-pwd). To test, it's probably a
good idea to replace the qemu-sh4-static binary in /usr/bin with a
current git snapshot (which I tried but didn't help).
> http://users.physik.fu-berlin.de/~glaubitz/sid-sh4-sbuild-ghc.tgz
In case anyone wants to try ghc with their own sh4 chroot, here's my
version of ghc:
> https://people.debian.org/~glaubitz/sh4-unknown-linux-gnu-
ghc-7.10.3.tar.gz
Just extract this tarball into the root directory of the sh4 chroot.
Please note, that it might be advisable on sh4 to apply the patches
from these two bug reports as otherwise qemu-sh4-static won't work
properly on amd64 and misses syscall 186:
> https://bugs.launchpad.net/ubuntu/+source/qemu-linaro/+bug/1254824
> https://bugs.launchpad.net/qemu/+bug/1516408
The above issue is reproducible with the two patches applied and
without. It's also reproducible with both libc6 2.19 and 2.21 in the
chroot. Thus, I am currently out of ideas what else to test.
Cheers,
Adrian
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1527765/+subscriptions
next prev parent reply other threads:[~2017-05-22 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 22:06 [Qemu-devel] [Bug 1527765] [NEW] sh4: ghc randomly segfaults on qemu-sh4-static John Paul Adrian Glaubitz
2015-12-18 23:22 ` [Qemu-devel] [Bug 1527765] " Laurent Vivier
2015-12-25 8:12 ` John Paul Adrian Glaubitz
2017-05-22 11:17 ` John Paul Adrian Glaubitz [this message]
2021-04-22 4:58 ` Thomas Huth
2021-06-22 4:17 ` Launchpad Bug Tracker
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=149545181996.6496.6895309386081423077.malone@chaenomeles.canonical.com \
--to=glaubitz@physik.fu-berlin.de \
--cc=1527765@bugs.launchpad.net \
--cc=qemu-devel@nongnu.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.