Bug 1184691

Summary: ioctl can not return when use ioctl(fd, RTC_UIE_ON, 0) to set rtc_cmos
Product: Red Hat Enterprise Linux 7 Reporter: Jun Li <juli>
Component: qemu-kvm-rhevAssignee: Marcelo Tosatti <mtosatti>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: hhuang, juzhang, michen, qzhang, scui, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-20 00:02:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
autotest-log
none
rtctest.c and Makefile none

Description Jun Li 2015-01-22 03:14:13 UTC
Description of problem:
When run auto test timer device run, hit a issue(just hit once, file this bz to trace this issue and for developer to do further analysis).
using ioctl(fd, RTC_UIE_ON, 0) to set rtc_cmos, ioctl can not return in 360s.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.1.2-16.el7

How reproducible:
Only hit one time

Steps to Reproduce:
1.boot a rhel 7.1 guest using following cli:
/bin/qemu-kvm \
    -S  \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -M pc  \
    -nodefaults  \
    -vga qxl  \
    -global qxl-vga.vram_size=33554432  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20141212-151022-e03tMo1X,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20141212-151022-e03tMo1X,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20141212-151022-e03tMo1X,path=/tmp/seabios-20141212-151022-e03tMo1X,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20141212-151022-e03tMo1X,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.1-64-virtio.raw \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=04 \
    -device virtio-net-pci,mac=9a:a7:a8:a9:aa:ab,id=id3fVvl9,vectors=4,netdev=idFYIIrx,bus=pci.0,addr=05  \
    -netdev tap,id=idFYIIrx,vhost=on,vhostfd=23,fd=22  \
    -m 4096  \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2  \
    -cpu 'SandyBridge',+kvm_pv_unhalt \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -spice port=3000,password=123456,addr=0,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off \
    -enable-kvm

2.inside guest do following test.
# ./rtctest /dev/rtc0 8192
Note: rtctest.c and Makefile will be added in the attachment.

3.

Actual results:
After step 2, find "# ./rtctest /dev/rtc0 8192" will hang at ioctl(fd, RTC_UIE_ON, 0).

Expected results:
Should be returned in 360 s.

Additional info:
QE has find guest are using rtc_cmos.
# cat /sys/class/rtc/rtc0/name 
rtc_cmos


Attachment is the log of autotest.

Comment 2 Jun Li 2015-01-22 03:23:39 UTC
Created attachment 982579 [details]
autotest-log

Comment 3 Jun Li 2015-01-22 03:25:55 UTC
Created attachment 982580 [details]
rtctest.c and Makefile