RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 962326 - loss data while transfer data from guest to host by chardev
Summary: loss data while transfer data from guest to host by chardev
Keywords:
Status: CLOSED DUPLICATE of bug 702271
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-13 08:26 UTC by mazhang
Modified: 2016-09-20 04:39 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-21 12:58:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description mazhang 2013-05-13 08:26:43 UTC
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 08:31:20 UTC
first time found this bug in qemu-kvm-0.12.1.2-2.138.el6 ,refer bz621484 .

Comment 2 Amit Shah 2013-05-13 08:48:20 UTC
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 11:43:33 UTC
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 09:06:53 UTC
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 12:58:47 UTC

*** 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.