Bug 796115 - write to virtio serial is blocked
Summary: write to virtio serial is blocked
Keywords:
Status: CLOSED DUPLICATE of bug 791200
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-22 10:52 UTC by tingting zheng
Modified: 2012-02-29 02:16 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-29 02:16:30 UTC
Target Upstream Version:


Attachments (Terms of Use)
LIBGUESTFS_DEBUG log file (43.78 KB, text/plain)
2012-02-22 10:52 UTC, tingting zheng
no flags Details
Reproducer for rhbz 796115 (1007 bytes, text/plain)
2012-02-24 06:00 UTC, Qixiang Wan
no flags Details

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


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