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 1086761 - snmptrapd leaks memory when NetSNMP::TrapReceiver is used for trap handlers
Summary: snmptrapd leaks memory when NetSNMP::TrapReceiver is used for trap handlers
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: net-snmp
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 676955 678314
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-11 12:24 UTC by Dalibor Pospíšil
Modified: 2015-04-03 17:02 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 678314
Environment:
Last Closed: 2015-02-09 09:27:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Jan Safranek 2015-01-16 13:38:07 UTC
Dalibor, can you please share some valgrind output? The perl code is the same in RHEL 6 and 7 and  I do not see much different valgrind output.

Comment 4 Jan Safranek 2015-02-09 09:27:37 UTC
Copying valgrind output (with --num-callers=40, to see full stack):

==20356== 44 bytes in 1 blocks are definitely lost in loss record 789 of 1,156
==20356==    at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20356==    by 0x63AECD4: Perl_safesysmalloc (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63AF8C1: Perl_savepv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x636D472: Perl_gv_init_pvn (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x636EF81: Perl_gv_fetchpvn_flags (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x637F367: Perl_yylex (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x638C6AF: Perl_yyparse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x64070B9: ??? (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6412835: Perl_pp_require (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63CDA45: Perl_runops_standard (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365007: Perl_call_sv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365F7B: Perl_call_list (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x634D77F: ??? (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x635F757: Perl_newATTRSUB_flags (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x636002F: Perl_newATTRSUB (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6360498: Perl_utilize (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x638E5C5: Perl_yyparse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6369721: perl_parse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x55500C5: maybe_source_perl_startup (snmp_perl.c:73)
==20356==    by 0x5550304: do_something_perlish (snmp_perl.c:111)
==20356==    by 0x5E65305: run_config_handler (read_config.c:558)
==20356==    by 0x5E65ECC: read_config (read_config.c:977)
==20356==    by 0x5E66ECA: read_config_files_in_path (read_config.c:1322)
==20356==    by 0x5E672E7: read_config_files_of_type (read_config.c:1405)
==20356==    by 0x5E67372: read_config_files (read_config.c:1446)
==20356==    by 0x5E674C3: read_configs (read_config.c:1058)
==20356==    by 0x10B81A: main (snmptrapd.c:1148)
==20356== 
==20356== 96 bytes in 2 blocks are definitely lost in loss record 983 of 1,156
==20356==    at 0x4C2B974: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20356==    by 0x635182B: Perl_newSVOP (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x637EB05: Perl_yylex (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x638C6AF: Perl_yyparse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x64070B9: ??? (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6412835: Perl_pp_require (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63CDA45: Perl_runops_standard (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365007: Perl_call_sv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365F7B: Perl_call_list (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x634D77F: ??? (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x635F757: Perl_newATTRSUB_flags (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x636002F: Perl_newATTRSUB (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6360498: Perl_utilize (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x638E5C5: Perl_yyparse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6369721: perl_parse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x55500C5: maybe_source_perl_startup (snmp_perl.c:73)
==20356==    by 0x5550304: do_something_perlish (snmp_perl.c:111)
==20356==    by 0x5E65305: run_config_handler (read_config.c:558)
==20356==    by 0x5E65ECC: read_config (read_config.c:977)
==20356==    by 0x5E66ECA: read_config_files_in_path (read_config.c:1322)
==20356==    by 0x5E672E7: read_config_files_of_type (read_config.c:1405)
==20356==    by 0x5E67372: read_config_files (read_config.c:1446)
==20356==    by 0x5E674C3: read_configs (read_config.c:1058)
==20356==    by 0x10B81A: main (snmptrapd.c:1148)
==20356== 
==20356== 132 bytes in 3 blocks are definitely lost in loss record 993 of 1,156
==20356==    at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20356==    by 0x63AECD4: Perl_safesysmalloc (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63AF8C1: Perl_savepv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x635FED7: Perl_newATTRSUB_flags (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x636002F: Perl_newATTRSUB (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63E7ECC: Perl_sv_2cv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63F19BC: Perl_pp_rv2cv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63CDA45: Perl_runops_standard (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365007: Perl_call_sv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365F7B: Perl_call_list (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x634D77F: ??? (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x635F757: Perl_newATTRSUB_flags (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x636002F: Perl_newATTRSUB (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6360498: Perl_utilize (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x638E5C5: Perl_yyparse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x64070B9: ??? (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6412835: Perl_pp_require (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x63CDA45: Perl_runops_standard (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365007: Perl_call_sv (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6365F7B: Perl_call_list (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x634D77F: ??? (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x635F757: Perl_newATTRSUB_flags (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x636002F: Perl_newATTRSUB (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6360498: Perl_utilize (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x638E5C5: Perl_yyparse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x6369721: perl_parse (in /usr/lib64/perl5/CORE/libperl.so)
==20356==    by 0x55500C5: maybe_source_perl_startup (snmp_perl.c:73)
==20356==    by 0x5550304: do_something_perlish (snmp_perl.c:111)
==20356==    by 0x5E65305: run_config_handler (read_config.c:558)
==20356==    by 0x5E65ECC: read_config (read_config.c:977)
==20356==    by 0x5E66ECA: read_config_files_in_path (read_config.c:1322)
==20356==    by 0x5E672E7: read_config_files_of_type (read_config.c:1405)
==20356==    by 0x5E67372: read_config_files (read_config.c:1446)
==20356==    by 0x5E674C3: read_configs (read_config.c:1058)
==20356==    by 0x10B81A: main (snmptrapd.c:1148)

while these are real leaks, they are done during initialization. They won't grow when snmptrapd processes more traps.


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