Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 706966

Summary: python bindings free invalid pointers
Product: Red Hat Enterprise Linux 6 Reporter: Michal Privoznik <mprivozn>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: dallan, gren, mzhan, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.9.2-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 11:09:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Privoznik 2011-05-23 15:50:56 UTC
Description of problem:
python bindings free some poninters which are marked by appropiate python documentation as 'must not free', because they point to some internal python/c-api layer structs.

Version-Release number of selected component (if applicable):
libvirt-0.9.1-1.el6

How reproducible:
100% (via vdsClient)

Steps to Reproduce:
1. vdsClient -s 0 getVdsCaps
2. observe glibc error message
3.
  
Actual results:
client crashes

Expected results:
client prints useful information about capabilities

Additional info:

Comment 2 Michal Privoznik 2011-05-24 07:27:28 UTC
Solution send to review:

https://www.redhat.com/archives/libvir-list/2011-May/msg01416.html

Comment 3 Michal Privoznik 2011-05-24 08:45:01 UTC
Moving to POST:

commit ef54d045c34caab7f17b2f6b46fc978d9baf81e2
Author: Michal Privoznik <mprivozn>
Date:   Mon May 23 14:41:00 2011 +0200

    python: Don't free must-not-free variables
    
    py_str() function call PyString_AsString(). As written in documentation,
    the caller must not free the returned value, because it points to some
    internal structures.


v0.9.1-229-gef54d04

Comment 5 Daniel Veillard 2011-06-23 03:20:24 UTC
This should be fixed by the libvirt-0.9.2-1.el6 rebase

Comment 6 Gunannan Ren 2011-06-28 08:44:54 UTC
The bug has been verified on libvirt-0.9.2-1.el6 
vdsClient -s 0 getVdsCaps outputs as follows

        HBAInventory = {'iSCSI': [{'InitiatorName': 'iqn.1994-05.com.redhat:465962c66f36'}], 'FC': []}
        ISCSIInitiatorName = iqn.1994-05.com.redhat:465962c66f36
        bondings = {'bond4': {'hwaddr': '00:00:00:00:00:00', 'cfg': {}, 'netmask': '', 'addr': '', 'slaves': []}, 'bond0': {'hwaddr': '00:00:00:00:00:00', 'cfg': {}, 'netmask': '', 'addr': '', 'slaves': []}, 'bond1': {'hwaddr': '00:00:00:00:00:00', 'cfg': {}, 'netmask': '', 'addr': '', 'slaves': []}, 'bond2': {'hwaddr': '00:00:00:00:00:00', 'cfg': {}, 'netmask': '', 'addr': '', 'slaves': []}, 'bond3': {'hwaddr': '00:00:00:00:00:00', 'cfg': {}, 'netmask': '', 'addr': '', 'slaves': []}}
        clusterLevels = ['2.3', '3.0']
        cpuCores = 2
        cpuFlags = fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,lm,constant_tsc,arch_perfmon,pebs,bts,rep_good,aperfmperf,pni,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,xsave,lahf_lm,tpr_shadow,vnmi,flexpriority,model_486,model_pentium,model_pentium2,model_pentium3,model_pentiumpro,model_qemu32,model_coreduo,model_core2duo,model_n270,model_Conroe,model_Penryn,model_Opteron_G1
        cpuModel = Intel(R) Core(TM)2 Duo CPU     E8500  @ 3.16GHz
        cpuSockets = 1
        cpuSpeed = 3158.954
        emulatedMachines = ['rhel6.1.0', 'pc', 'rhel6.0.0', 'rhel5.5.0', 'rhel5.4.4', 'rhel5.4.0']
        guestOverhead = 65
        hooks = {}
        kvmEnabled = true
        lastClient = 10.66.4.224
        lastClientIface = eth0
        management_ip = 
        memSize = 3668
        networks = {'virbr0': {'cfg': {}, 'netmask': '255.255.255.0', 'stp': 'on', 'ports': ['virbr0-nic', 'vnet0'], 'addr': '192.168.122.1'}}
        nics = {'eth0': {'hwaddr': '00:23:AE:77:07:BE', 'netmask': '255.255.252.0', 'speed': 1000, 'addr': '10.66.4.224'}}
        operatingSystem = {'release': '6.1.0.2.el6', 'version': '6Server', 'name': 'RHEL'}
        packages2 = {'kernel': {'release': '131.0.15.el6.x86_64', 'buildtime': '0', 'version': '2.6.32'}, 'spice-server': {'release': '1.el6', 'buildtime': '1299536258', 'version': '0.8.0'}, 'vdsm': {'release': '77.el6', 'buildtime': '1309164535', 'version': '4.9'}, 'qemu-kvm': {'release': '2.165.el6', 'buildtime': '1308076995', 'version': '0.12.1.2'}, 'libvirt': {'release': '1.el6', 'buildtime': '1308575600', 'version': '0.9.2'}, 'qemu-img': {'release': '2.165.el6', 'buildtime': '1308076995', 'version': '0.12.1.2'}}
        reservedMem = 256
        software_revision = 77
        software_version = 4.9
        supportedProtocols = ['2.2', '2.3']
        supportedRHEVMs = ['2.3', '3.0']
        uuid = 44454C4C-5000-1039-8051-B9C04F4C3258_00:23:AE:77:07:BE
        version_name = Snow Man
        vlans = {}
        vmTypes = ['kvm']

Comment 8 Rita Wu 2011-07-06 10:57:19 UTC
Set it as VERIFIED per comment 6

Comment 9 errata-xmlrpc 2011-12-06 11:09:37 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-2011-1513.html