From patchwork Thu Dec 27 11:48:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 208297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 23CFD2C00D2 for ; Thu, 27 Dec 2012 22:49:15 +1100 (EST) Received: from localhost ([::1]:34173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToBxY-0000KT-Ui for incoming@patchwork.ozlabs.org; Thu, 27 Dec 2012 06:49:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToBxR-0000KD-2x for qemu-devel@nongnu.org; Thu, 27 Dec 2012 06:49:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToBxN-0002BN-Tt for qemu-devel@nongnu.org; Thu, 27 Dec 2012 06:49:04 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:63634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToBxN-0002BI-O2 for qemu-devel@nongnu.org; Thu, 27 Dec 2012 06:49:01 -0500 Received: by mail-wi0-f182.google.com with SMTP id hn14so5299812wib.9 for ; Thu, 27 Dec 2012 03:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=dm2JxyQcqDzSPPAhERHWz+WKHn7dk/RwEaHhRCUe+Gg=; b=MUHxQ4LBazpDdFLL/dsYAS4LV4G3al7dOlhE5BJPrlNZVGuIurubj5o/+4blbYDs1n ZLKTLGyh17NIZD+S4HZcCegQbfoMLX97KHKZPM0LMlK6U8BVO9AhYnJFl3b1CjpFe2PU 6D60I3pfzD2ifn9wShSZXOw1l/frRZpC5wBgXYEMdS8LCqErEtgVlo9snN7ykbr+Fh18 UrKaoC0zhflnMeo6kQXxd9D9wxz/L9yZ58bgeX7Elz1LjPFPSQyfIFofrlVYyGpxqolL +iRwVa109yzz/3eUsCu/GP3P2ZX4ix4gf7O7DjwbPauVO/iURp8ZKEhUt7TC3Dg8BWqw dJUQ== X-Received: by 10.194.7.104 with SMTP id i8mr48447300wja.27.1356608940433; Thu, 27 Dec 2012 03:49:00 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-179-137.ip50.fastwebnet.it. [93.34.179.137]) by mx.google.com with ESMTPS id bw9sm30437868wib.5.2012.12.27.03.48.58 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Dec 2012 03:48:59 -0800 (PST) Message-ID: <50DC35A8.201@redhat.com> Date: Thu, 27 Dec 2012 12:48:56 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Bug 1087114 <1087114@bugs.launchpad.net> References: <20121206040257.27322.8930.malonedeb@gac.canonical.com> <20121227042700.26057.92281.malone@soybean.canonical.com> In-Reply-To: <20121227042700.26057.92281.malone@soybean.canonical.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.182 Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [Bug 1087114] Re: assertion "QLIST_EMPTY(&bs->tracked_requests)" failed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Il 27/12/2012 05:26, Brad Smith ha scritto: > Paolo, > > As you wrote the fallback code which is used when sem_timedwait() is > missing could you please take a look at this when you have some time? I > can test any patches you might come up with. Can you try this: and if it passes, post it? I'll be very sparsely online until Jan 8th. Signed-off-by: Paolo Bonzini Paolo diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index 7be292e..17f2d7c 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -213,6 +213,7 @@ int qemu_sem_timedwait(QemuSemaphore *sem, int ms) while (sem->count < 0) { rc = pthread_cond_timedwait(&sem->cond, &sem->lock, &ts); if (rc == ETIMEDOUT) { + ++sem->count; break; } if (rc != 0) {