Bug 770944 - memory leaks on libvirt_virNodeGetMemoryStats
Summary: memory leaks on libvirt_virNodeGetMemoryStats
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-30 11:49 UTC by Alex Jia
Modified: 2012-06-20 06:40 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.9.10-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:40:46 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Alex Jia 2011-12-30 11:49:30 UTC
Description of problem:
Memory leak on libvirt_virNodeGetMemoryStats API.

Version-Release number of selected component (if applicable):
libvirt-python-0.9.9-0rc1.el6.x86_64.rpm

How reproducible:
always

Steps to Reproduce:
1. Paste the following codes into test.py:

import libvirt
con = libvirt.open(None)
dom = con.lookupByName('foo')
con.getMemoryStats(0, 0)

2. valgrind -v --leak-check=full python test.py
  
Actual results:

==18633== 80 bytes in 2 blocks are definitely lost in loss record 1,281 of 2,083
==18633==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
==18633==    by 0x39E1A85EC3: PyObject_Malloc (obmalloc.c:935)
==18633==    by 0x39E1A77831: _PyLong_New (longobject.c:75)
==18633==    by 0x39E1A79E2E: PyLong_FromUnsignedLongLong (longobject.c:892)
==18633==    by 0xB8FC0C4: libvirt_virNodeGetMemoryStats (libvirt-override.c:2372)
==18633==    by 0x39E1ADE7F3: PyEval_EvalFrameEx (ceval.c:3794)
==18633==    by 0x39E1ADF99E: PyEval_EvalFrameEx (ceval.c:3880)
==18633==    by 0x39E1AE0466: PyEval_EvalCodeEx (ceval.c:3044)
==18633==    by 0x39E1AE0541: PyEval_EvalCode (ceval.c:545)
==18633==    by 0x39E1AFB88B: run_mod (pythonrun.c:1351)
==18633==    by 0x39E1AFB95F: PyRun_FileExFlags (pythonrun.c:1337)
==18633==    by 0x39E1AFCE4B: PyRun_SimpleFileExFlags (pythonrun.c:941)
==18633==
==18633== 89 bytes in 2 blocks are definitely lost in loss record 1,398 of 2,083
==18633==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
==18633==    by 0x39E1A85EC3: PyObject_Malloc (obmalloc.c:935)
==18633==    by 0x39E1A9053C: PyString_FromString (stringobject.c:138)
==18633==    by 0xB8FC0D3: libvirt_virNodeGetMemoryStats (libvirt-override.c:2372)
==18633==    by 0x39E1ADE7F3: PyEval_EvalFrameEx (ceval.c:3794)
==18633==    by 0x39E1ADF99E: PyEval_EvalFrameEx (ceval.c:3880)
==18633==    by 0x39E1AE0466: PyEval_EvalCodeEx (ceval.c:3044)
==18633==    by 0x39E1AE0541: PyEval_EvalCode (ceval.c:545)
==18633==    by 0x39E1AFB88B: run_mod (pythonrun.c:1351)
==18633==    by 0x39E1AFB95F: PyRun_FileExFlags (pythonrun.c:1337)
==18633==    by 0x39E1AFCE4B: PyRun_SimpleFileExFlags (pythonrun.c:941)
==18633==    by 0x39E1B094CE: Py_Main (main.c:577)

Expected results:
Fix memory leaks.

Additional info:

Comment 1 Alex Jia 2012-02-17 10:05:55 UTC
The Patch has been sent to upstream and wait for review:
https://www.redhat.com/archives/libvir-list/2012-February/msg00763.html

Comment 7 errata-xmlrpc 2012-06-20 06:40:46 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-2012-0748.html


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