OK. The problem seems that netsnmp_create_subtree_cache() malloc memory
for SNMP_MSG_GETBULK (in agent/snmp_agent.c) for each session. If there
are multiple sessions in process, the memory will be a huge amount.
There is no limit.
 
I have checked version 5.3.1 code and found that this part of code is
the same as 5.0.9. So, I suspect in the 5.3.1, it will have the same
problem for SNMP_MSG_GETBULK.

Does anybody have a solution for it?
 

-----Original Message-----
From: Fong Tsui 
Sent: Sunday, July 16, 2006 1:57 PM
To: Fong Tsui; '[email protected]'
Subject: RE: snmpd memory leak on snmpbulkget

More detail on test:
If I send snmpbulkget for querying 60 OIDs ONCE: memory to 8000+K;
If I send snmpbulkget for querying 60 OIDs TWICE continuously, memory
grows to 10M+.
If I send snmpbulkget for querying 60 OIDs THRESS times continuously,
memory grows to 12M+.
....
....

Hope somebody can point me a direction. 

Thanks.

-----Original Message-----
From: Fong Tsui 
Sent: Sunday, July 16, 2006 1:43 PM
To: Fong Tsui; [email protected]
Subject: RE: snmpd memory leak on snmpbulkget

I did more test and found out that it is not leak. It is a problem when
doing stress test, continuously calling snmpbulkget on random OIDs,
snmpd memory keeps growing, no-limit, and eventually freezes the system.
(It also causes sub-agent memory grows). However, once I stop sending
query bulk command, snmpd slowly gets back to its normal memory.
 
For example, in one case, if I send snmpbulkget for querying 60 OIDs,
the memory grows to 10M+. The memory will get back to normal once the
query request is processed.

It seems cache for bulkget data has no limits?
Is that a known issue?  Where should I look into in the code?


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Fong
Tsui
Sent: Friday, July 14, 2006 6:56 PM
To: [email protected]
Subject: snmpd memory leak on snmpbulkget

Hi, 

I am hitting a case that when doing snmpbulkget in a loop for stress
testing, snmpd increases memory dramatically. For the same situation,
snmpwalk/snmpget/snmpbulkwalk all work fine. Only snmpbulkget leaks
memory.

Does anybody have the same experience? Any fix patch for it? or can
anybody point out where I should look into in the code?

I am running 5.0.9 version and at this moment, it's hard for us to
upgrade to newer version. So, I hope to I can find a way to fix it. Any
information is appreciated.


Thanks,

FT 




------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to