From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z29Gn-00014l-Pl for qemu-devel@nongnu.org; Mon, 08 Jun 2015 22:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z29Gk-0007vw-IQ for qemu-devel@nongnu.org; Mon, 08 Jun 2015 22:28:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z29Gk-0007vp-Ai for qemu-devel@nongnu.org; Mon, 08 Jun 2015 22:28:02 -0400 Date: Tue, 9 Jun 2015 10:28:32 +0800 From: Fam Zheng Message-ID: <20150609022832.GA12817@cpc-pc.redhat.com> References: <556DBF87.2020908@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <556DBF87.2020908@de.ibm.com> Subject: Re: [Qemu-devel] "iothread: release iothread around aio_poll" causes random hangs at startup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: Kevin Wolf , Paolo Bonzini , qemu-devel , Stefan Hajnoczi On Tue, 06/02 16:36, Christian Borntraeger wrote: > Paolo, > > I bisected > commit a0710f7995f914e3044e5899bd8ff6c43c62f916 > Author: Paolo Bonzini > AuthorDate: Fri Feb 20 17:26:52 2015 +0100 > Commit: Kevin Wolf > CommitDate: Tue Apr 28 15:36:08 2015 +0200 > > iothread: release iothread around aio_poll > > to cause a problem with hanging guests. > > Having many guests all with a kernel/ramdisk (via -kernel) and > several null block devices will result in hangs. All hanging > guests are in partition detection code waiting for an I/O to return > so very early maybe even the first I/O. > > Reverting that commit "fixes" the hangs. > Any ideas? Christian, I can't reproduce this on my x86 box with virtio-blk-pci. Do you have a reproducer for x86? Or could you collect backtraces for all the threads in QEMU when it hangs? My long shot is that the main loop is blocked at aio_context_acquire(ctx), while the iothread of that ctx is blocked at aio_poll(ctx, blocking). Thanks, Fam > > Christian > > PS: A guest xml looks like > > > > test2 > 13bd8253-9abb-4be8-9399-73b899762aaa > 286720 > 286720 > 10 > 8 > > 12 > > > hvm > /boot/vmlinux-4.0.0+ > /boot/ramdisk.reboot > root=/dev/ram0 > > > > destroy > restart > preserve > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >