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.
Created attachment 521807[details]
memory leak info
Description of problem:
Use "ctrl+c" to close libvirtMib_subagent will lead to memory leak
Version-Release number of selected component (if applicable):
libvirt-snmp-0.0.2-1.el6.x86_64
libvirt-snmp-debuginfo-0.0.2-1.el6.x86_64
libvirt-0.9.4-7.el6.x86_64
qemu-kvm-0.12.1.2-2.185.el6.x86_64
How reproducible:
everytimes
Steps to Reproduce:
1. install libvirt-snmp libvirt-snmp-debuginfo valgrind
# sudo yum install libvirt-snmp libvirt-snmp-debuginfo valgrind
2. prepare /etc/snmp/snmpd.conf as follows:
# cat /etc/snmp/snmpd.conf
rwcommunity public
master agentx
trapcommunity public
trap2sink localhost
3. append the following lines to /etc/snmp/snmptrapd.conf
# Example configuration file for snmptrapd
authCommunity log,execute,net public
logOption f /var/log/snmptraps.log
4. add the following lines to /etc/sysconfig/snmptrapd:
OPTIONS="-m ALL -p /var/run/snmptrapd.pid"
5. restart snmpd and snmptrapd service
# service snmpd restart
# service snmptrapd restart
6. run libvirt snmp agent daemon
LIBVIRT_DEFAULT_URI="qemu:///system" valgrind --leak-check=full libvirtMib_subagent -f -L >& tmp.log 2>&1
7. use "ctrl+c" twice to close libvirtMib_subagent
Actual results:
There is memory leak and the details can be seen in the "tmp.log" attachment.
Expected results:
There is no memory leak
Additional info:
Sometimes the libvirtd will die
Comment 2Martin Kletzander
2012-02-03 10:22:27 UTC
I confirm the bug, it's easy to reproduce but I haven't seen the libvirt daemon affected in any way.
Comment 4Martin Kletzander
2012-05-30 15:31:18 UTC
Two fixes have been needed to do this, one was fixed earlier in the library, the second one was pushed into the snmp code now:
commit 22c2f5fd91a63d817199b42e695a87dab28ad0c1
Author: Martin Kletzander <mkletzan>
Date: Wed May 30 14:30:02 2012 +0200
Stop event thread on server stop
Comment 6RHEL Program Management
2012-09-07 04:58:15 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
(In reply to Laura Novich from comment #12)
> While this bug fix probably only needs to be included in the RN, I am
> marking this as docs_scoped ? just to make sure it doesn't need to be
> considered for the Virt. Admin. Guide
> Ademar?
Documentation isn't necessary.
# cat /etc/snmp/snmpd.conf
rwcommunity public
master agentx
trapcommunity public
trap2sink localhost
# cat /etc/sysconfig/snmptrapd
OPTIONS="-m ALL -p /var/run/snmptrapd.pid"
# service snmpd restart
Stopping snmpd: [FAILED]
Starting snmpd: [ OK ]
# service snmptrapd restart
Stopping snmptrapd: [FAILED]
Starting snmptrapd: [ OK ]
# LIBVIRT_DEFAULT_URI="qemu:///system" valgrind --leak-check=full libvirtMib_subagent -f -L >& tmp.log 2>&1
# cat tmp.log
==18947== Memcheck, a memory error detector
==18947== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==18947== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==18947== Command: libvirtMib_subagent -f -L
==18947==
NET-SNMP version 5.5 AgentX subagent connected
==18947==
==18947== HEAP SUMMARY:
==18947== in use at exit: 143,700 bytes in 1,575 blocks
==18947== total heap usage: 32,788 allocs, 31,213 frees, 27,425,111 bytes allocated
==18947==
==18947== LEAK SUMMARY:
==18947== definitely lost: 0 bytes in 0 blocks
==18947== indirectly lost: 0 bytes in 0 blocks
==18947== possibly lost: 0 bytes in 0 blocks
==18947== still reachable: 143,700 bytes in 1,575 blocks
==18947== suppressed: 0 bytes in 0 blocks
==18947== Reachable blocks (those to which a pointer was found) are not shown.
==18947== To see them, rerun with: --leak-check=full --show-reachable=yes
==18947==
==18947== For counts of detected and suppressed errors, rerun with: -v
==18947== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 18 from 6)
No memory leak in valgrind report, so I change the status to VERIFIED.
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-2013-1666.html
Created attachment 521807 [details] memory leak info Description of problem: Use "ctrl+c" to close libvirtMib_subagent will lead to memory leak Version-Release number of selected component (if applicable): libvirt-snmp-0.0.2-1.el6.x86_64 libvirt-snmp-debuginfo-0.0.2-1.el6.x86_64 libvirt-0.9.4-7.el6.x86_64 qemu-kvm-0.12.1.2-2.185.el6.x86_64 How reproducible: everytimes Steps to Reproduce: 1. install libvirt-snmp libvirt-snmp-debuginfo valgrind # sudo yum install libvirt-snmp libvirt-snmp-debuginfo valgrind 2. prepare /etc/snmp/snmpd.conf as follows: # cat /etc/snmp/snmpd.conf rwcommunity public master agentx trapcommunity public trap2sink localhost 3. append the following lines to /etc/snmp/snmptrapd.conf # Example configuration file for snmptrapd authCommunity log,execute,net public logOption f /var/log/snmptraps.log 4. add the following lines to /etc/sysconfig/snmptrapd: OPTIONS="-m ALL -p /var/run/snmptrapd.pid" 5. restart snmpd and snmptrapd service # service snmpd restart # service snmptrapd restart 6. run libvirt snmp agent daemon LIBVIRT_DEFAULT_URI="qemu:///system" valgrind --leak-check=full libvirtMib_subagent -f -L >& tmp.log 2>&1 7. use "ctrl+c" twice to close libvirtMib_subagent Actual results: There is memory leak and the details can be seen in the "tmp.log" attachment. Expected results: There is no memory leak Additional info: Sometimes the libvirtd will die