From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCNcB-0005Tg-Jc for qemu-devel@nongnu.org; Fri, 25 Dec 2015 03:20:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCNc7-0007vb-WC for qemu-devel@nongnu.org; Fri, 25 Dec 2015 03:20:43 -0500 Received: from indium.canonical.com ([91.189.90.7]:33182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCNc7-0007vR-OI for qemu-devel@nongnu.org; Fri, 25 Dec 2015 03:20:39 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1aCNc7-0006pB-24 for ; Fri, 25 Dec 2015 08:20:39 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 046762E80BB for ; Fri, 25 Dec 2015 08:20:39 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 25 Dec 2015 08:12:15 -0000 From: John Paul Adrian Glaubitz Sender: bounces@canonical.com References: <20151218220640.25998.28926.malonedeb@soybean.canonical.com> Message-Id: <20151225081216.25729.38501.malone@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1527765] Re: sh4: ghc randomly segfaults on qemu-sh4-static Reply-To: Bug 1527765 <1527765@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Interestingly, cmake also seems to crash in a similar way: - Log: https://buildd.debian.org/status/fetch.php?pkg=3Dapt-cacher-ng&arch= =3Dsh4&ver=3D0.8.8-1&stamp=3D1450985460 - Log: https://buildd.debian.org/status/fetch.php?pkg=3Dtexworks&arch=3Dsh4= &ver=3D0.5~svn1363-6%2Bb1&stamp=3D1450992669 - Log: https://buildd.debian.org/status/fetch.php?pkg=3Dx265&arch=3Dsh4&ver= =3D1.8-6&stamp=3D1450995672 - Log: https://buildd.debian.org/status/fetch.php?pkg=3Dlibwebsockets&arch= =3Dsh4&ver=3D1.6.0-2&stamp=3D1450997039 Maybe those are related? -- = 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 =C2=A0=C2=A0=C2=A0=C2=A0ghc: panic! (the 'impossible' happened) =C2=A0=C2=A0(GHC version 7.10.3 for sh4-unknown-linux): =C2=A0getSymtabName:unknown known-key unique <
> 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