Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Memory leak in Perl subagent?

1 view
Skip to first unread message

Jon Walton

unread,
Jan 6, 2004, 1:46:32 PM1/6/04
to
Hello,

I have written a subagent in Perl. I am quite happy with the results,
although there seems to be a memory leak related to setOID() and/or
setValue().

Furthermore, when I run the example script provided at:

http://www.net-snmp.org/tutorial-5/toolkit/perl/perl_module.pl

I notice the same behavior. The footprint of the perl subagent
continues to grow with every GET and/or GETNEXT, until it eats up all
system memory. If the subagent is left to run without being queried,
it does not grow in size.

Does anyone know what might be causing this and how it can be resolved?
I am running Net SNMP 5.1/ Perl v5.6.1/ Linux 2.4.23

Regards and Thank you to the developers for adding this Perl support.

Jon


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Wes Hardaker

unread,
Jan 10, 2004, 12:18:47 AM1/10/04
to
>>>>> On Tue, 6 Jan 2004 10:42:12 -0800 (PST), Jon Walton <jo...@dabobbay.com> said:

Jon> I have written a subagent in Perl. I am quite happy with the
Jon> results

I'm quite happy that! I haven't gotten a whole lot of feedback about
it.

Jon> although there seems to be a memory leak related to setOID()
Jon> and/or setValue().

There certainly could be some memory leaks. I sure wish that
debugging the Perl/C interface mechanisms was easier than it is. The
one thing you might try to do: rather than run it as a sub agent
run it directly as an embedded module within the agent instead. Then,
run the agent using valgrind to help you debug where the memory leak
might be.

--
Wes Hardaker
Sparta


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html

0 new messages