On Thu, 28 Oct 2010 20:43:21 +0200 Claus wrote:
CK> I am working with net-snmp as master agent and a subagent which  
CK> register a private MIB with a table.
CK> 
CK> First  I create a row with set the RowStatus = createAndGo, set  the  
CK> row object (in my example a DisplayString).
CK> Than I destroy this row again.
CK> 
CK> While de-register the row, while working on the snmpset  
CK> request ...RowStatus = destroy
CK> the master agent crashes!
CK> 
CK> This happens every time when I do set sequence, with net-snmp V5.4.3,  
CK> V5.5, and V5.6!
CK> 
CK> I need some advice what I can do to locate the problem?

This looks like memory corruption:

CK> Program received signal SIGSEGV, Segmentation fault.
CK> netsnmp_call_handlers (reginfo=0x5, reqinfo=0x7bb470,  
CK> requests=0x7bb480) at agent_handler.c:477

CK> (gdb) print * asp->treecache[i].subtree
CK> $5 = {name_a = 0x7bb0f8, namelen = 248 '▒', start_a = 0x0, start_len  
CK> = 0 '\0', end_a = 0x7bc0c0,
CK>    end_len = 2 '\002', variables = 0x1, variables_len = 3,  
CK> variables_width = 6,
CK>    label_a = 0x1 <Address 0x1 out of bounds>, session = 0x4, flags = 1  
CK> '\001', priority = 0 '\0',
CK>    timeout = 59999, next = 0x21, prev = 0x1, children = 0x2,  
CK> range_subid = 1, range_ubound = 2, reginfo = 0x5,
CK>    cacheid = 1, global_cacheid = 3, oid_off = 1}

You've got pointers with values like 0x5 and 0x1, which leads me to believe
that you're overwriting memory somewhere...  On Linux, I'd suggest valgrind to
help detect this. I'm not sure what you'de use on windows.

------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to