From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxKKx-000717-S3 for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:44:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxKKw-00070D-5f for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:44:43 -0500 Received: from [199.232.76.173] (port=41133 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxKKv-000706-NZ for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:44:41 -0500 Received: from mail2.shareable.org ([80.68.89.115]:50598) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KxK8o-0004kX-2j for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:32:10 -0500 Date: Tue, 4 Nov 2008 11:32:04 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [5578] Increase default IO timeout from 10ms to 5s Message-ID: <20081104113204.GA32125@shareable.org> References: <490B53F0.9040200@codemonkey.ws> <490DFAA2.7040900@web.de> <490F5942.6020100@codemonkey.ws> <490F60E4.1040304@web.de> <490F723E.7070308@web.de> <490F7489.6040403@codemonkey.ws> <49100654.6020108@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka andrzej zaborowski wrote: > > My man page even warns that the Linux > > kernel is not implementing it yet, though I don't think this still > > applies to recent 2.6.2x kernels. > > According to the man page it moved to kernel at 2.6.16 but the glibc > wrapper should be ok too. If there's a glibc wrapper, it cannot be reliable... *Looks at glibc source* That's right. The glibc pselect() wrapper has the same race condition which prompted this QEMU bug. If the signal arrives after unmasking and before select() in the wrapper, then blocks. In other words, don't use pselect() if you might run on a kernel older than 2.6.16, or on a host architecture which adds pselect() in a later kernel version. Also, I wouldn't be surprised if older versions of some BSDs have similar dodgy wrappers. -- Jamie