Bug 962326 - loss data while transfer data from guest to host by chardev
loss data while transfer data from guest to host by chardev
Status: CLOSED DUPLICATE of bug 702271
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
medium Severity high
: rc
: ---
Assigned To: Amit Shah
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-13 04:26 EDT by mazhang
Modified: 2016-09-20 00:39 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-21 08:58:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mazhang 2013-05-13 04:26:43 EDT
Description of problem:
loss data while transfer data from guest to host by chardev


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.369.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot up guest with follow command line:
/usr/libexec/qemu-kvm \
-cpu SandyBridge \
-M rhel6.5.0 \
-enable-kvm \
-m 4096 \
-smp 2,sockets=2,cores=1,threads=1 \
-name rhel6.5-64 \
-uuid 9a0e67ec-f286-d8e7-0548-0c1c9ec93001 \
-nodefconfig \
-nodefaults \
-monitor stdio \
-rtc base=utc,clock=host,driftfix=slew \
-no-kvm-pit-reinjection \
-drive file=/home/images/rhel6u5.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2 \
-drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw \
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
-vga qxl \
-netdev tap,id=hostnet0,downscript=no \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pci.0,addr=0x4,bootindex=1 \
-qmp tcp:0:5555,server,nowait \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-spice port=5900,disable-ticketing \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 \
-chardev socket,id=channel1,path=/tmp/serial-socket-0,server,nowait \
-device virtserialport,chardev=channel1,name=org.linux-kvm.port.1,bus=virtio-serial0.0,id=port1 \

2.Transfer data from guest to host use follow two scenario.
a. open-write-close test:

for seq in $(seq 1 100); do echo "test $seq" > /dev/virtio-ports/org.kraxel.test; sleep 1; done

b. keep-device-open test:

(for seq in $(seq 1 100); do echo "test $seq"; sleep 1; done) > /dev/virtio-ports/org.kraxel.test

  
Actual results:
host receive data
test 3
test 4
test 5
test 6
test 7
test 8
test 9
test 10
...

loss "test 1" and "test 2"

Expected results:
ensure data integrity

Additional info:
it didn't happen in qemu-kvm-0.12.1.2-2.367.el6.x86_64,this bug is a regression by bz909059 fix.
Comment 1 mazhang 2013-05-13 04:31:20 EDT
first time found this bug in qemu-kvm-0.12.1.2-2.138.el6 ,refer bz621484 .
Comment 2 Amit Shah 2013-05-13 04:48:20 EDT
This is an expected regression, as the fix for the bug 621484 was buggy.  This will be resolved upstream first.  This is noted in the upstream feature known bugs section:

http://wiki.qemu.org/Features/ChardevFlowControl#Known_bugs
Comment 8 Amit Shah 2013-11-25 06:43:33 EST
Gerd, do you recall if this was fixed?  IIRC we were blocking on main loop to switch to poll() instead of select() so that qemu would recognise backend disconnects.
Comment 10 Gerd Hoffmann 2013-11-29 04:06:53 EST
Hmm, not sure.  From a brief look at the code it looks like main-loop.c still uses select even though it uses glib poll bits somehow ...
Comment 12 Amit Shah 2014-07-21 08:58:47 EDT

*** This bug has been marked as a duplicate of bug 702271 ***

Note You need to log in before you can comment on or make changes to this bug.