Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1623311

Summary: Failed to boot from HD when set poll-max-ns=1125899906842624 and then quit it, qemu hang
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: aihua liang <aliang>
Component: qemu-kvmAssignee: Stefan Hajnoczi <stefanha>
Status: CLOSED CURRENTRELEASE QA Contact: qing.wang <qinwang>
Severity: medium Docs Contact:
Priority: low    
Version: ---CC: chayang, coli, juzhang, knoel, ngu, qinwang, rbalakri, virt-maint
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-30 03:05:31 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
Screen_capture
none
strace_log_part1
none
strace_log_part2
none
starce_log_part3
none
strace_log_part4
none
rhel75_strace_log none

Description aihua liang 2018-08-29 02:35:03 UTC
Created attachment 1479382 [details]
Screen_capture

Description of problem:
  Failed to boot from HD when set poll-max-ns=1125899906842624 and then quit it, qemu hang

Version-Release number of selected component (if applicable):
 kernel version:3.10.0-935.el7.x86_64
 qemu-kvm-rhev version:qemu-kvm-rhev-2.12.0-11.el7.x86_64

How reproducible:
 100%

Steps to Reproduce:
1.Boot guest with poll-max-ns=1125899906842624 (2**50), cmds as bellow:
    /usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -machine pc  \
    -nodefaults \
    -device VGA,bus=pci.0,addr=0x2  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/monitor-qmpmonitor1-20180822-083928-y8PRqUqd,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/monitor-catch_monitor-20180822-083928-y8PRqUqd,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=idVmd181  \
    -chardev socket,id=serial_id_serial0,path=/var/tmp/serial-serial0-20180822-083928-y8PRqUqd,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20180822-083928-y8PRqUqd,path=/var/tmp/seabios-20180822-083928-y8PRqUqd,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20180822-083928-y8PRqUqd,iobase=0x402 \
    -device nec-usb-xhci,id=usb1,bus=pci.0,addr=0x3 \
    -object iothread,id=iothread0,poll-max-ns=1125899906842624 \
    -device virtio-scsi-pci,id=scsi0,iothread=iothread0 \
    -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=directsync,format=qcow2,file=/home/kvm_autotest_root/images/rhel76-64-virtio-scsi.qcow2 \
    -device scsi-hd,drive=drive_image1,bus=scsi0.0,id=image1 \
    -device virtio-net-pci,mac=9a:1e:1f:20:21:22,id=idVobBWE,vectors=4,netdev=idH1zOQ2,bus=pci.0,addr=0x6  \
    -netdev tap,id=idH1zOQ2,vhost=on \
    -m 4096  \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2  \
    -cpu host \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot menu=off,strict=off,order=cdn,once=d \
    -enable-kvm \
    -monitor stdio \
    -spice disable-ticketing,port=5000 \

2. Wait for one night, then quit it.
   (qemu)#quit

Actual Reuslt:
  In step1, when set poll-max-ns=1125899906842624 (2**50), vm can't boot from HD.
  Attachment is the log "strace_log"got by cmd "strace -T -tt -e trace=all -p 20998 -o output2.txt"
   
  And in step2, when quit vm, it hangs with no response.

Expected result: 
  VM can boot normally when set poll-max-ns in range [0, 2**64]

Additional info:
  When set poll-max-ns equal to or greater than 2**32, it needs more time before it can load menuentry, ex, "Red Hat Enterprise Linux Server (3.10.0-933.el7.x86_64) 7.6 (Maipo)"; it's especially obvious for windows guest.

  Attachment is the "strace_log" and screen capture for failed to "boot from hd".

Comment 2 aihua liang 2018-08-29 07:33:53 UTC
Created attachment 1479397 [details]
strace_log_part1

Comment 3 aihua liang 2018-08-29 07:35:44 UTC
Created attachment 1479398 [details]
strace_log_part2

Comment 4 aihua liang 2018-08-29 07:36:57 UTC
Created attachment 1479399 [details]
starce_log_part3

Comment 5 aihua liang 2018-08-29 07:38:02 UTC
Created attachment 1479400 [details]
strace_log_part4

Comment 6 aihua liang 2018-08-29 09:22:05 UTC
qemu-img-rhev-2.10.0-21.el7_5.7.x86_64 can also hit this issue.

Comment 7 aihua liang 2018-08-29 09:27:26 UTC
Created attachment 1479416 [details]
rhel75_strace_log