From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTcew-00035k-IT for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:09:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTceo-0004Ue-Ez for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:09:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTceo-0004UW-5l for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:09:22 -0400 Message-ID: <5254585E.8040601@redhat.com> Date: Tue, 08 Oct 2013 21:09:18 +0200 From: Hans de Goede MIME-Version: 1.0 References: <5254165A.2050304@redhat.com> <20131008143049.GK14446@redhat.com> In-Reply-To: <20131008143049.GK14446@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Spice-devel] Current qemu-master hangs when used with qxl + linux guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: spice-devel , "qemu-devel@nongnu.org" Hi, On 10/08/2013 04:30 PM, Daniel P. Berrange wrote: > On Tue, Oct 08, 2013 at 04:27:38PM +0200, Hans de Goede wrote: >> Hi All, >> >> I'm having this weird problem with qemu master + spice/qxl using >> guests. As soon as the guest starts Xorg, I get the following message >> from qemu: >> >> main-loop: WARNING: I/O thread spun for 1000 iterations >> >> And from then on the guest hangs and qemu consumes 100% cpu. The qemu >> console still works, and I can quit qemu that way. >> >> Doing ctrl+c + a thread apply all bt in qemy shows one cpu thread waiting >> for the iothread-lock, and all other threads waiting in poll. >> >> This happens both with non kms guests (tried RHEL-6.5, older Fedoras) >> as well as with kms guests (tried a fully up2date F-19). >> >> Since I've not seen any similar reports, I assume it is something >> with my setup ... >> >> I've tried changing various things: >> -removing the spice agent channel >> -changing the number of virtual cpus (tried 1 and 2 virtual cpus) >> -upgrading spice-server to the latest git master >> >> But all to no avail. >> >> This is with qemu-master build from source on a fully up2date >> F-20 system, using the F-20 seabios files. >> >> If someone has any clever ideas I'll happily try debugging this further. > > Does the QEMU build in F20 work correctly ? Ah, yes it does, good dea. > If so that'd give you a > starting point from which to 'git bisect' the problem. Yep, note I asked for a "clever" idea, iow not the big hammer of bisecting :) But since 1.6.0 in F-20 worked it was not such a large bisect, so I went ahead and bisected anyways, which pointed me to commit 7b595f35d8 : "aio / timers: Convert mainloop to use timeout" After careful review of that commit I had a hunch what might be wrong, and it turned out to be right. So after this mail I'm going to send a patch fixing this. If you want to know the details see the patch, titled: "main-loop: Don't lock starve io-threads when main_loop_tlg has pending events" Regards, Hans