Bug 584679 - The kvm clock couldn't go back after stop/continue
Summary: The kvm clock couldn't go back after stop/continue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.5
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580954
TreeView+ depends on / blocked
 
Reported: 2010-04-22 07:36 UTC by Golita Yue
Modified: 2011-01-13 21:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-13 21:28:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
guest dmesg (35.01 KB, text/plain)
2010-06-03 10:06 UTC, Golita Yue
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0017 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.6 kernel security and bug fix update 2011-01-13 10:37:42 UTC

Description Golita Yue 2010-04-22 07:36:02 UTC
Description of problem:
The kvm clock couldn't adjust to back after stop/continue. 
The following is the details.

[root@dhcp-66-83-61 ~]# ntpdate -q clock.redhat.com
server 66.187.233.4, stratum 1, offset -1.420393, delay 0.31921
21 Apr 10:22:37 ntpdate[2826]: step time server 66.187.233.4 offset -1.420393 sec
[root@dhcp-66-83-61 ~]#
[root@dhcp-66-83-61 ~]# ntpdate -b clock.redhat.com
21 Apr 10:22:44 ntpdate[2827]: step time server 66.187.233.4 offset -1.419668 sec
[root@dhcp-66-83-61 ~]#
[root@dhcp-66-83-61 ~]# ntpdate -q clock.redhat.com
server 66.187.233.4, stratum 1, offset -0.003611, delay 0.31802
21 Apr 10:22:49 ntpdate[2830]: adjust time server 66.187.233.4 offset -0.003611 sec

stop + 10mins + continue

[root@dhcp-66-83-61 ~]# ntpdate -q clock.redhat.com
server 66.187.233.4, stratum 1, offset 77.590888, delay 0.32227
21 Apr 10:33:11 ntpdate[2833]: step time server 66.187.233.4 offset 77.590888 sec

10 mins later

[root@dhcp-66-83-61 ~]# ntpdate -q clock.redhat.com
server 66.187.233.4, stratum 1, offset 77.577350, delay 0.31375
21 Apr 10:44:16 ntpdate[2861]: step time server 66.187.233.4 offset 77.577350 sec

10 mins later

[root@dhcp-66-83-61 ~]# ntpdate -q clock.redhat.com
server 66.187.233.4, stratum 1, offset 77.568127, delay 0.31583
21 Apr 10:54:29 ntpdate[2881]: step time server 66.187.233.4 offset 77.568127 sec

2 hours later

[root@dhcp-66-83-61 ~]# ntpdate -q clock.redhat.com
server 66.187.233.4, stratum 1, offset 77.438987, delay 0.31610
21 Apr 13:06:37 ntpdate[3778]: step time server 66.187.233.4 offset 77.438987 sec

Version-Release number of selected component (if applicable):
kernel 2.6.32-19.el6.x86_64
qemu-kvm-0.12.1.2-2.38.el6.x86_64


How reproducible:
2/2

Steps to Reproduce:
1. start host with 'processor.max_cstate=1' in kernel line
2. load host
# for(( I=0; I<`cat /proc/cpuinfo  | grep processor | wc -l`;I++)) ; do echo $I; taskset -c $I /bin/bash -c 'for ((;;));  do X=1; done &'  ; done

3. start guest and run ntpdate -b clock.redhat.com
# /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -startdate now -cpu qemu64,+sse2 -drive file=/mnt/RHEL-Server-5.5-64.qcow2,if=ide,boot=on -net nic,model=e1000,macaddr=20:20:11:23:22:00,vlan=0 -net tap,script=/etc/qemu-ifup,downscript=no,vlan=0 -vnc :1 -m 2G -smp 2 -balloon none -boot c -monitor stdio -uuid `uuidgen` -no-kvm-pit-reinjection

4. run (qemu)stop and wait 10 minutes 
5. run (qemu)continue and run ntpdate -q clock.redhat.com
6. run ntpdate -q clock.redhat.com after 10 minutes 
  
Actual results:
The offset is 77.568127 

Expected results:
no big offset after stop/continus, it could be adjusted

Additional info:

Comment 2 RHEL Program Management 2010-04-22 09:12:30 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Glauber Costa 2010-05-06 17:13:34 UTC
Please post your guest dmesg as well.

Comment 4 Golita Yue 2010-06-03 10:06:15 UTC
(In reply to comment #3)
> Please post your guest dmesg as well.    

Attached the guest dmesg. please refer to attachment

Comment 5 Golita Yue 2010-06-03 10:06:55 UTC
Created attachment 419305 [details]
guest dmesg

Comment 6 Glauber Costa 2010-06-07 14:26:27 UTC
Note added to all kvmclock bugs:

Please retest with kernel-2.6.18-202.el5 (RHEL5) or kernel-2.6.32-33.el6 (RHEL6) in your guest kernel. In case it works, please close as a DUP of bugs 570824 (RHEL5) or 569603 (RHEL6)

Comment 7 Glauber Costa 2010-06-22 13:57:32 UTC
Please re-test with latest code.

Comment 10 Glauber Costa 2010-06-30 16:13:03 UTC
This is a guest kernel bug, thus, not RHEL6. Moving components.

Comment 12 RHEL Program Management 2010-07-01 05:29:33 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 16 RHEL Program Management 2010-07-02 05:29:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 20 RHEL Program Management 2010-07-03 05:28:41 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 24 RHEL Program Management 2010-07-04 05:08:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 27 Jarod Wilson 2010-07-12 15:46:07 UTC
in kernel-2.6.18-206.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 29 Golita Yue 2010-07-20 10:01:58 UTC
Cannot reproduce this bug with the following environment:
Host:
qemu-kvm-0.12.1.2-2.96.el6.x86_64
kernel 2.6.32-44.1.el6.x86_64el 

Guest:
kernel 2.6.18-206.el5

cmdline:
/usr/libexec/qemu-kvm -usbdevice tablet -rtc base=localtime,clock=vm,driftfix=slew -cpu qemu64,+x2apic -m 2G -smp 2 -drive file=/opt/r5u5_64.raw,if=none,cache=none,format=raw,werror=stop,rerror=stop,id=drive-ide0-0-0 -device ide-drive,bus=ide.0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,mac=00:10:20:03:07:1c,bus=pci.0,addr=0x7,id=hostnet0 -uuid `uuidgen` -boot c -startdate now  -balloon none -no-kvm-pit-reinjection -vnc :2

Comment 31 errata-xmlrpc 2011-01-13 21:28:50 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html


Note You need to log in before you can comment on or make changes to this bug.