From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46478 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsO3x-00042q-Hk for qemu-devel@nongnu.org; Wed, 23 Feb 2011 18:24:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsO3w-00085v-7o for qemu-devel@nongnu.org; Wed, 23 Feb 2011 18:24:05 -0500 Received: from e31.co.us.ibm.com ([32.97.110.149]:39568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsO3w-00081c-18 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 18:24:04 -0500 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p1NN8X9e009802 for ; Wed, 23 Feb 2011 16:08:33 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id p1NNNQmn106528 for ; Wed, 23 Feb 2011 16:23:26 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1NNNPvN003493 for ; Wed, 23 Feb 2011 16:23:26 -0700 Message-ID: <4D6596F6.1040502@linux.vnet.ibm.com> Date: Wed, 23 Feb 2011 17:23:34 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3 01/16] vnc: qemu can die if the client is disconnected while updating screen References: <1296806768-27787-1-git-send-email-corentincj@iksaif.net> <1296806768-27787-2-git-send-email-corentincj@iksaif.net> In-Reply-To: <1296806768-27787-2-git-send-email-corentincj@iksaif.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: Andre Przywara , Qemu-development List , Alexander Graf On 02/04/2011 02:05 AM, Corentin Chary wrote: > agraf reported that qemu_mutex_destroy(vs->output_mutex) while failing > in vnc_disconnect_finish(). > > It's because vnc_worker_thread_loop() tries to unlock the mutex while > not locked. The unlocking call doesn't fail (pthread bug ?), but > the destroy call does. > > Signed-off-by: Corentin Chary > Applied 2/16. Thanks! Regards, Anthony Liguori > --- > ui/vnc-jobs-async.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/ui/vnc-jobs-async.c b/ui/vnc-jobs-async.c > index 6e9cf08..0b5d750 100644 > --- a/ui/vnc-jobs-async.c > +++ b/ui/vnc-jobs-async.c > @@ -227,6 +227,10 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) > > if (job->vs->csock == -1) { > vnc_unlock_display(job->vs->vd); > + /* output mutex must be locked before going to > + * disconnected: > + */ > + vnc_lock_output(job->vs); > goto disconnected; > } > >