From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60573 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlL8q-0001pe-AQ for qemu-devel@nongnu.org; Fri, 04 Feb 2011 07:52:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlL8o-000073-QQ for qemu-devel@nongnu.org; Fri, 04 Feb 2011 07:52:00 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:49510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PlL8o-00006y-N7 for qemu-devel@nongnu.org; Fri, 04 Feb 2011 07:51:58 -0500 Received: from d01dlp01.pok.ibm.com (d01dlp01.pok.ibm.com [9.56.224.56]) by e8.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p148XvDI020744 for ; Fri, 4 Feb 2011 03:34:01 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 67595728051 for ; Fri, 4 Feb 2011 07:51:57 -0500 (EST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p14CpvEf329290 for ; Fri, 4 Feb 2011 07:51:57 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p14Cpum6002413 for ; Fri, 4 Feb 2011 10:51:56 -0200 Message-ID: <4D4BF668.7030700@linux.vnet.ibm.com> Date: Fri, 04 Feb 2011 06:51:52 -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 (just this patch) to master, 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; > } > >