Received: from eggs.gnu.org ([208.118.235.92]:57775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtmQ4-0007a4-Dg for qemu-devel@nongnu.org; Fri, 11 Jan 2013 16:45:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtmPv-0001Al-4v for qemu-devel@nongnu.org; Fri, 11 Jan 2013 16:45:44 -0500 Received: from indium.canonical.com ([91.189.90.7]:57134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtmPu-0001AU-TB for qemu-devel@nongnu.org; Fri, 11 Jan 2013 16:45:35 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TtmPu-0005Rp-05 for ; Fri, 11 Jan 2013 21:45:34 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D478A2E807C for ; Fri, 11 Jan 2013 21:45:33 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 11 Jan 2013 21:40:04 -0000 From: Erik de Castro Lopo <1098729@bugs.launchpad.net> Sender: bounces@canonical.com References: <20130111214005.8995.51690.malonedeb@wampee.canonical.com> Message-Id: <20130111214005.8995.51690.malonedeb@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1098729] [NEW] qemu-user-static for armhf: segfault in threaded code Reply-To: Bug 1098729 <1098729@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Public bug reported: Currently running QEMU from git (fedf2de31023) and running the armhf versio= n of qemu-user-static which I have renamed qemu-armhf-static to follow the = naming convention used in Debian. The host systems is a Debian testing x86_64-linux and I have an Debian testing armhf chroot which I invoke using schroot. Majority of program in the armhf chroot run fine, but I'm getting qemu segfaults in multi-threaded programs. As an example, I've grabbed the threads demo program here: https://computing.llnl.gov/tutorials/pthreads/samples/dotprod_mutex.c and changed NUMTHRDS from 4 to 10. I compile it as (same compile command on both x86_64 host and armhf guest): gcc -Wall -lpthread dotprod_mutex.c -o dotprod_mutex When compiled for x86_64 host it runs perfectly and even under Valgrind displays no errors whatsoever. However, when I compile the program in my armhs chroot and run it it usually (but not always) segaults or hangs or crashes. Example output: (armhf) $ ./dotprod_mutex Thread 1 did 100000 to 200000: mysum=3D100000.000000 global sum=3D1000= 00.000000 Thread 0 did 0 to 100000: mysum=3D100000.000000 global sum=3D200000.00= 0000 TCG temporary leak before f6731ca0 qemu-arm-static: /home/erikd/Git/qemu-posix-timer-hacking/Upstream/tcg/= tcg-op.h:2371: tcg_gen_goto_tb: Assertion `(tcg_ctx.goto_tb_issue_mask & (1 << idx)) = =3D=3D 0' failed. (armhf) $ ./dotprod_mutex qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault (armhf) $ ./dotprod_mutex qemu-arm-static: /home/erikd/Git/qemu-posix-timer-hacking/Upstream/tcg/= tcg.c:519: tcg_temp_free_internal: Assertion `idx >=3D s->nb_globals && idx < s->n= b_temps' failed. (armhf) $ ./dotprod_mutex Thread 1 did 100000 to 200000: mysum=3D100000.000000 global sum=3D1000= 00.000000 qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault ** Affects: qemu Importance: Undecided Status: New -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1098729 Title: qemu-user-static for armhf: segfault in threaded code Status in QEMU: New Bug description: = Currently running QEMU from git (fedf2de31023) and running the armhf vers= ion of qemu-user-static which I have renamed qemu-armhf-static to follow th= e naming convention used in Debian. The host systems is a Debian testing x86_64-linux and I have an Debian testing armhf chroot which I invoke using schroot. Majority of program in the armhf chroot run fine, but I'm getting qemu segfaults in multi-threaded programs. As an example, I've grabbed the threads demo program here: https://computing.llnl.gov/tutorials/pthreads/samples/dotprod_mutex.c and changed NUMTHRDS from 4 to 10. I compile it as (same compile command on both x86_64 host and armhf guest): gcc -Wall -lpthread dotprod_mutex.c -o dotprod_mutex When compiled for x86_64 host it runs perfectly and even under Valgrind displays no errors whatsoever. However, when I compile the program in my armhs chroot and run it it usually (but not always) segaults or hangs or crashes. Example output: = (armhf) $ ./dotprod_mutex Thread 1 did 100000 to 200000: mysum=3D100000.000000 global sum=3D10= 0000.000000 Thread 0 did 0 to 100000: mysum=3D100000.000000 global sum=3D200000.= 000000 TCG temporary leak before f6731ca0 qemu-arm-static: /home/erikd/Git/qemu-posix-timer-hacking/Upstream/tc= g/tcg-op.h:2371: tcg_gen_goto_tb: Assertion `(tcg_ctx.goto_tb_issue_mask & (1 << idx))= =3D=3D 0' failed. = (armhf) $ ./dotprod_mutex qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault (armhf) $ ./dotprod_mutex qemu-arm-static: /home/erikd/Git/qemu-posix-timer-hacking/Upstream/tc= g/tcg.c:519: tcg_temp_free_internal: Assertion `idx >=3D s->nb_globals && idx < s-= >nb_temps' failed. = (armhf) $ ./dotprod_mutex Thread 1 did 100000 to 200000: mysum=3D100000.000000 global sum=3D10= 0000.000000 qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1098729/+subscriptions