Build Warning on Solaris with the Forte C++ 6 Update 2

Dave Mason dmason____transat-tech.com
Wed Oct 9 23:37:15 CEST 2002


Hi,
This looks very similar to the crash I described in my "varbind 
management/construction problem" thread.  (I'm running Red Hat Linux 
v7.2 and Agent++ v3.5.3a, so results may vary as usual.)  I started a 
new thread to process alarms, and it crashed frequently when trying to 
construct an array of varbinds.  The stack trace went back to line 472 
of threads.cpp, which comes immediately after line 469 from your trace. 
 The problem turned out to be a stack size that's too small.  In 
threads.h, you'll see that AGENTPP_DEFAULT_STACKSIZE is set to 10000.  I 
increased this to 100000 and the problem was significantly reduced.  I 
find the crash still happens, though very infrequently, so I'm thinking 
of raising it again.  Nobody had a good method to size it correctly, but 
trial and error will probably work.

Good luck,
Dave

Nick Woods wrote:

>I have enclosed the following backtraces caused by a SIGSEGV (signal 11) that I seem to get on a pretty regular basis when starting up my process which uses agent++.  It does not happen every time but maybe one out of every 5 times.  When the machine has less processes running the problem seems to occur less frequently.  Has anyone seen a crash similar to this or know what I might doing wrong.  I have not yet gone through the agent++ code to examine the lines mentioned but will do that next.  I can also try to enclose the code I am using to set up the agent if that will help.  One more point that may be of interest is that I had been using the libraries without any problem for the last year or so with versions <= agent++v3.5h and snmp++v3.1.4a.  It seems like the problems began with more recent upgrades for me and I have not made any significant changes to the way I call those libraries for a long time.
>
>>From gdb:
>
>#4  0x4084cb53 in pthread_sighandler_rt (signo=11, si=0x411c2690, uc=0x411c2710) at signals.c:121
>#5  <signal handler called>
>#6  chunk_free (ar_ptr=0x40b6b300, p=0x80913c8) at malloc.c:3180
>#7  0x40ab73f4 in __libc_free (mem=0x80913d0) at malloc.c:3154
>#8  0x409f7346 in __builtin_delete (ptr=0x80913d0) at ../../gcc/cp/new2.cc:-1
>#9  0x409f736f in __builtin_vec_delete (ptr=0x80913d0) at ../../gcc/cp/new2.cc:-1
>#10 0x408d0186 in Agentpp::LogEntryImpl::~LogEntryImpl (this=0x80913c0, __in_chrg=3) at log.cpp:246
>#11 0x4092dd84 in Agentpp::DefaultLog::delete_log_entry () at ../include/log.h:558
>#12 0x408d161d in Agentpp::thread_starter (t=0x8091388) at threads.cpp:469
>#13 0x40849c6f in pthread_start_thread (arg=0x411c2be0) at manager.c:284
>
>>From gcc backtrace_symbols call from within program:
>
>/lib/i686/libpthread.so.0[0x4084cb53]
>/lib/i686/libc.so.6[0x40a64950]
>/lib/i686/libc.so.6(__libc_free+0xb4)[0x40ab73f4]
>/usr/lib/libstdc++-libc6.2-2.so.3(__builtin_delete+0x22)[0x409f7346]
>/usr/lib/libstdc++-libc6.2-2.so.3(__builtin_vec_delete+0x1b)[0x409f736f]
>/toolroot/lib/libagent++.so(Agentpp::LogEntryImpl::~LogEntryImpl(void)+0x36)[0x408d0186]
>/toolroot/lib/libagent++.so(Agentpp::DefaultLog::delete_log_entry(void)+0x48)[0x4092dd84]
>/toolroot/lib/libagent++.so(Agentpp::thread_starter(void *)+0x109)[0x408d161d]
>/lib/i686/libpthread.so.0[0x40849c6f]
>/lib/i686/libc.so.6(__clone+0x3a)[0x40b23b2a]
>
>Thanks,
>
>Nick
>
>





More information about the AGENTPP mailing list