All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2013-10-15 10:21 ` Xiexiangyou
  0 siblings, 0 replies; 14+ messages in thread
From: Xiexiangyou @ 2013-10-15 10:21 UTC (permalink / raw)
  To: qemu-devel, qemu-devel-request, kvm; +Cc: Huangpeng (Peter), Luonengjun

Hi all:

Windows2008 Guest run without pressure for long time. Sometimes, it stop and looks like hanging. But when I connect to it with VNC, It resume to run, but VM's time is delayed . 
When the vm is hanging, I check the main thread of QEMU. I find that the thread is blocked in g_poll function. it is waiting for a SIG, However, there is no SIG .

I tried the clock with "hpet" and "no hpet", but came out the same problem. Then I upgrade the glibc to newer, it didn't work too.
I'm confused. Is the reason that VM in sleep state and doesn't emit the signal. I set the windows 's "power option", enable/disable the "allow the wake timers", I didn't work.

Is anybody have met the same problem before, or know the reason. Your reply will be very helpful.

Thanks

--xiexiangyou

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2013-10-15 10:21 ` Xiexiangyou
  0 siblings, 0 replies; 14+ messages in thread
From: Xiexiangyou @ 2013-10-15 10:21 UTC (permalink / raw)
  To: qemu-devel, qemu-devel-request, kvm; +Cc: Luonengjun, Huangpeng (Peter)

Hi all:

Windows2008 Guest run without pressure for long time. Sometimes, it stop and looks like hanging. But when I connect to it with VNC, It resume to run, but VM's time is delayed . 
When the vm is hanging, I check the main thread of QEMU. I find that the thread is blocked in g_poll function. it is waiting for a SIG, However, there is no SIG .

I tried the clock with "hpet" and "no hpet", but came out the same problem. Then I upgrade the glibc to newer, it didn't work too.
I'm confused. Is the reason that VM in sleep state and doesn't emit the signal. I set the windows 's "power option", enable/disable the "allow the wake timers", I didn't work.

Is anybody have met the same problem before, or know the reason. Your reply will be very helpful.

Thanks

--xiexiangyou

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFH] Qemu main thread is blocked in g_poll in windows guest
  2013-10-15 10:21 ` [Qemu-devel] " Xiexiangyou
@ 2013-10-15 11:52   ` Paolo Bonzini
  -1 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2013-10-15 11:52 UTC (permalink / raw)
  To: Xiexiangyou
  Cc: qemu-devel, qemu-devel-request, kvm, Huangpeng (Peter), Luonengjun

Il 15/10/2013 12:21, Xiexiangyou ha scritto:
> Hi all:
> 
> Windows2008 Guest run without pressure for long time. Sometimes, it
> stop and looks like hanging. But when I connect to it with VNC, It
> resume to run, but VM's time is delayed . When the vm is hanging, I
> check the main thread of QEMU. I find that the thread is blocked in
> g_poll function. it is waiting for a SIG, However, there is no SIG .
> 
> I tried the clock with "hpet" and "no hpet", but came out the same
> problem. Then I upgrade the glibc to newer, it didn't work too. I'm
> confused. Is the reason that VM in sleep state and doesn't emit the
> signal. I set the windows 's "power option", enable/disable the
> "allow the wake timers", I didn't work.
> 
> Is anybody have met the same problem before, or know the reason. Your
> reply will be very helpful.

This post is missing a few pieces of information:

* What version of QEMU is this?

* What is the command line?

* How do you know g_poll is waiting for a signal and not for a file
descriptor?

* What is the backtrace of the main thread?  What is the backtrace of
the VCPU thread?

etc.

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2013-10-15 11:52   ` Paolo Bonzini
  0 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2013-10-15 11:52 UTC (permalink / raw)
  To: Xiexiangyou
  Cc: qemu-devel-request, Luonengjun, qemu-devel, kvm, Huangpeng (Peter)

Il 15/10/2013 12:21, Xiexiangyou ha scritto:
> Hi all:
> 
> Windows2008 Guest run without pressure for long time. Sometimes, it
> stop and looks like hanging. But when I connect to it with VNC, It
> resume to run, but VM's time is delayed . When the vm is hanging, I
> check the main thread of QEMU. I find that the thread is blocked in
> g_poll function. it is waiting for a SIG, However, there is no SIG .
> 
> I tried the clock with "hpet" and "no hpet", but came out the same
> problem. Then I upgrade the glibc to newer, it didn't work too. I'm
> confused. Is the reason that VM in sleep state and doesn't emit the
> signal. I set the windows 's "power option", enable/disable the
> "allow the wake timers", I didn't work.
> 
> Is anybody have met the same problem before, or know the reason. Your
> reply will be very helpful.

This post is missing a few pieces of information:

* What version of QEMU is this?

* What is the command line?

* How do you know g_poll is waiting for a signal and not for a file
descriptor?

* What is the backtrace of the main thread?  What is the backtrace of
the VCPU thread?

etc.

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [RFH] Qemu main thread is blocked in g_poll in windows guest
  2013-10-15 11:52   ` [Qemu-devel] " Paolo Bonzini
@ 2013-10-15 12:18     ` Xiexiangyou
  -1 siblings, 0 replies; 14+ messages in thread
From: Xiexiangyou @ 2013-10-15 12:18 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel, qemu-devel-request, kvm, Huangpeng (Peter), Luonengjun

Thanks for your reply :-)
The QEMU version is 1.5.1,and the KVM version is 3.6

QEMU command:
/usr/bin/qemu-kvm -name win2008_dc_5 -S -machine pc-i440fx-1.5,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp 4,maxcpus=64,sockets=16,cores=4,threads=1 -uuid 13e08e3e-cd23-4450-8bd3-60e7c220316d -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win2008_dc_5.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,clock=vm,driftfix=slew -no-hpet -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/dev/vmdisk/win2008_dc_5,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none,aio=native -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=
 1 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:16:49:23,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/run/libvirt/qemu/win2008_dc_5.extend,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.1 -chardev socket,id=charchannel1,path=/var/run/libvirt/qemu/win2008_dc_5.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -vnc 0.0.0.0:4 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

(gdb) bt
#0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
#1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
#2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
#3  0x0000000000619309 in main_loop () at vl.c:2182
#4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611

Main thread's strace message:
# strace -p 6386
Process 6386 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>

cpu thread's strace message:
# strace -p 6389
Process 6389 attached - interrupt to quit
rt_sigtimedwait([BUS USR1], 0x7f9ba36fbc00) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigpending([])                       = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
...

Thanks!
--xie

-----Original Message-----
From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini
Sent: Tuesday, October 15, 2013 7:52 PM
To: Xiexiangyou
Cc: qemu-devel@nongnu.org; qemu-devel-request@nongnu.org; kvm@vger.kernel.org; Huangpeng (Peter); Luonengjun
Subject: Re: [RFH] Qemu main thread is blocked in g_poll in windows guest

Il 15/10/2013 12:21, Xiexiangyou ha scritto:
> Hi all:
> 
> Windows2008 Guest run without pressure for long time. Sometimes, it
> stop and looks like hanging. But when I connect to it with VNC, It
> resume to run, but VM's time is delayed . When the vm is hanging, I
> check the main thread of QEMU. I find that the thread is blocked in
> g_poll function. it is waiting for a SIG, However, there is no SIG .
> 
> I tried the clock with "hpet" and "no hpet", but came out the same
> problem. Then I upgrade the glibc to newer, it didn't work too. I'm
> confused. Is the reason that VM in sleep state and doesn't emit the
> signal. I set the windows 's "power option", enable/disable the
> "allow the wake timers", I didn't work.
> 
> Is anybody have met the same problem before, or know the reason. Your
> reply will be very helpful.

This post is missing a few pieces of information:

* What version of QEMU is this?

* What is the command line?

* How do you know g_poll is waiting for a signal and not for a file
descriptor?

* What is the backtrace of the main thread?  What is the backtrace of
the VCPU thread?

etc.

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2013-10-15 12:18     ` Xiexiangyou
  0 siblings, 0 replies; 14+ messages in thread
From: Xiexiangyou @ 2013-10-15 12:18 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel-request, Luonengjun, qemu-devel, kvm, Huangpeng (Peter)

Thanks for your reply :-)
The QEMU version is 1.5.1,and the KVM version is 3.6

QEMU command:
/usr/bin/qemu-kvm -name win2008_dc_5 -S -machine pc-i440fx-1.5,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp 4,maxcpus=64,sockets=16,cores=4,threads=1 -uuid 13e08e3e-cd23-4450-8bd3-60e7c220316d -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win2008_dc_5.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,clock=vm,driftfix=slew -no-hpet -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/dev/vmdisk/win2008_dc_5,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none,aio=native -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:16:49:23,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/run/libvirt/qemu/win2008_dc_5.extend,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.1 -chardev socket,id=charchannel1,path=/var/run/libvirt/qemu/win2008_dc_5.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -vnc 0.0.0.0:4 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

(gdb) bt
#0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
#1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
#2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
#3  0x0000000000619309 in main_loop () at vl.c:2182
#4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611

Main thread's strace message:
# strace -p 6386
Process 6386 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>

cpu thread's strace message:
# strace -p 6389
Process 6389 attached - interrupt to quit
rt_sigtimedwait([BUS USR1], 0x7f9ba36fbc00) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigpending([])                       = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0
...

Thanks!
--xie

-----Original Message-----
From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini
Sent: Tuesday, October 15, 2013 7:52 PM
To: Xiexiangyou
Cc: qemu-devel@nongnu.org; qemu-devel-request@nongnu.org; kvm@vger.kernel.org; Huangpeng (Peter); Luonengjun
Subject: Re: [RFH] Qemu main thread is blocked in g_poll in windows guest

Il 15/10/2013 12:21, Xiexiangyou ha scritto:
> Hi all:
> 
> Windows2008 Guest run without pressure for long time. Sometimes, it
> stop and looks like hanging. But when I connect to it with VNC, It
> resume to run, but VM's time is delayed . When the vm is hanging, I
> check the main thread of QEMU. I find that the thread is blocked in
> g_poll function. it is waiting for a SIG, However, there is no SIG .
> 
> I tried the clock with "hpet" and "no hpet", but came out the same
> problem. Then I upgrade the glibc to newer, it didn't work too. I'm
> confused. Is the reason that VM in sleep state and doesn't emit the
> signal. I set the windows 's "power option", enable/disable the
> "allow the wake timers", I didn't work.
> 
> Is anybody have met the same problem before, or know the reason. Your
> reply will be very helpful.

This post is missing a few pieces of information:

* What version of QEMU is this?

* What is the command line?

* How do you know g_poll is waiting for a signal and not for a file
descriptor?

* What is the backtrace of the main thread?  What is the backtrace of
the VCPU thread?

etc.

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFH] Qemu main thread is blocked in g_poll in windows guest
  2013-10-15 12:18     ` [Qemu-devel] " Xiexiangyou
@ 2013-10-15 12:30       ` Paolo Bonzini
  -1 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2013-10-15 12:30 UTC (permalink / raw)
  To: Xiexiangyou
  Cc: qemu-devel, qemu-devel-request, kvm, Huangpeng (Peter), Luonengjun

Il 15/10/2013 14:18, Xiexiangyou ha scritto:
> (gdb) bt
> #0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
> #1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
> #2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
> #3  0x0000000000619309 in main_loop () at vl.c:2182
> #4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611

This backtrace looks okay.  poll is not holding the "iothread lock" and
thus the VCPU thread can run QEMU code.

It also looks like the VCPU thread is doing nothing special besides
running KVM_RUN.  Did you take the backtrace during one of these "hangups"?

Paolo


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2013-10-15 12:30       ` Paolo Bonzini
  0 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2013-10-15 12:30 UTC (permalink / raw)
  To: Xiexiangyou
  Cc: qemu-devel-request, Luonengjun, qemu-devel, kvm, Huangpeng (Peter)

Il 15/10/2013 14:18, Xiexiangyou ha scritto:
> (gdb) bt
> #0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
> #1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
> #2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
> #3  0x0000000000619309 in main_loop () at vl.c:2182
> #4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611

This backtrace looks okay.  poll is not holding the "iothread lock" and
thus the VCPU thread can run QEMU code.

It also looks like the VCPU thread is doing nothing special besides
running KVM_RUN.  Did you take the backtrace during one of these "hangups"?

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [RFH] Qemu main thread is blocked in g_poll in windows guest
  2013-10-15 12:30       ` [Qemu-devel] " Paolo Bonzini
@ 2013-10-16  4:03         ` Xiexiangyou
  -1 siblings, 0 replies; 14+ messages in thread
From: Xiexiangyou @ 2013-10-16  4:03 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel, qemu-devel-request, kvm, Huangpeng (Peter), Luonengjun

The backtrace of VCPU in "hangup" state is:
(gdb) bt
#0  0x00007f9ba661bc67 in ioctl () from /lib64/libc.so.6
#1  0x000000000069631d in kvm_vcpu_ioctl (cpu=0x169f880, type=44672) at /home/qemu-kvm-1.5.1/kvm-all.c:1735
#2  0x0000000000695bc6 in kvm_cpu_exec (env=0x169f990) at /home/qemu-kvm-1.5.1/kvm-all.c:1620
#3  0x0000000000625feb in qemu_kvm_cpu_thread_fn (arg=0x169f990) at /home/qemu-kvm-1.5.1/cpus.c:759
#4  0x00007f9ba68e0f05 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f9ba662353d in clone () from /lib64/libc.so.6
There is no problem can be found from this.

However, trace the VCPU thread's syscall, we can find that it only run KVM_RUN ioctl , the strace message always is:
ioctl(17, 0xae80, 0)                    = 0

The normal VCPU thread's strace message like this:
ioctl(17, 0xae80, 0)                    = 0
ioctl(11, 0xffffffffc008ae67, 0x7fb157ffeab0) = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(11, 0xffffffffc008ae67, 0x7fb157ffeab0) = 0
ioctl(17, 0xae80, 0)                    = 0
futex(0xf9d260, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0xf9d260, FUTEX_WAKE_PRIVATE, 1)  = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0

The issue is hard to be reproduced, except when I let the VM in idle state, it recur in several hours. 

Thanks
--xie

-----Original Message-----
From: Paolo Bonzini [mailto:pbonzini@redhat.com] 
Sent: Tuesday, October 15, 2013 8:30 PM
To: Xiexiangyou
Cc: qemu-devel@nongnu.org; qemu-devel-request@nongnu.org; kvm@vger.kernel.org; Huangpeng (Peter); Luonengjun
Subject: Re: [RFH] Qemu main thread is blocked in g_poll in windows guest

Il 15/10/2013 14:18, Xiexiangyou ha scritto:
> (gdb) bt
> #0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
> #1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
> #2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
> #3  0x0000000000619309 in main_loop () at vl.c:2182
> #4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611

This backtrace looks okay.  poll is not holding the "iothread lock" and
thus the VCPU thread can run QEMU code.

It also looks like the VCPU thread is doing nothing special besides
running KVM_RUN.  Did you take the backtrace during one of these "hangups"?

Paolo


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2013-10-16  4:03         ` Xiexiangyou
  0 siblings, 0 replies; 14+ messages in thread
From: Xiexiangyou @ 2013-10-16  4:03 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel-request, Luonengjun, qemu-devel, kvm, Huangpeng (Peter)

The backtrace of VCPU in "hangup" state is:
(gdb) bt
#0  0x00007f9ba661bc67 in ioctl () from /lib64/libc.so.6
#1  0x000000000069631d in kvm_vcpu_ioctl (cpu=0x169f880, type=44672) at /home/qemu-kvm-1.5.1/kvm-all.c:1735
#2  0x0000000000695bc6 in kvm_cpu_exec (env=0x169f990) at /home/qemu-kvm-1.5.1/kvm-all.c:1620
#3  0x0000000000625feb in qemu_kvm_cpu_thread_fn (arg=0x169f990) at /home/qemu-kvm-1.5.1/cpus.c:759
#4  0x00007f9ba68e0f05 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f9ba662353d in clone () from /lib64/libc.so.6
There is no problem can be found from this.

However, trace the VCPU thread's syscall, we can find that it only run KVM_RUN ioctl , the strace message always is:
ioctl(17, 0xae80, 0)                    = 0

The normal VCPU thread's strace message like this:
ioctl(17, 0xae80, 0)                    = 0
ioctl(11, 0xffffffffc008ae67, 0x7fb157ffeab0) = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(11, 0xffffffffc008ae67, 0x7fb157ffeab0) = 0
ioctl(17, 0xae80, 0)                    = 0
futex(0xf9d260, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0xf9d260, FUTEX_WAKE_PRIVATE, 1)  = 0
ioctl(17, 0xae80, 0)                    = 0
ioctl(17, 0xae80, 0)                    = 0

The issue is hard to be reproduced, except when I let the VM in idle state, it recur in several hours. 

Thanks
--xie

-----Original Message-----
From: Paolo Bonzini [mailto:pbonzini@redhat.com] 
Sent: Tuesday, October 15, 2013 8:30 PM
To: Xiexiangyou
Cc: qemu-devel@nongnu.org; qemu-devel-request@nongnu.org; kvm@vger.kernel.org; Huangpeng (Peter); Luonengjun
Subject: Re: [RFH] Qemu main thread is blocked in g_poll in windows guest

Il 15/10/2013 14:18, Xiexiangyou ha scritto:
> (gdb) bt
> #0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
> #1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
> #2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
> #3  0x0000000000619309 in main_loop () at vl.c:2182
> #4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611

This backtrace looks okay.  poll is not holding the "iothread lock" and
thus the VCPU thread can run QEMU code.

It also looks like the VCPU thread is doing nothing special besides
running KVM_RUN.  Did you take the backtrace during one of these "hangups"?

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
  2013-10-15 10:21 ` [Qemu-devel] " Xiexiangyou
@ 2013-10-21 13:56   ` David Weber
  -1 siblings, 0 replies; 14+ messages in thread
From: David Weber @ 2013-10-21 13:56 UTC (permalink / raw)
  To: Xiexiangyou
  Cc: qemu-devel, qemu-devel-request, kvm, Luonengjun, Huangpeng (Peter), wb

We have the exactly same problem on our NUMA systems. The clock of
windows 2008 guests sometimes just stops and it becomes slow when you
are connected via rdp. After connecting to qemu's vnc server
everything runs fine again. The problem seems to occour more often
when the host is under pressure.

What really is weird is that this only happens to the windows 2008
guest. Linux and windows 2003 guests run just fine.

We have also only seen the problem on our NUMA hosts, even with cpu
and memory pinning. The singel socket servers run the exactly same
software without that problem.

We have also tried many different configurations on the
host(CONFIG_HZ, CONFIG_PREEMTION, CONFIG_NUMA_BALANCING), qemu
(different timers, different catchup policies, different spinlock
settings) and on the guest side (use platformclock) but none did solve
the problem


Qemu version: 1.5.3
Linux: 3.11.4
glibc: 2.15
gcc: 4.7.3

# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 44
Stepping: 2
CPU MHz: 2401.000
BogoMIPS: 4800.18
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 12288K
NUMA node0 CPU(s): 0-5,12-17
NUMA node1 CPU(s): 6-11,18-23

# lspci
00:00.0 Host bridge: Intel Corporation 5520 I/O Hub to ESI Port (rev 22)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI
Express Root Port 1 (rev 22)
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI
Express Root Port 3 (rev 22)
00:05.0 PCI bridge: Intel Corporation 5520/X58 I/O Hub PCI Express
Root Port 5 (rev 22)
00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI
Express Root Port 7 (rev 22)
00:09.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI
Express Root Port 9 (rev 22)
00:0d.0 Host bridge: Intel Corporation Device 343a (rev 22)
00:0d.1 Host bridge: Intel Corporation Device 343b (rev 22)
00:0d.2 Host bridge: Intel Corporation Device 343c (rev 22)
00:0d.3 Host bridge: Intel Corporation Device 343d (rev 22)
00:0d.4 Host bridge: Intel Corporation 7500/5520/5500/X58 Physical
Layer Port 0 (rev 22)
00:0d.5 Host bridge: Intel Corporation 7500/5520/5500 Physical Layer
Port 1 (rev 22)
00:0d.6 Host bridge: Intel Corporation Device 341a (rev 22)
00:0e.0 Host bridge: Intel Corporation Device 341c (rev 22)
00:0e.1 Host bridge: Intel Corporation Device 341d (rev 22)
00:0e.2 Host bridge: Intel Corporation Device 341e (rev 22)
00:0e.4 Host bridge: Intel Corporation Device 3439 (rev 22)
00:13.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub I/OxAPIC
Interrupt Controller (rev 22)
00:14.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub System
Management Registers (rev 22)
00:14.1 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub GPIO and
Scratch Pad Registers (rev 22)
00:14.2 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Control
Status and RAS Registers (rev 22)
00:14.3 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Throttle
Registers (rev 22)
00:16.0 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.1 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.2 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.3 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.4 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.5 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.6 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.7 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #4
00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #5
00:1a.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #6
00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2
EHCI Controller #2
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI
Express Root Port 1
00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI
Express Root Port 5
00:1c.5 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI
Express Root Port 6
00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #1
00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #2
00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #3
00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2
EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller
00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA
AHCI Controller
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
01:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA
G200eW WPCM450 (rev 0a)
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
04:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
05:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit
SFI/SFP+ Network Connection (rev 01)
05:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit
SFI/SFP+ Network Connection (rev 01)
08:00.0 RAID bus controller: Adaptec AAC-RAID (rev 09)
fe:00.0 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture Generic Non-core Registers (rev 02)
fe:00.1 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture System Address Decoder (rev 02)
fe:02.0 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 0 (rev 02)
fe:02.1 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 0 (rev 02)
fe:02.2 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 0 (rev 02)
fe:02.3 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 1 (rev 02)
fe:02.4 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 1 (rev 02)
fe:02.5 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 1 (rev 02)
fe:03.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Registers (rev 02)
fe:03.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Target Address Decoder (rev 02)
fe:03.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller RAS Registers (rev 02)
fe:03.4 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Test Registers (rev 02)
fe:04.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Control (rev 02)
fe:04.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Address (rev 02)
fe:04.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Rank (rev 02)
fe:04.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Thermal Control (rev 02)
fe:05.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Control (rev 02)
fe:05.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Address (rev 02)
fe:05.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Rank (rev 02)
fe:05.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Thermal Control (rev 02)
fe:06.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Control (rev 02)
fe:06.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Address (rev 02)
fe:06.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Rank (rev 02)
fe:06.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Thermal Control (rev 02)
ff:00.0 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture Generic Non-core Registers (rev 02)
ff:00.1 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture System Address Decoder (rev 02)
ff:02.0 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 0 (rev 02)
ff:02.1 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 0 (rev 02)
ff:02.2 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 0 (rev 02)
ff:02.3 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 1 (rev 02)
ff:02.4 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 1 (rev 02)
ff:02.5 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 1 (rev 02)
ff:03.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Registers (rev 02)
ff:03.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Target Address Decoder (rev 02)
ff:03.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller RAS Registers (rev 02)
ff:03.4 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Test Registers (rev 02)
ff:04.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Control (rev 02)
ff:04.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Address (rev 02)
ff:04.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Rank (rev 02)
ff:04.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Thermal Control (rev 02)
ff:05.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Control (rev 02)
ff:05.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Address (rev 02)
ff:05.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Rank (rev 02)
ff:05.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Thermal Control (rev 02)
ff:06.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Control (rev 02)
ff:06.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Address (rev 02)
ff:06.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Rank (rev 02)
ff:06.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Thermal Control (rev 02)

Do you use a similar hardware?

Cheers,
David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2013-10-21 13:56   ` David Weber
  0 siblings, 0 replies; 14+ messages in thread
From: David Weber @ 2013-10-21 13:56 UTC (permalink / raw)
  To: Xiexiangyou
  Cc: wb, kvm, Luonengjun, qemu-devel, Huangpeng (Peter), qemu-devel-request

We have the exactly same problem on our NUMA systems. The clock of
windows 2008 guests sometimes just stops and it becomes slow when you
are connected via rdp. After connecting to qemu's vnc server
everything runs fine again. The problem seems to occour more often
when the host is under pressure.

What really is weird is that this only happens to the windows 2008
guest. Linux and windows 2003 guests run just fine.

We have also only seen the problem on our NUMA hosts, even with cpu
and memory pinning. The singel socket servers run the exactly same
software without that problem.

We have also tried many different configurations on the
host(CONFIG_HZ, CONFIG_PREEMTION, CONFIG_NUMA_BALANCING), qemu
(different timers, different catchup policies, different spinlock
settings) and on the guest side (use platformclock) but none did solve
the problem


Qemu version: 1.5.3
Linux: 3.11.4
glibc: 2.15
gcc: 4.7.3

# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 44
Stepping: 2
CPU MHz: 2401.000
BogoMIPS: 4800.18
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 12288K
NUMA node0 CPU(s): 0-5,12-17
NUMA node1 CPU(s): 6-11,18-23

# lspci
00:00.0 Host bridge: Intel Corporation 5520 I/O Hub to ESI Port (rev 22)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI
Express Root Port 1 (rev 22)
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI
Express Root Port 3 (rev 22)
00:05.0 PCI bridge: Intel Corporation 5520/X58 I/O Hub PCI Express
Root Port 5 (rev 22)
00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI
Express Root Port 7 (rev 22)
00:09.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI
Express Root Port 9 (rev 22)
00:0d.0 Host bridge: Intel Corporation Device 343a (rev 22)
00:0d.1 Host bridge: Intel Corporation Device 343b (rev 22)
00:0d.2 Host bridge: Intel Corporation Device 343c (rev 22)
00:0d.3 Host bridge: Intel Corporation Device 343d (rev 22)
00:0d.4 Host bridge: Intel Corporation 7500/5520/5500/X58 Physical
Layer Port 0 (rev 22)
00:0d.5 Host bridge: Intel Corporation 7500/5520/5500 Physical Layer
Port 1 (rev 22)
00:0d.6 Host bridge: Intel Corporation Device 341a (rev 22)
00:0e.0 Host bridge: Intel Corporation Device 341c (rev 22)
00:0e.1 Host bridge: Intel Corporation Device 341d (rev 22)
00:0e.2 Host bridge: Intel Corporation Device 341e (rev 22)
00:0e.4 Host bridge: Intel Corporation Device 3439 (rev 22)
00:13.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub I/OxAPIC
Interrupt Controller (rev 22)
00:14.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub System
Management Registers (rev 22)
00:14.1 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub GPIO and
Scratch Pad Registers (rev 22)
00:14.2 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Control
Status and RAS Registers (rev 22)
00:14.3 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Throttle
Registers (rev 22)
00:16.0 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.1 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.2 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.3 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.4 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.5 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.6 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:16.7 System peripheral: Intel Corporation 5520/5500/X58 Chipset
QuickData Technology Device (rev 22)
00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #4
00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #5
00:1a.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #6
00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2
EHCI Controller #2
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI
Express Root Port 1
00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI
Express Root Port 5
00:1c.5 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI
Express Root Port 6
00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #1
00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #2
00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB
UHCI Controller #3
00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2
EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller
00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA
AHCI Controller
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
01:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA
G200eW WPCM450 (rev 0a)
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
04:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
05:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit
SFI/SFP+ Network Connection (rev 01)
05:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit
SFI/SFP+ Network Connection (rev 01)
08:00.0 RAID bus controller: Adaptec AAC-RAID (rev 09)
fe:00.0 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture Generic Non-core Registers (rev 02)
fe:00.1 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture System Address Decoder (rev 02)
fe:02.0 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 0 (rev 02)
fe:02.1 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 0 (rev 02)
fe:02.2 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 0 (rev 02)
fe:02.3 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 1 (rev 02)
fe:02.4 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 1 (rev 02)
fe:02.5 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 1 (rev 02)
fe:03.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Registers (rev 02)
fe:03.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Target Address Decoder (rev 02)
fe:03.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller RAS Registers (rev 02)
fe:03.4 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Test Registers (rev 02)
fe:04.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Control (rev 02)
fe:04.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Address (rev 02)
fe:04.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Rank (rev 02)
fe:04.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Thermal Control (rev 02)
fe:05.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Control (rev 02)
fe:05.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Address (rev 02)
fe:05.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Rank (rev 02)
fe:05.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Thermal Control (rev 02)
fe:06.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Control (rev 02)
fe:06.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Address (rev 02)
fe:06.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Rank (rev 02)
fe:06.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Thermal Control (rev 02)
ff:00.0 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture Generic Non-core Registers (rev 02)
ff:00.1 Host bridge: Intel Corporation Xeon 5600 Series QuickPath
Architecture System Address Decoder (rev 02)
ff:02.0 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 0 (rev 02)
ff:02.1 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 0 (rev 02)
ff:02.2 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 0 (rev 02)
ff:02.3 Host bridge: Intel Corporation Xeon 5600 Series Mirror Port
Link 1 (rev 02)
ff:02.4 Host bridge: Intel Corporation Xeon 5600 Series QPI Link 1 (rev 02)
ff:02.5 Host bridge: Intel Corporation Xeon 5600 Series QPI Physical 1 (rev 02)
ff:03.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Registers (rev 02)
ff:03.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Target Address Decoder (rev 02)
ff:03.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller RAS Registers (rev 02)
ff:03.4 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Test Registers (rev 02)
ff:04.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Control (rev 02)
ff:04.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Address (rev 02)
ff:04.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Rank (rev 02)
ff:04.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 0 Thermal Control (rev 02)
ff:05.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Control (rev 02)
ff:05.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Address (rev 02)
ff:05.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Rank (rev 02)
ff:05.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 1 Thermal Control (rev 02)
ff:06.0 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Control (rev 02)
ff:06.1 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Address (rev 02)
ff:06.2 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Rank (rev 02)
ff:06.3 Host bridge: Intel Corporation Xeon 5600 Series Integrated
Memory Controller Channel 2 Thermal Control (rev 02)

Do you use a similar hardware?

Cheers,
David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFH] Qemu main thread is blocked in g_poll in windows guest
  2013-10-15 12:18     ` [Qemu-devel] " Xiexiangyou
@ 2014-02-20 19:59       ` Andrey Korolyov
  -1 siblings, 0 replies; 14+ messages in thread
From: Andrey Korolyov @ 2014-02-20 19:59 UTC (permalink / raw)
  To: Xiexiangyou, Paolo Bonzini
  Cc: qemu-devel, qemu-devel-request, kvm, Huangpeng (Peter), Luonengjun

On 10/15/2013 04:18 PM, Xiexiangyou wrote:
> Thanks for your reply :-)
> The QEMU version is 1.5.1,and the KVM version is 3.6
> 
> QEMU command:
> /usr/bin/qemu-kvm -name win2008_dc_5 -S -machine pc-i440fx-1.5,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp 4,maxcpus=64,sockets=16,cores=4,threads=1 -uuid 13e08e3e-cd23-4450-8bd3-60e7c220316d -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win2008_dc_5.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,clock=vm,driftfix=slew -no-hpet -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/dev/vmdisk/win2008_dc_5,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none,aio=native -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootinde
 x=1 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:16:49:23,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/run/libvirt/qem
u/win2008_dc_5.extend,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.1 -chardev socket,id=charchannel1,path=/var/run/libvirt/qemu/win2008_dc_5.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -vnc 0.0.0.0:4 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
> 
> (gdb) bt
> #0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
> #1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
> #2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
> #3  0x0000000000619309 in main_loop () at vl.c:2182
> #4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611
> 
> Main thread's strace message:
> # strace -p 6386
> Process 6386 attached - interrupt to quit
> restart_syscall(<... resuming interrupted call ...>
> 
> cpu thread's strace message:
> # strace -p 6389
> Process 6389 attached - interrupt to quit
> rt_sigtimedwait([BUS USR1], 0x7f9ba36fbc00) = -1 EAGAIN (Resource temporarily unavailable)
> rt_sigpending([])                       = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ...
> 
> Thanks!
> --xie
> 
> -----Original Message-----
> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini
> Sent: Tuesday, October 15, 2013 7:52 PM
> To: Xiexiangyou
> Cc: qemu-devel@nongnu.org; qemu-devel-request@nongnu.org; kvm@vger.kernel.org; Huangpeng (Peter); Luonengjun
> Subject: Re: [RFH] Qemu main thread is blocked in g_poll in windows guest
> 
> Il 15/10/2013 12:21, Xiexiangyou ha scritto:
>> Hi all:
>>
>> Windows2008 Guest run without pressure for long time. Sometimes, it
>> stop and looks like hanging. But when I connect to it with VNC, It
>> resume to run, but VM's time is delayed . When the vm is hanging, I
>> check the main thread of QEMU. I find that the thread is blocked in
>> g_poll function. it is waiting for a SIG, However, there is no SIG .
>>
>> I tried the clock with "hpet" and "no hpet", but came out the same
>> problem. Then I upgrade the glibc to newer, it didn't work too. I'm
>> confused. Is the reason that VM in sleep state and doesn't emit the
>> signal. I set the windows 's "power option", enable/disable the
>> "allow the wake timers", I didn't work.
>>
>> Is anybody have met the same problem before, or know the reason. Your
>> reply will be very helpful.
> 
> This post is missing a few pieces of information:
> 
> * What version of QEMU is this?
> 
> * What is the command line?
> 
> * How do you know g_poll is waiting for a signal and not for a file
> descriptor?
> 
> * What is the backtrace of the main thread?  What is the backtrace of
> the VCPU thread?
> 
> etc.
> 
> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


Hello,

To revive this thread - I have exactly the same problem on freshly
migrated virtual machines. The guest operating system is almost always
Linux, bug impact ratio is very low, about one per tens of migrations.
VM 'uptime', mean non-interruptible emulator state existence including
migrations tends to be relatively old (> 1 month). Due to feature
stabilization status in the recent releases, I am preferring to stick to
the 1.1.2 (though bug probably presented in much newer versions of
emulator as well).



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [RFH] Qemu main thread is blocked in g_poll in windows guest
@ 2014-02-20 19:59       ` Andrey Korolyov
  0 siblings, 0 replies; 14+ messages in thread
From: Andrey Korolyov @ 2014-02-20 19:59 UTC (permalink / raw)
  To: Xiexiangyou, Paolo Bonzini
  Cc: qemu-devel-request, Luonengjun, qemu-devel, kvm, Huangpeng (Peter)

On 10/15/2013 04:18 PM, Xiexiangyou wrote:
> Thanks for your reply :-)
> The QEMU version is 1.5.1,and the KVM version is 3.6
> 
> QEMU command:
> /usr/bin/qemu-kvm -name win2008_dc_5 -S -machine pc-i440fx-1.5,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp 4,maxcpus=64,sockets=16,cores=4,threads=1 -uuid 13e08e3e-cd23-4450-8bd3-60e7c220316d -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win2008_dc_5.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,clock=vm,driftfix=slew -no-hpet -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/dev/vmdisk/win2008_dc_5,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none,aio=native -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:16:49:23,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/run/libvirt/qem
u/win2008_dc_5.extend,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.1 -chardev socket,id=charchannel1,path=/var/run/libvirt/qemu/win2008_dc_5.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -vnc 0.0.0.0:4 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
> 
> (gdb) bt
> #0  0x00007f9ba661a423 in poll () from /lib64/libc.so.6
> #1  0x000000000059460f in os_host_main_loop_wait (timeout=4294967295) at main-loop.c:226
> #2  0x00000000005946a4 in main_loop_wait (nonblocking=0) at main-loop.c:464
> #3  0x0000000000619309 in main_loop () at vl.c:2182
> #4  0x000000000061fb5e in main (argc=54, argv=0x7fff879830c8, envp=0x7fff87983280) at vl.c:4611
> 
> Main thread's strace message:
> # strace -p 6386
> Process 6386 attached - interrupt to quit
> restart_syscall(<... resuming interrupted call ...>
> 
> cpu thread's strace message:
> # strace -p 6389
> Process 6389 attached - interrupt to quit
> rt_sigtimedwait([BUS USR1], 0x7f9ba36fbc00) = -1 EAGAIN (Resource temporarily unavailable)
> rt_sigpending([])                       = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ioctl(17, 0xae80, 0)                    = 0
> ...
> 
> Thanks!
> --xie
> 
> -----Original Message-----
> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini
> Sent: Tuesday, October 15, 2013 7:52 PM
> To: Xiexiangyou
> Cc: qemu-devel@nongnu.org; qemu-devel-request@nongnu.org; kvm@vger.kernel.org; Huangpeng (Peter); Luonengjun
> Subject: Re: [RFH] Qemu main thread is blocked in g_poll in windows guest
> 
> Il 15/10/2013 12:21, Xiexiangyou ha scritto:
>> Hi all:
>>
>> Windows2008 Guest run without pressure for long time. Sometimes, it
>> stop and looks like hanging. But when I connect to it with VNC, It
>> resume to run, but VM's time is delayed . When the vm is hanging, I
>> check the main thread of QEMU. I find that the thread is blocked in
>> g_poll function. it is waiting for a SIG, However, there is no SIG .
>>
>> I tried the clock with "hpet" and "no hpet", but came out the same
>> problem. Then I upgrade the glibc to newer, it didn't work too. I'm
>> confused. Is the reason that VM in sleep state and doesn't emit the
>> signal. I set the windows 's "power option", enable/disable the
>> "allow the wake timers", I didn't work.
>>
>> Is anybody have met the same problem before, or know the reason. Your
>> reply will be very helpful.
> 
> This post is missing a few pieces of information:
> 
> * What version of QEMU is this?
> 
> * What is the command line?
> 
> * How do you know g_poll is waiting for a signal and not for a file
> descriptor?
> 
> * What is the backtrace of the main thread?  What is the backtrace of
> the VCPU thread?
> 
> etc.
> 
> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


Hello,

To revive this thread - I have exactly the same problem on freshly
migrated virtual machines. The guest operating system is almost always
Linux, bug impact ratio is very low, about one per tens of migrations.
VM 'uptime', mean non-interruptible emulator state existence including
migrations tends to be relatively old (> 1 month). Due to feature
stabilization status in the recent releases, I am preferring to stick to
the 1.1.2 (though bug probably presented in much newer versions of
emulator as well).

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-02-20 19:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-15 10:21 [RFH] Qemu main thread is blocked in g_poll in windows guest Xiexiangyou
2013-10-15 10:21 ` [Qemu-devel] " Xiexiangyou
2013-10-15 11:52 ` Paolo Bonzini
2013-10-15 11:52   ` [Qemu-devel] " Paolo Bonzini
2013-10-15 12:18   ` Xiexiangyou
2013-10-15 12:18     ` [Qemu-devel] " Xiexiangyou
2013-10-15 12:30     ` Paolo Bonzini
2013-10-15 12:30       ` [Qemu-devel] " Paolo Bonzini
2013-10-16  4:03       ` Xiexiangyou
2013-10-16  4:03         ` [Qemu-devel] " Xiexiangyou
2014-02-20 19:59     ` Andrey Korolyov
2014-02-20 19:59       ` [Qemu-devel] " Andrey Korolyov
2013-10-21 13:56 ` David Weber
2013-10-21 13:56   ` David Weber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.