varbind management/construction problem

Jochen Katz katz____agentpp.com
Fri Sep 27 22:22:44 CEST 2002


Hi,

this could be a stack problem. Try to increase AGENTPP_DEFAULT_STACKSIZE 
in threads.h. Or did you solve the crash already?

Kind regards,
   Jochen

>>>> I checked the Vbx methods, and they all appear to delete the OID and 
>>>> value if the vb is reassigned, so this looked OK.  The problem 
>>>> occurs when the second event arrives.  Vb::set_oid gets called to 
>>>> set the new OID, and the crash happens at the delete for the old 
>>>> OID.  The crash looks like this:
>>>>
>>>> (gdb) where
>>>> #0  0x40410e46 in chunk_free (ar_ptr=0x404c4620, p=0x80d3998) at 
>>>> malloc.c:3242
>>>> #1  0x40410bf4 in __libc_free (mem=0x80d39a0) at malloc.c:3154
>>>> #2  0x4027a1f6 in __builtin_delete (ptr=0x80d39a0) from 
>>>> /usr/lib/libstdc++-libc6.2-2.so.3
>>>> #3  0x4027a21f in __builtin_vec_delete (ptr=0x80d39a0) from 
>>>> /usr/lib/libstdc++-libc6.2-2.so.3
>>>> #4  0x40369d60 in Oid::operator= (this=0x80d0bb8, oid=@0x4094b8cc) 

>>>> I tweaked it a few ways, but it always seems to crash in a delete 
>>>> operator.  The activateAlarm code only reads the PDU without 
>>>> changing it, so I dont suspect it.
>>>>
>>>> The biggest change I made was to move the new and delete for vbs 
>>>> inside the while loop.  In that case, the crash happens in the new 
>>>> operator when it's trying to set a new value into an existing Vbx:
>>>>
>>>> (gdb) where
>>>> #0  chunk_alloc (ar_ptr=0x404c4620, nb=32) at malloc.c:2983
>>>> #1  0x40410028 in __libc_malloc (bytes=24) at malloc.c:2811
>>>> #2  0x4027a00d in __builtin_new (sz=24) from 
>>>> /usr/lib/libstdc++-libc6.2-2.so.3
>>>> #3  0x4036f2a3 in Vb::set_value (this=0x80d3a4c, ptr=0x80c3940 
>>>> "descr") at vb.cpp:224

-- 
Public GPG Key: http://www.sa-ha.de




More information about the AGENTPP mailing list