From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsX8x-0007Bh-GE for qemu-devel@nongnu.org; Wed, 13 May 2015 09:56:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsX8r-0003Vo-Mz for qemu-devel@nongnu.org; Wed, 13 May 2015 09:56:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsX8r-0003VT-Hg for qemu-devel@nongnu.org; Wed, 13 May 2015 09:56:09 -0400 Message-ID: <555357F4.7060005@redhat.com> Date: Wed, 13 May 2015 15:56:04 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <18C7C30B-DC02-4CF1-8190-EFB063692272@gmail.com> <554F7124.8020900@redhat.com> <1D282622-B470-4916-BC6A-689EC83B1B42@gmail.com> <5551AFB0.5020908@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Help with deadlock when using sound List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Programmingkid Cc: qemu-devel qemu-devel On 13/05/2015 11:38, Peter Maydell wrote: > > then we'll turn on the error checking, and a double-unlock > will result in a call to abort(). If you run QEMU under > a debugger you'll get a backtrace which will tell you which > code did the second unlock (and thus which mutex it is). > > (Linux has a similar attribute, though it is named > PTHREAD_MUTEX_ERRORCHECK_NP; we might want to consider > turning on mutex debugging for --enable-debug builds.) We had it, but I had to disable it because it doesn't work (at all) when you fork. The PID changes under the code's feet and subsequent unlocks do not like it. Paolo