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 878700 - Segmentation fault when do live migration with remote-viewer + usb-redir (seamless-migration=on)
Summary: Segmentation fault when do live migration with remote-viewer + usb-redir (sea...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-server
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Yonit Halperin
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 881827
TreeView+ depends on / blocked
 
Reported: 2012-11-21 02:12 UTC by Sibiao Luo
Modified: 2013-07-03 12:14 UTC (History)
25 users (show)

Fixed In Version: spice-server-0.12.0-5.el6
Doc Type: Bug Fix
Doc Text:
No documentation is needed. This bug is related to a new feature: spice seamless migration. It was found and fixed during RHEL-6.4 development phase.
Clone Of:
Environment:
Last Closed: 2013-02-21 10:03:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0529 0 normal SHIPPED_LIVE spice-server bug fix and enhancement update 2013-02-20 21:51:04 UTC

Description Sibiao Luo 2012-11-21 02:12:59 UTC
Description of problem:
this bug was fond from bug 868766.
boot a guest with usb-redir (seamless-migration=on) and do dd to the usb disk in loop, then do live migration with 'remote-viewer spice://$host_ip:$port' to connect guest desktop, it will segmentation fault in destination qemu after the source qemu finish migration.

Version-Release number of selected component (if applicable):
host info:
kernel-2.6.32-342.el6.x86_64
qemu-kvm-0.12.1.2-2.334.el6.x86_64
virt-viewer-0.5.2-16.el6.x86_64
spice-gtk-0.14-5.el6.x86_64
guest info:
kernel-2.6.32-342.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with usb-redir and seamless-migration=on in src and '-incoming tcp:0:5888' in dst, the debug=4.
2.Connect guest desktop with remote-viewer tools (provided by virt-viewer)
3.plug a USB disk to USB host, and click on menubar -> 'File' -> 'USB Device selection'.
4.mkfs.ext4 the the usb-disk and mount it to /mnt.
5.do I/O to the mount target.
# cat script.sh 
while true
do
  dd if=/dev/zero of=/mnt/sluo bs=1M count=100
  rm -f /mnt/sluo
done
6.do live migrate
(qemu) __com.redhat_spice_migrate_info $dst_host_ip $dst_host_port
(qemu) migrate -d tcp:$dst_host_ip:$port

Actual results:
after the step 6, it the destination qemu segmentation fault after the source qemu finish migration.
(qemu) info status 
VM status: paused (incoming-migration)
(qemu) 
main_channel_link: add main channel client
red_dispatcher_set_cursor_peer: 
inputs_connect: inputs channel client create
qemu-kvm: usb-redir: chardev open

qemu-kvm: usb-redir: removing 0 packet-ids from cancelled queue

qemu-kvm: usb-redir: removing 0 packet-ids from already-in-flight queue

qemu-kvm: usb-redir: creating usbredirparser


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffecb9fc700 (LWP 8487)]
0x00007ffff5f64b52 in display_channel_client_restore_surface (dcc=0x7fffec618010, surface_id=4158075104) at red_worker.c:9754
9754	        spice_assert(!dcc->surface_client_created[surface_id]);

(gdb) bt
#0  0x00007ffff5f64b52 in display_channel_client_restore_surface (dcc=0x7fffec618010, surface_id=4158075104) at red_worker.c:9754
#1  0x00007ffff5f672df in display_channel_client_restore_surfaces_lossy (rcc=0x7fffec618010, size=<value optimized out>, message=<value optimized out>) at red_worker.c:9782
#2  display_channel_handle_migrate_data (rcc=0x7fffec618010, size=<value optimized out>, message=<value optimized out>) at red_worker.c:9866
#3  0x00007ffff5f5a8df in red_channel_handle_migrate_data (rcc=0x7fffec618010, size=1040, type=<value optimized out>, message=0x7ffec421d208) at red_channel.c:1157
#4  red_channel_client_handle_message (rcc=0x7fffec618010, size=1040, type=<value optimized out>, message=0x7ffec421d208) at red_channel.c:1189
#5  0x00007ffff5f5a1eb in red_peer_handle_incoming (rcc=0x7fffec618010) at red_channel.c:272
#6  red_channel_client_receive (rcc=0x7fffec618010) at red_channel.c:294
#7  0x00007ffff5f5aa7c in red_channel_client_event (fd=<value optimized out>, event=<value optimized out>, data=0x7fffec618010) at red_channel.c:1204
#8  0x00007ffff5f7f86e in red_worker_main (arg=<value optimized out>) at red_worker.c:11782
#9  0x00007ffff773c851 in start_thread () from /lib64/libpthread.so.0
#10 0x00007ffff57fc90d in clone () from /lib64/libc.so.6
(gdb) q

Expected results:
it should have no any core dump, it can migration correctly.

Additional info:
my qemu-kvm commands line,
# /usr/libexec/qemu-kvm -M rhel6.4.0 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -name sluo_migration -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -drive file=/dev/vg-90.100-sluo/lv-90-100-RHEL6.4-20121019.0-Copy-x86_64,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D:B1,bus=pci.0,addr=0x4 -spice port=5931,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.vram_size=67108864 -readconfig /mnt/ich9-ehci-uhci.cfg -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=4 -boot menu=on -monitor stdio

Comment 2 Yonit Halperin 2012-11-26 17:09:00 UTC
The backtrace suggests a memory corruption (surface_id=4158075104). I have fixed upstream a memory corruption that occurred in the display channel due to display channel migration data that is larger than 1024 bytes. Such a scenario is more likely to happen on a low bandwidth connection + several off screen surfaces existing.
It is not directly related to usb.

Comment 7 errata-xmlrpc 2013-02-21 10:03:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0529.html


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