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 852592 - libvirtd will be crashed when run vcpupin more than once
Summary: libvirtd will be crashed when run vcpupin more than once
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 02:53 UTC by hongming
Modified: 2013-02-21 07:22 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.10.1-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:22:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirt debug log (4.13 MB, text/plain)
2012-08-29 02:54 UTC, hongming
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description hongming 2012-08-29 02:53:41 UTC
Description of problem:
When pin vcpu using vcpupin command more than once . the libvirtd will be crashed. 

Version-Release number of selected component (if applicable):
libvirt-0.10.0-0rc1.el6.x86_64
qemu-kvm-0.12.1.2-2.295.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# virsh start rhel6.2
Domain rhel6.2 started


2.# virsh dumpxml rhel6.2 
......
  <vcpu placement='static'>5</vcpu>
......

3.# virsh nodeinfo
CPU model:           x86_64
CPU(s):              4
CPU frequency:       1600 MHz
CPU socket(s):       1
Core(s) per socket:  4
Thread(s) per core:  1
NUMA cell(s):        1
Memory size:         7946252 KiB
 

4. Run the vcpupin command more than once.
# virsh vcpupin rhel6.2 0 1-2

# virsh vcpupin rhel6.2 1 1-2

# virsh vcpupin rhel6.2 2 3

# virsh vcpupin rhel6.2 3 3
error: End of file while reading data: Input/output error
error: Failed to reconnect to the hypervisor

  
Actual results:
libvirtd is crashed

Expected results:
libvirtd works fine

Additional info:

Comment 1 hongming 2012-08-29 02:54:53 UTC
Created attachment 607726 [details]
libvirt debug log

Comment 3 Peter Krempa 2012-08-30 13:52:22 UTC
Patches sent upstream:
http://www.redhat.com/archives/libvir-list/2012-August/msg01912.html

Comment 4 Peter Krempa 2012-08-30 15:08:07 UTC
Fixed upstream with:

commit 077e7bf51f17c20bcf49aac1dff79247e13d5d6d
Author: Peter Krempa <pkrempa>
Date:   Thu Aug 30 15:38:37 2012 +0200

    vcpupin: Fix returning of arrays from virDomainVcpuPinAdd
    
    virDomainVcpuPinAdd does a realloc on vcpupin_list if the new vcpu pin
    definition doesn't fit into the array. The list is an array of pointers
    but the function definition didn't support returning the changed pointer
    to the caller if it was realloced. This caused segfaults if realloc
    would change the base pointer.

In my scenario, the fourth CPU that was pinned (fourth as in fourth virsh command, you may plug them in any order) caused a reallocation that invalidated the pointer. Up to 3 cpus it worked.

Moving to POST.

Comment 6 yanbing du 2012-09-03 07:11:36 UTC
Verify with libvirt-0.10.1-1.el6.x86_64.
Following the bug reproduce steps, do several times vcpupin, and libvirtd still running.

Comment 7 errata-xmlrpc 2013-02-21 07:22:27 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/RHSA-2013-0276.html


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