This bug has been copied from bug #643750 and has been proposed
to be backported to 6.0 z-stream (EUS).
Reproduced on rhel6.0 with kernel 2.6.32-71.el6.x86_64.
1. boot a guest with virtio-serial-port
2. open the socket with follwing script
# pythonh open-socket.py /tmp/charsoc
# cat open-socket
#fd = os.open(sys.argv, os.O_RDONLY)
s = socket.socket(socket.AF_UNIX)
# do nothing
#python open-socket /tmp/vport0
3. transfer a file(>2G) via virtio-serial
guest freezes, cannot respond to keyboard.
# /usr/libexec/qemu-kvm -M rhel6.0.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name rhel6.0 -uuid `uuidgen` -rtc base=utc -boot c -drive file=/root/RHEL-Server-6.0-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:3f:de:3b -device virtio-serial-pci -chardev socket,path=/tmp/charsoc,id=channel0,server,nowait -device virtserialport,chardev=channel0 -usb -device usb-tablet,id=input1 -vnc :0 -monitor stdio
Verified on host kernel kernel-2.6.32-71.23.1.el6.x86_64.rpm with same steps&CLI above, when transferring large file from guest to host via virtio-serial, guest keeps alive and can interrupt cat process.
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.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Using a virtio serial port from an application, filling it until the write command returns -EAGAIN and then executing a select command for the write command, caused the select command to not return any values when using the virtio serial port in a non-blocking mode. When used in blocking mode, the write command waited until the host indicated it had used up the buffers. This was due to the fact that the poll operation waited for the port->waitqueue pointer; however, nothing woke the waitqueue when there was room again in the queue. With this update, the queue is woken via host notifications so that buffers consumed by the host can be reclaimed, the queue freed, and the application write operations may proceed again.