From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MruVB-0006j6-Ts for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:13:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MruV7-0006hE-CA for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:13:25 -0400 Received: from [199.232.76.173] (port=52192 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MruV7-0006hB-8x for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:13:21 -0400 Received: from mail2.shareable.org ([80.68.89.115]:60489) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MruV6-0000o2-VX for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:13:21 -0400 Date: Sun, 27 Sep 2009 15:13:12 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] linux-user NPTL problem with signals Message-ID: <20090927141312.GB28368@shareable.org> References: <4ABA9868.8070707@mlbassoc.com> <4ABB87A9.9060706@mlbassoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ABB87A9.9060706@mlbassoc.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gary Thomas Cc: qemu-devel@nongnu.org Gary Thomas wrote: > On 09/23/2009 03:51 PM, Gary Thomas wrote: > >I'm running a multi-threaded program (linux-user on i386). I > >have a problem with signals; when one arrives, the running > >thread abruptly changes :-( > > > >Anyone have any ideas about this? > > > > I've tracked this down to the fact that there should be a > unique value for the GS segment register (at least) per thread. > This doesn't seem to be the case and when a signal is dispatched, > the GS segment register is updated with [probably] the most recent > value created by a new thread, not the running thread. Nasty. NPTL is not the only software which depends on the segment registers keeping their correct values. Wine, DOSemu among others depend on all the segment registers. -- Jamie