From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5UTa-0002Lb-M8 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 03:43:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5UTV-0003Df-WA for qemu-devel@nongnu.org; Thu, 18 Jun 2015 03:43:06 -0400 Received: from mail-yk0-f172.google.com ([209.85.160.172]:36645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5UTV-0003Cz-Dd for qemu-devel@nongnu.org; Thu, 18 Jun 2015 03:43:01 -0400 Received: by ykdr198 with SMTP id r198so60073061ykd.3 for ; Thu, 18 Jun 2015 00:43:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20150617213625.GA16082@flamenco> References: <20150617005222.GA18884@flamenco> <20150617213625.GA16082@flamenco> From: Peter Maydell Date: Thu, 18 Jun 2015 08:42:40 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] linux-user crashes on clone(2) when run on ppc host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" Cc: Riku Voipio , "qemu-ppc@nongnu.org" , Alexander Graf , QEMU Developers On 17 June 2015 at 22:36, Emilio G. Cota wrote: > On Wed, Jun 17, 2015 at 09:58:27 +0100, Peter Maydell wrote: >> On 17 June 2015 at 01:52, Emilio G. Cota wrote: >> > I'm having trouble running a simple multithreaded program on a PowerPC host machine. >> > >> > The machine I'm using is a ppc VM--I think it's running under KVM (I'm using >> > OVH's RunAbove Power8 service): >> > admin@adsf:~/qemu$ uname -a >> > Linux adsf 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:27:09 UTC 2014 ppc64le ppc64le ppc64le GNU/Linux >> > >> > admin@adsf:~/qemu$ ppc64le-linux-user/qemu-ppc64le foo >> >> Multithreaded binaries don't work with linux-user; there are a bunch >> of known race conditions involving data structures we don't correctly >> lock or make per-thread. >> >> This is a long-standing issue; we're hoping we might get to fixing >> it some time this year. > > I don't think this is a race because it also breaks when > run on a single core (with taskset -c 0). > > What data structures are you referring to? Are they ppc-specific? None of the code generation data structures are locked at all -- if two threads try to generate code at the same time they'll tend to clobber each other. > On x86 hosts linux-user works reliably with multithreaded apps. No, it doesn't :-) If any multithreaded app happens to run on any host it is pure fluke. -- PMM