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 1171938 - memory corruption when migrate_to_uri
Summary: memory corruption when migrate_to_uri
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl-Sys-Virt
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 7.1
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-09 03:25 UTC by Hao Liu
Modified: 2015-03-05 10:54 UTC (History)
4 users (show)

Fixed In Version: perl-Sys-Virt-1.2.8-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:54:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0470 0 normal SHIPPED_LIVE perl-Sys-Virt bug fix and enhancement update 2015-03-05 15:18:19 UTC

Description Hao Liu 2014-12-09 03:25:48 UTC
Description of problem:
memory corruption when migrate_to_uri

Version-Release number of selected component (if applicable):
perl-Sys-Virt-1.2.8-4.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Prepare test perl script test.pl:
# -*- perl -*-
use strict;
use warnings;
use Sys::Virt;

my ($domname, $dsturi)= @ARGV;
my $c = Sys::Virt->new();
my $dom = $c->get_domain_by_name($domname);

$dom->migrate_to_uri($dsturi,  2);

2. Prepare VM test-vm to be migrated.

3. Run the script:
# perl test.pl test-vm qemu://xxx/xxx
*** Error in `perl': malloc(): memory corruption: 0x0000000002494e50 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7ebcc)[0x7f77cd285bcc]
/lib64/libc.so.6(__libc_calloc+0xaa)[0x7f77cd287bba]
/lib64/libvirt.so.0(virAllocN+0x1d)[0x7f77c62d74dd]
/lib64/libvirt.so.0(virNetClientProgramCall+0x123)[0x7f77c64247e3]
/lib64/libvirt.so.0(+0x1823d2)[0x7f77c63fc3d2]
/lib64/libvirt.so.0(+0x18cc37)[0x7f77c6406c37]
/lib64/libvirt.so.0(virDomainMigrateToURI3+0x3d0)[0x7f77c63c1120]
/usr/local/lib64/perl5/auto/Sys/Virt/Virt.so(+0x47399)[0x7f77c6840399]
/usr/lib64/perl5/CORE/libperl.so(Perl_pp_entersub+0x58f)[0x7f77ce6132df]
/usr/lib64/perl5/CORE/libperl.so(Perl_runops_standard+0x16)[0x7f77ce60ba56]
/usr/lib64/perl5/CORE/libperl.so(perl_run+0x355)[0x7f77ce5a8825]
perl[0x400d99]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f77cd228af5]
perl[0x400dd1]

Expected results:
No memory corruption

Comment 2 Hao Liu 2014-12-09 05:18:59 UTC
This is caused by a missing update of params count.

Patch has been post on upstream.
https://www.redhat.com/archives/libvir-list/2014-December/msg00484.html

Comment 5 zhe peng 2014-12-24 03:16:35 UTC
can reproduced with build perl-Sys-Virt-1.2.8-4.el7.x86_64

verify with build:
perl-Sys-Virt-1.2.8-6.el7.x86_64

step:
 1. create env.
 2. perl test.pl rhel7 qemu+ssh://target_ip/system

no error occured. check migration, all worked well, move to verified.

Comment 7 errata-xmlrpc 2015-03-05 10:54:21 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.

https://rhn.redhat.com/errata/RHBA-2015-0470.html


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