Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 796115

Summary: write to virtio serial is blocked
Product: Red Hat Enterprise Linux 6 Reporter: tingting zheng <tzheng>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: acathrow, amit.shah, bsarathy, chayang, juzhang, leiwang, michen, mkenneth, moli, qguan, qwan, rjones, rwu, shu, virt-maint, yupzhang
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-29 02:16:30 UTC Type: ---
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
LIBGUESTFS_DEBUG log file
none
Reproducer for rhbz 796115 none

Description tingting zheng 2012-02-22 10:52:37 UTC
Created attachment 564913 [details]
LIBGUESTFS_DEBUG log file

Description of Problem:
Libguestfs hang when using virt-v2v to convert guest

Version-Release number of selected component (if applicable):
virt-v2v-0.8.6-1.el6.x86_64
libguestfs-1.16.5-1.el6.x86_64
libvirt-0.9.10-2.el6.x86_64
qemu-kvm-0.12.1.2-2.232.el6.x86_64
kernel:(can reproduce with the below kernel)
2.6.32-220.el6.x86_64
2.6.32-220.4.1.el6.x86_64
2.6.32-220.4.2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.Use virt-v2v to convert a guest:
# LIBGUESTFS_TRACE=1 virt-v2v -ic xen+ssh://10.66.72.123 -os default xen-hvm-rhel6.2-x86_64 2>&1
root.72.123's password:
root.72.123's password:
rhel6u1-64b-hv.img: 100%
[=============================================================================]D
0h02m24s
libguestfs: trace: add_drive_opts "/var/lib/libvirt/images/rhel6u1-64b-hv.img"
"format:raw" "iface:ide" "name:hda"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: add_drive_opts "/tmp/URgX54ps5w" "readonly:true"
"format:raw" "iface:ide"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: launch


Actual results:
It just hangs after printing some messages.

Expected results:
It should convert successfully.
 
Additional info:
1.Virt-v2v works fine with previous version of qemu-kvm,eg: qemu-kvm-0.12.1.2-2.225.el6.x86_64 or older version

2.The full log of using LIBGUESTFS_DEBUG is attached.

Comment 3 Qixiang Wan 2012-02-23 06:27:30 UTC
It doesn't work with qemu-kvm since qemu-kvm-0.12.1.2-2.228.el6, but need to figure out what change in qemu-kvm caused this.

Comment 4 Qixiang Wan 2012-02-23 08:01:29 UTC
I checked with the commits in 228, and confirmed libguestfs can't work since this committed:

322be6f block: switch bdrv_read()/bdrv_write() to coroutines

and qemu-kvm upstream patch is:
http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg01575.html

Comment 5 Qixiang Wan 2012-02-24 06:00:08 UTC
Created attachment 565502 [details]
Reproducer for rhbz 796115

I think this is a qemu-kvm regression, so I'm moving it to qemu-kvm. Please feel free to move it back if you don't agree.

Reproducer:
1. (host)# nc -U -l /tmp/guestfs.sock
2. Start a x86_64 kvm guest with:
/usr/libexec/qemu-kvm -global virtio-blk-pci.scsi=off -drive file=/dev/null,if=virtio -nodefconfig -enable-kvm -nodefaults -nographic -m 500 -no-reboot -drive file=$image,if=virtio,cache=none,boot=on -serial stdio -device virtio-serial -chardev socket,path=/tmp/guestfs.sock,id=channel0 -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0
3. Copy the attached rhbz796115.c to guest, and compile it
(guest)# gcc rhbz796115.c -o rhbz796115
4. run rhbz796115 in guest.
(guest)# ./rhbz796115

Result:
It hangs at step 4 with qemu-kvm-0.12.1.2-2.228.el6, but doesn't hang with qemu-kvm-0.12.1.2-2.227.el6.

Comment 6 Richard W.M. Jones 2012-02-24 08:12:26 UTC
Thanks for all the work tracking this down and the reproducer.

I notice there's a newer qemu-kvm in brew: -2.233.el6.
Did you try that?

Comment 7 Qixiang Wan 2012-02-24 08:30:12 UTC
(In reply to comment #6)
> I notice there's a newer qemu-kvm in brew: -2.233.el6.
> Did you try that?

The defect exists with qemu-kvm-0.12.1.2-2.233.el6 too.

Comment 8 Richard W.M. Jones 2012-02-24 08:58:09 UTC
Amit thinks this could be a dup of
https://bugzilla.redhat.com/show_bug.cgi?id=791200

Comment 9 Amit Shah 2012-02-28 15:32:40 UTC
Can you check if qemu-kvm-0.12.1.2-2.234.el6 fixes this issue?  If it does, it can be marked as a dup of 791200.  Thanks.

Comment 10 Qixiang Wan 2012-02-29 02:16:30 UTC
libguestfs works well with qemu-kvm-0.12.1.2-2.234.el6, and it doesn't hang when run the reproducer in comment 5, so I'm closing this as a dup of bug 791200 per comment 9.

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