Re: [Qemu-devel] [Spice-devel] Current qemu-master hangs when used with qxl + linux guest

2013-10-08 Thread Daniel P. Berrange
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 ? If so that'd give you a
starting point from which to 'git bisect' the problem.


Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|



Re: [Qemu-devel] [Spice-devel] Current qemu-master hangs when used with qxl + linux guest

2013-10-08 Thread Christophe Fergeau
Hey Hans,

On Tue, Oct 08, 2013 at 04:27:38PM +0200, Hans de Goede wrote:
 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

I've also seen that message when giving a quick try to qemu master today,
so it's not just your setup.

Christophe


pgpVzIFUIkMm2.pgp
Description: PGP signature


Re: [Qemu-devel] [Spice-devel] Current qemu-master hangs when used with qxl + linux guest

2013-10-08 Thread Hans de Goede

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