[AGENT++] memory limitation (crashes)

Jacquemin, Jean-Philippe jean-philippe.jacquemin at barco.com
Wed Jan 9 16:12:37 CET 2008


Hi All!
 
I use a SnmpAgent built from SNMP++(v3.2.13) and AGENT++ (v3.5.19) on an
embedded 386 running Linux 2.4 with the parrel job option turned on (3
threads are used to process the request) and I experience crashes
between once a day till once a week.
The core dumps all how that the crash comes from a _pure_virtual coming
from the function val.clone() in  vb.set_value(*value).
 
After invesitgation the most propable cause of that pure_virtual is that
the object had already been deleted (answered on this mailing list
already).
However Valgind doesn't show any memory leak or memory corruption, so we
are thinking of a stack-overflow !
 
Here is the memory load on the system when all is running: 
[coming from /proc/meminfo ]
MemTotal:        14732 kB
MemFree:          3956 kB
MemShared:           0 kB
Buffers:           592 kB
Cached:           4968 kB
SwapCached:          0 kB
Active:           4056 kB
Inactive:         3876 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        14732 kB
LowFree:          3956 kB
SwapTotal:           0 kB
SwapFree:            0 kB
 
And the SNMPagent specific:
[coming from /proc/##/status ]
Name: snmpagent
State: S (sleeping)
Tgid: 27585
Pid: 27585
PPid: 27584
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 32
Groups: 0 
VmSize:     5712 kB
VmLck:        0 kB
VmRSS:     2276 kB
VmData:     2460 kB
VmStk:      196 kB
VmExe:     1028 kB
VmLib:     1328 kB
SigPnd: 0000000000000000
SigBlk: 0000000080000000
SigIgn: 8000000000000006
SigCgt: 00000003800044a8
CapInh: 0000000000000000
CapPrm: 00000000fffffeff
CapEff: 00000000fffffeff
 
The questions are:
(1) Could it really be a stack overflow ?? Has someone ever experienced
it? How to get further information ?
(2) How to reduce the amount of memory used ?
(3) Would it be useful to try and adjust the parameter MAX_SNMP_PACKET
(currently at 4096) ?
(4) Why is MAX_SNMP_PACKET defined as 2048 in SNMP++ redefined as 4096
in AGENT++ ?
(5) Are there other parameters that may influence the memory footprint ?
 
The thread configuration is like this:
* 1 main thread
* 1 thread to read data from H/W and store it in local database
* 1 thread to fill-in Mib data with converted/formatted local database
data (local database protected by mutexes)
* 1 thread to check and send notifications/traps
* 4 threads to process requests (from AGENT++ thread pool)
 
Thanks in advance for the answers !!
 
 
Best regards,
 
Jean-Philippe Jacquemin


DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.



More information about the AGENTPP mailing list