Bug 553407
| Summary: | nanosleep() is unstable on xen kernel and ntpd with -x option | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Marc Milgram <mmilgram> | ||||
| Component: | kernel-xen | Assignee: | Paolo Bonzini <pbonzini> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Boris Ranto <branto> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 5.4 | CC: | branto, drjones, jlv, mjenner, pbonzini, xen-maint | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-01-13 20:58:41 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 514489 | ||||||
| Attachments: |
|
||||||
Created attachment 382323 [details]
reproducer.sh
Is this in a guest or in the host? I cannot reproduce this in the host, and in the guest I cannot even set the date because it is reset immediately to the host's date. I was able to reproduce this under DOM 0 (host). Reproduced now in the host. I get
nanosleep({0, 20000000}, NULL) = 0
in the strace.
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. I've reproduced it on rhel5.5-196 and 164 xen kernel. Rhel6-xen4.0.1-rc6 doesn't heve this bug and SLES11-xen3.3.1 also doesn't have the bug. Other results: - works with RHEL hypervisor and SLES kernel - fails with RHEL kernel and SLES hypervisor So the bug is (as kind of expected) in the kernel. in kernel-2.6.18-214.el5 You can download this test kernel from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed. 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 |
Description of problem: nanosleep() which is used like usleep command is unstable. Even if nanosleep() doesn't sleep for specific time, it returns 0 (successfully). Version-Release number of selected component (if applicable): kernel-xen-2.6.18-164.el5 How reproducible: Every time. Steps to Reproduce: 1. Boot xen kernel. 2. Configure /etc/ntp.conf and /etc/sysconfig/ntpd. --- ntp.conf server xxx.xxx.xxx.xxx --- *Set 1 NTP server. --- ntpd OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -x" --- *Add -x option. 3. Start ntpd service. 4. Set the date forward about 10 minutes. # date Tue Sep 29 13:16:07 JST 2009 # date 09291326 Tue Sep 29 13:26:00 JST 2009 5. Wait a few moments for sync NTP server (Check ntpq -p command result). 6. Execute usleep command. --- test.sh for i in $(seq 1 10) do date +%H:%M:%S.%N usleep 200000 done # ./test.sh | awk 'BEGIN{FS=":"}{print "60*60*"$1"+60*"$2"+"$3}' | bc |\ xargs echo | awk '{for(i = 1; i < NF; i++){print $(i+1)"-"$i}}' | bc Actual results: # ./test.sh | awk 'BEGIN{FS=":"}{print "60*60*"$1"+60*"$2"+"$3}' | bc |\ xargs echo | awk '{for(i = 1; i < NF; i++){print $(i+1)"-"$i}}' | bc 0 0 0 0 0 0 0 0 0 Expected results: # ./test.sh | awk 'BEGIN{FS=":"}{print "60*60*"$1"+60*"$2"+"$3}' | bc |\ xargs echo | awk '{for(i = 1; i < NF; i++){print $(i+1)"-"$i}}' | bc .203355000 .202815000 .202857000 .202972000 .203597000 .202734000 .202808000 .202839000 .202948000 Additional info: It isn't reproduced on generic kernel environment. It isn't reproduced on ntpd without -x option. If ntpd stops during reproducing, nanosleep() becomes stable. If usleep is given more than 1000000 (1sec.) during reproducing, it looks stable.