Received: from eggs.gnu.org ([2001:4830:134:3::10]:52755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ0NT-0000of-Bf for qemu-devel@nongnu.org; Fri, 01 Jul 2016 11:29:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJ0NP-0005Bc-15 for qemu-devel@nongnu.org; Fri, 01 Jul 2016 11:29:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ0NO-0005BW-RF for qemu-devel@nongnu.org; Fri, 01 Jul 2016 11:29:06 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A56F4C00DDE3 for ; Fri, 1 Jul 2016 15:29:05 +0000 (UTC) References: <1467135242-874-1-git-send-email-pbonzini@redhat.com> <1467135242-874-22-git-send-email-pbonzini@redhat.com> <20160701123413.3blajfh4sivmz5hb@hawk.localdomain> <3ce03110-af20-13e3-2b85-b9738d6a14d9@redhat.com> From: Laszlo Ersek Message-ID: <31462e2c-e847-8403-108f-73c0a6b00f22@redhat.com> Date: Fri, 1 Jul 2016 17:29:03 +0200 MIME-Version: 1.0 In-Reply-To: <3ce03110-af20-13e3-2b85-b9738d6a14d9@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 21/32] char: clean up remaining chardevs when leaving List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Andrew Jones Cc: qemu-devel@nongnu.org, =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Eric Blake On 07/01/16 17:18, Paolo Bonzini wrote: > > > On 01/07/2016 14:34, Andrew Jones wrote: >>>> >> With this patch, I now get >> >> qemu: qemu_mutex_destroy: Device or resource busy >> >> and a SIGABRT when my arm tcg kvm-unit-tests guest exits >> (I haven't tried any other guest types yet) > > Eric, Laszlo, is it POSIX compliant to fail destruction of a taken mutex? http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_destroy.html [...] Attempting to destroy a locked mutex or a mutex that is referenced (for example, while being used in a pthread_cond_timedwait() or pthread_cond_wait()) by another thread results in undefined behavior. Thus EBUSY is POSIX compliant, because just the attempt is undefined behavior. Thanks Laszlo