From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ValM8-0002J9-CL for qemu-devel@nongnu.org; Mon, 28 Oct 2013 07:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ValM3-000501-Eb for qemu-devel@nongnu.org; Mon, 28 Oct 2013 07:51:36 -0400 Received: from mail-qc0-x22d.google.com ([2607:f8b0:400d:c01::22d]:61235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ValM3-0004zm-9B for qemu-devel@nongnu.org; Mon, 28 Oct 2013 07:51:31 -0400 Received: by mail-qc0-f173.google.com with SMTP id l13so3705746qcy.4 for ; Mon, 28 Oct 2013 04:51:30 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <526E4FBD.1050705@redhat.com> Date: Mon, 28 Oct 2013 12:51:25 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <7A2C95E1327F7148AB122F200A3EFA403447B128@SZXEMA502-MBX.china.huawei.com> <08BFF9FD34CF37498327C2B6102BDD1E20009F07@Exchange2010-2.corit.local> <157A2E8C7A89F4CBD37C2DD5@nimrod.local> <7A2C95E1327F7148AB122F200A3EFA403447D838@SZXEMA502-MBX.china.huawei.com> <3CFE968397006BAF41FA4D5C@nimrod.local> <08BFF9FD34CF37498327C2B6102BDD1E2000F272@Exchange2010-2.corit.local> In-Reply-To: <08BFF9FD34CF37498327C2B6102BDD1E2000F272@Exchange2010-2.corit.local> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] BUG: RTC issue when Windows guest is idle List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matthew Anderson Cc: Stefan Hajnoczi , Xiexiangyou , 'Alex Bligh' , "qemu-devel@nongnu.org" Il 28/10/2013 07:58, Matthew Anderson ha scritto: > Hi Alex, > > I've been doing some testing with the latest git version and so far I haven't seen a guest freeze in the same circumstances as before. > > A weird thing that has been happening is the RTC timer stopping after a live migration. This happened in both 1.6.1 and the 1.6.50 git build. To replicate the issue I was migrating to/from the same machine and anywhere between 1 and 3 migrations the guest clock would stop. Connecting to the VNC console would not get it running again. I've tried to replicate the issue with the HPET enabled but the guest clock works flawlessly with it enabled. Please try this: (1) reproduce it with migration to file + restore from file to save, from QEMU monitor: migrate exec:cat>migr.ckp to restore, from command line: ... -incoming 'exec:cat migr.ckp' (2) If the RTC stops after restoring, compress migr.ckp and place it somewhere I can download it. Thanks, Paolo > Guest VM is Windows 2008R2. Host is Ubuntu 13.04 (kernel 3.8.0-25-generic) > Command line - > /usr/local/bin/qemu-system-x86_64 -enable-kvm -nodefconfig -nodefaults -daemonize -usb -chardev socket,id=charmonitor,path=/var/run/based1/monitor/525ce3d009c437d678000002.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -chardev socket,path=/var/run/based1/ga/525ce3d009c437d678000002.guestagent,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -pidfile /var/run/based1/pid/525ce3d009c437d678000002.pid -vga cirrus -vnc 0.0.0.0:1 -M pc-i440fx-1.6 -m 1024 -smp sockets=1,cores=1,threads=1 -cpu qemu64,+vme,+dts,+acpi,+dtes64,+vmx,+smx,+ssse3,+sse4_1,+sse4_2,+tpr_shadow,+vnmi,+flexpriority,+ept,+vpid,hv_relaxed,hv_spinlocks=0xffff,hv_vapic -rtc base=utc,driftfix=slew --no-hpet -drive aio=native,file=rbd:sata/525ce3d009c437d678000003,if=virtio,id=disk-525ce3d009c437d678000005,format=raw,cache=writeback,media=disk,index=0,addr=0xa -netdev tap,id=netdev-5264b6d46e53c81719000236,vhost=off,ifname=tap2,script=no,dow nscript=no -device virtio-net-pci,netdev=netdev-5264b6d46e53c81719000236,id=interface-5264b6d46e53c81719000236,mac=9a:a5:63:64:6f:76,bus=pci.0,addr=0xb -incoming tcp:0:3004 > > Thanks > -Matt > > > -----Original Message----- > From: Alex Bligh [mailto:alex@alex.org.uk] > Sent: Tuesday, 22 October 2013 5:36 PM > To: Xiexiangyou; Matthew Anderson > Cc: Stefan Hajnoczi; qemu-devel@nongnu.org; Alex Bligh > Subject: Re: [Qemu-devel] BUG: RTC issue when Windows guest is idle > > > > --On 22 October 2013 08:28:08 +0000 Xiexiangyou > wrote: > >> Hi: >> >> I have run windows2008r2 guest with qemu-1.5.1/1.6(I have not test the >> the newer version) for long time, the issue (guest in hangup state) >> will come out.When guest in hangup state, QEMU main thread is blocked >> in g_poll loop. >>> 398c398,399 >>> < uint32_t timeout = UINT32_MAX; >>> --- >>>> /* uint32_t timeout = UINT32_MAX; */ >>>> uint32_t timeout = 1000; >>> >> It seems can fix the problem, and rtc/hpet interrupt can inject into >> guest again because of the "timeout", and guest will wake up . But >> maybe the issue is also exist, because during the time before timeout >> , guest also will lose rtc/hpet ticks. > > I do not think that is the correct fix for 1.5.1/1.6; what you are basically doing is limiting the wait in the mainloop to one second (1.5.1/1.6 are in milliseconds); however, I believe there may be other code that looks for infinite timeouts. Either there is some other bug that this is masking (in which case it may or may not be fixed in master / 1.7), or its a bug in the timer stuff in 1.5.1/1.6 (which would not surprise me) which is likely to have been fixed in master / 1.7. > > -- > Alex Bligh > >