Received: from [140.186.70.92] (port=49861 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PM0F9-0002wr-9Z for qemu-devel@nongnu.org; Fri, 26 Nov 2010 10:29:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PM0F7-0004Ke-VL for qemu-devel@nongnu.org; Fri, 26 Nov 2010 10:29:47 -0500 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:50271 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PM0F7-0004Jf-Md for qemu-devel@nongnu.org; Fri, 26 Nov 2010 10:29:45 -0500 Date: Fri, 26 Nov 2010 18:29:21 +0300 (MSK) From: malc Subject: Re: [Qemu-devel] [PATCH] vnc: qemu can die if the client is disconnected while updating screen In-Reply-To: <1290784935-27258-1-git-send-email-corentincj@iksaif.net> Message-ID: References: <1290784935-27258-1-git-send-email-corentincj@iksaif.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: QEMU-devel Developers On Fri, 26 Nov 2010, Corentin Chary wrote: > agraf reported that qemu_mutex_destroy(vs->output_mutex) was failing > in vnc_disconnect_finish() when the vnc client was disconnected while > updating the screen. > > 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. > Not bug but rather (expected in the absence of PTHREAD_MUTEX_ERRORCHECK) undefined behaviour [1] [1] http://www.opengroup.org/onlinepubs/7990989775/xsh/pthread_mutex_unlock.html -- mailto:av1474@comtv.ru