Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): # uname -r 2.6.32-131.0.10.el6.x86_64 [root@localhost Desktop]# rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.160.el6.x86_64 Guest Tried RHEL6.1-2011-04-27 64 bit & RHEL5.7 64 bit guest both hit the issue. How reproducible: 100% Steps to Reproduce: 1.start VM with virtio-serial-port CLI:<CommandLine> -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x8 -chardev socket,id=s1,path=/tmp/tt1,server,nowait -device virtserialport,chardev=s1,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0 2.in the guest ,send data via /dev/vport0p1 echo c > /dev/vport0p1 (after step2 ,echo stays there waiting to send the data out) 3.on the host , nc -U /tmp/tt ,after received data,stop nc 4.in the guest ,send data via /dev/vport0p1 2nd time Actual results: after step2 ,echo will return directly without waiting host receive data. then repeat step2-4 in a loop ,found that 2nd/4th/6th/8th/10th... times send data via virtio-serial-port,echo commands returns directly while 1st/3th/5th/7th.. times not. Expected results: all the times echo command should return after sending data out to host Additional info:
This might be related to bug 621484. We used to lose data earlier when a host-side connection was terminated. After fixing that in bug 621484, we no longer lose data, but still miss the disconnect event. This can't be fixed till we switch to poll() in qemu's main_loop. That depends on the glib integration, so looks like we'll have to wait till RHEL7 for the fix here.
*** Bug 729923 has been marked as a duplicate of this bug. ***
*** Bug 797854 has been marked as a duplicate of this bug. ***
*** Bug 962326 has been marked as a duplicate of this bug. ***
The duplicates may have different testcases, please check them while verifying this bug too.
main-loop.c still isn't using poll(), and we need that to detect SIGHUP. Not likely to happen anytime soon.
This should work in RHEL7 now. Please test.
Hi Jing, Could you have a test in latest RHEL7.2? Best Regards, Junyi
kernel:3.10.0-327.el7.x86_64 qemu-kvm-rhev-2.3.0-31.el7,qemu-kvm-1.5.3-105.el7_2.1 and qemu-kvm-rhev-2.3.0-31.el7_2.3 1. Can not reproduce with comment0 2. Hit the data lost in the host when echo data in the guest, but the phenomenon are randomly. a.qemu-kvm-rhev-2.3.0-31.el7: Steps to Reproduce: 1.start VM with virtio-serial-port CLI:<CommandLine> -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0\ -chardev socket,id=s1,path=/tmp/tt1,server,nowait \ -device virtserialport,chardev=s1,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0 \ 2.in the guest ,send data via /dev/vport0p1 echo c > /dev/vport0p1 3.on the host , nc -U /tmp/tt ,after received data,stop nc Result: tried 2 times with above steps, first time: echo will return directly without waiting host receive data after step2 and the data lost in the host after ran step3 ,only echo will waiting host receive data when echo 12 charaters, the second time: echo echo will return directly without waiting host receive data after step2 when ran "echo c > /dev/vport0p1" at 2nd b. qemu-kvm-rhev-2.3.0-31.el7_2.3: the steps are same with a result:echo echo will return directly without waiting host receive data after step2 when ran "echo c > /dev/vport0p1" at 2nd time c. qemu-kvm-1.5.3-105.el7_2.1: steps are same with a and b result:tried 2 times with above steps, first time: echo will return directly without waiting host receive data after step2 and the data lost in the host after ran step3 ,only echo will waiting host receive data when echo 14 charaters, the second time: echo echo will return directly without waiting host receive data after step2 when ran "echo c > /dev/vport0p1" at 2nd time.