I've been working on writing some embedded perl handlers in net-snmp
5.2.1 and I couldn't help but notice the thread about snmptrapd
embedded perl handlers eating up loads of memory.

I encountered the same problem when registering perl handlers with the
NetSNMP::TrapReceiver module.  Interestingly enough the code leaks
even when I create and register a handler with nothing to do. ie. sub
receiver {};

A core dump of the snmptrapd process (running with the receiver
handler above) after leaking for a while shows at least one copy of
every single trap that was received.  I don't know enough about
net-snmp, perl garbage collection or embedded perl to debug further.

Additionally, the same snmptrapd binary doesn't leak when there are no
perl handlers registered.

I really don't want to use the traphandler to create, compile then run
my perl trap handler on each trap reception as its so much quicker
when embedded.  Its so much faster I could almost live with the leak
by automatically restarting snmptrapd when required.  Almost.

I'm with Robert - Are there any embedded perl gurus that can help with
this one? Is the author of the NetSNMP:TrapReceiver and NetSNMP::OID
code on this list?

Regards,
A net-snmp fan...

(Real name/email on request)

---
 On Mon, 4 Apr 2005 11:07:27 +0100 Andy wrote:
 AF> Thanks Robert for the patch, but I couldn"t get it to work.
 
 Hmm... I didn"t actually try using any perl, as there was a leak for all traps,
 which I fixed. Can you verify no leaks if you don"t use perl handlers?
 
 If there is a leak specific to perl, the one of the perl gurus will have to
 help..


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to