From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLh3E-0007QJ-58 for qemu-devel@nongnu.org; Thu, 06 Mar 2014 17:46:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLh35-0006Jj-6H for qemu-devel@nongnu.org; Thu, 06 Mar 2014 17:46:04 -0500 Received: from indium.canonical.com ([91.189.90.7]:51008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLh35-0006Jd-00 for qemu-devel@nongnu.org; Thu, 06 Mar 2014 17:45:55 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1WLh34-0007Ri-B1 for ; Thu, 06 Mar 2014 22:45:54 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 5219C2E80AE for ; Thu, 6 Mar 2014 22:45:54 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 06 Mar 2014 22:39:15 -0000 From: Serge Hallyn <1285363@bugs.launchpad.net> Sender: bounces@canonical.com References: <20140226212641.20594.42039.malonedeb@chaenomeles.canonical.com> <20140306222907.8017.15789.malone@soybean.canonical.com> Message-Id: <20140306224651.GA27703@ac100> Errors-To: bounces@canonical.com Subject: Re: [Qemu-devel] [Bug 1285363] Re: qemu-aarch64-static segfaults Reply-To: Bug 1285363 <1285363@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Quoting Peter Maydell (peter.maydell@linaro.org): > Doing this only for aarch64 targets seems like a bad idea to me -- this > isn't an aarch64 specific issue. QEMU needs SIGSEGV to go to its own > handler (so we can unprotect pages we've marked as read-only in order to > catch guest writes to them so we can throw away invalidated translated > code), and that's true for all targets. It probably just happens more > often on the aarch64 target than others you've tested because aarch64 > has a signal-return trampoline on the stack frame, so we'll often see > that page get translated and thrown away again. (Other targets with a > trampoline include sparc, cris, openrisc and ppc.) I see. I've just pushed the customized patch to the archive. We can switch to the original patchset though. But, I'd also like to see what ends up hitting upstream. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1285363 Title: qemu-aarch64-static segfaults Status in QEMU: New Status in =E2=80=9Cqemu=E2=80=9D package in Ubuntu: Confirmed Bug description: I've found a couple conditions that causes qemu-user-static to core dump fairly reliably - same with upstream git - while a binary built from suse's aarch64-1.6 branch seems to consistently work fine. Testing suggests they are resolved by the sigprocmask wrapper patches included in suse's tree. 1) dh_fixperms is a script that commonly runs at the end of a package bu= ild. Its basically doing a `find | xargs chmod`. 2) debootstrap --second-stage This is used to configure an arm64 chroot that was built using debootstrap on a non-native host. It is basically invoking a bunch of shell scripts (postinst, etc). When it blows up, the stack consisten= tly looks like this: Core was generated by `/usr/bin/qemu-aarch64-static /bin/sh -e /debootstrap/debootstrap --second-stage'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000060058e55 in memcpy (__len=3D8, __src=3D0x7fff62ae34e0, __dest=3D0x400082c330) at /usr/include/x86_64-linux-gnu/bits/string3.h:51 51 return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); (gdb) bt #0 0x0000000060058e55 in memcpy (__len=3D8, __src=3D0x7fff62ae34e0, __dest=3D0x400082c330) at /usr/include/x86_64-linux-gnu/bits/string3.h:51 #1 stq_p (v=3D274886476624, ptr=3D0x400082c330) at /mnt/qemu.upstream/include/qemu/bswap.h:280 #2 stq_le_p (v=3D274886476624, ptr=3D0x400082c330) at /mnt/qemu.upstream/include/qemu/bswap.h:315 #3 target_setup_sigframe (set=3D0x7fff62ae3530, env=3D0x62d9c678, sf=3D0x400082b0d0) at /mnt/qemu.upstream/linux-user/signal.c:1167 #4 target_setup_frame (usig=3Dusig@entry=3D17, ka=3Dka@entry=3D0x604ec1e0 , info=3Dinfo@entry=3D0x0, set=3Dset@entry=3D0x7fff62ae= 3530, env=3Denv@entry=3D0x62d9c678) at /mnt/qemu.upstream/linux-user/signal.c:1286 #5 0x0000000060059f46 in setup_frame (env=3D0x62d9c678, set=3D0x7fff62ae3530, ka=3D0x604ec1e0 , sig=3D17) at /mnt/qemu.upstream/linux-user/signal.c:1322 #6 process_pending_signals (cpu_env=3Dcpu_env@entry=3D0x62d9c678) at /mnt/qemu.upstream/linux-user/signal.c:5747 #7 0x0000000060056e60 in cpu_loop (env=3Denv@entry=3D0x62d9c678) at /mnt/qemu.upstream/linux-user/main.c:1082 #8 0x0000000060005079 in main (argc=3D, argv=3D, envp=3D) at /mnt/qemu.upstream/linux-user/main.c:4374 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1285363/+subscriptions