Bug 522887 - Call to migrate_set_speed after a migrate_cancel causes segmentation fault in kvm
Summary: Call to migrate_set_speed after a migrate_cancel causes segmentation fault in...
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.4
Hardware: All
OS: Linux
Target Milestone: rc
: 5.5
Assignee: Luiz Capitulino
QA Contact: Lawrence Lim
: 511376 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2009-09-11 23:20 UTC by Issue Tracker
Modified: 2018-10-27 11:13 UTC (History)
11 users (show)

Fixed In Version: kvm-83-119.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-03-30 07:55:20 UTC

Attachments (Terms of Use)
set_rate_limit.patch (494 bytes, patch)
2009-09-11 23:21 UTC, Joseph Kachuck
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0271 normal SHIPPED_LIVE Important: kvm security, bug fix and enhancement update 2010-03-29 13:19:48 UTC

Description Issue Tracker 2009-09-11 23:20:40 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Issue Tracker 2009-09-11 23:20:44 UTC
Event posted on 09-11-2009 04:53pm EDT by Glen Johnson

=Comment: #0=================================================
SUDHIR KUMAR <sudhirkumarmalik@in.ibm.com> -
---Problem Description---
migrate_set_speed after a migrate_cancel causes segmentation fault in kvm

Contact Information = Sudhir Kumar/sudhirkumarmalik@in.ibm.com

---uname output---
Linux bc1cn3 2.6.18-162.el5 #1 SMP Tue Aug 4 16:24:37 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Machine Type = HS22 blade

---Steps to Reproduce---
Start a source Vm:
Start the target vm:
On the source start migration:
migrate -d tcp:0:6000
cancel migration
(qemu) migrate_cancel
(qemu) migrate_set_speed 1g
Segmentation fault

---KVM Component Data---

[root@bc1cn3 images]# rpm -qa | grep kvm

*Additional Instructions for Sudhir Kumar/sudhirkumarmalik@in.ibm.com:
-Post a private note with access information to the machine that the bug is occuring on.

Complete description:
Source VM:

# /usr/libexec/qemu-kvm -hda rhel54-64.raw -m 8192 -smp 4 -net nic -net
tap,script=/root/qemu-ifup-breth2 -name 54_64 -vnc :10 -monitor stdio
(qemu) migrate -d tcp:0:6000
(qemu) migration_notify_done

(qemu) info migrate
Migration status: active
transferred ram: 3218296 kbytes
remaining ram: 5192900 kbytes
total ram: 8409100 kbytes
(qemu) migrate_cancel
(qemu) info migrate
Migration status: cancelled
(qemu) migrate_set_speed 1g
Segmentation fault

Here is the segfault shown in dmesg.
qemu-kvm[17043]: segfault at 0000000000000020 rip 0000000000472fa0 rsp 00007fffd54f95d8 error 4

The target VM was started as below.
# /usr/libexec/qemu-kvm -hda rhel54-64.raw -m 8192 -smp 4 -net nic -net
tap,script=/root/qemu-ifup-breth2 -name 54_64_2 -vnc :11 -monitor stdio -incoming tcp:0:6000

Here is the segfault shown in dmesg.
qemu-kvm[17043]: segfault at 0000000000000020 rip 0000000000472fa0 rsp 00007fffd54f95d8 error 4

Generated a core file and ran gdb on it. Here is the backtrace.
(gdb) bt
#0  0x0000000000472fa0 in fprintf ()
#1  0x000000000046c97f in fprintf ()
#2  0x00000000004105f3 in fprintf ()
#3  0x00000000004655e2 in fprintf ()
#4  0x000000000040eb1f in fprintf ()
#5  0x00000000004712e1 in fprintf ()
#6  0x0000000000409722 in fprintf ()
#7  0x00000000004ffd7a in fprintf ()
#8  0x000000000040dbcc in fprintf ()
#9  0x000000351261d994 in __libc_start_main () from /lib64/libc.so.6
#10 0x0000000000406be9 in fprintf ()
#11 0x00007fffabdbc808 in ?? ()
#12 0x0000000000000000 in ?? ()

I could not grab the corresponding sources hence did not try to look into the code.
The issue is not produced when migrate_set_speed is called without calling migrate_cancel prior to it.

Please let me know if further information is required.
=Comment: #3=================================================
Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> -

fix segfault in setting migration speed

This backport patch (based on kvm-83-105.el5.src.rpm from RHEL5.4 RC3) intends to fix the segfault
which occurs when setting a new rate limit after a finished (or canceled/failed) migration.

Original patch:
=Comment: #5=================================================
SUDHIR KUMAR <sudhirkumarmalik@in.ibm.com> -
Verified the fix and the fault is no more producible.

Hello Red Hat,

please consider the attached backport patch, based on kvm-83-105.el5.src.rpm, which fixed this issue.

Thanks for your support.
This event sent from IssueTracker by jkachuck  [IBM-LTC]
 issue 341626

Comment 2 Joseph Kachuck 2009-09-11 23:21:49 UTC
Created attachment 360744 [details]

Comment 3 Luiz Capitulino 2009-09-23 19:00:16 UTC
This is upstream commit 0bb05eaff04d30609a98c0dae80bb5dba3e4e799, not sure why it hasn't been submitted for inclusion.

Doing it now, as the patch fixes the problem for me.

Comment 7 lihuang 2009-09-25 11:09:14 UTC
Can reproduce in kvm-83-113.el5

Can not reproduce in kvm-83-119.el5

Comment 9 Golita Yue 2009-12-23 09:11:27 UTC
Could not reproduce in kvm-83-139.el5

Comment 11 Glauber Costa 2010-01-21 12:58:53 UTC
*** Bug 511376 has been marked as a duplicate of this bug. ***

Comment 13 errata-xmlrpc 2010-03-30 07:55:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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