On Mar 21, 2006, at 2:06 PM, Wyles Eric - ewyles wrote:
Now for the actual problem. Once in a while, our application crashes with a segmentation fault. The stack trace looks like this:

Received signal 11 (Segmentation fault) from process [4]

Stack Trace:

0 : <application_name> (_ZN14clsApplication18FatalSignalHandlerEiP7siginfoPv+0x27e) [0x80fc050]

   1 : /lib/tls/libpthread.so.0 [0xf93e50]

2 : /usr/local/hive/i386/ags/lib/liblog4cxx.so (_ZN7log4cxx9Hierarchy9getLoggerERKSsRKNS_7helpers10ObjectPtrTINS_3spi 13LoggerFactoryEEE+0x251) [0x608a09]

3 : /usr/local/hive/i386/ags/lib/liblog4cxx.so (_ZN7log4cxx9Hierarchy9getLoggerERKSs+0x39) [0x6087ab]

4 : /usr/local/hive/i386/ags/lib/liblog4cxx.so (_ZN7log4cxx10LogManager9getLoggerERKSs+0x3c) [0x57528a]

5 : /usr/local/hive/i386/ags/lib/liblog4cxx.so (_ZN7log4cxx6Logger9getLoggerEPKc+0x53) [0x6063b9]

   6-14 : <various classes specific to our application>

   15 : /lib/tls/libpthread.so.0 [0xf8ddec]

   16 : /lib/tls/libc.so.6(__clone+0x5a) [0xb9da2a]


....
Does anyone have any ideas or suggestions? I have a gcc disassembly of our _ZN7log4cxx9Hierarchy9getLoggerERKSsRKNS_7helpers10ObjectPtrTINS_3spi1 3LoggerFactoryEEE method if that would be useful to anyone.



Interesting stack trace. I would expect that pthread would be eventually be called from the synchronize(mutex) line or the corresponding destructor, but I would have expected to see synchronized::synchronized() and apr_thread_mutex_lock or synchronized::~synchronized() and apr_thread_mutex_unlock calls to appear in the stack trace.

Since it occurs after start-up, it must be the getLogger() call in the method body since they are called the first time through the method, not the class level loggers.

Segmentation faults have been observed when APR calls precede the call to apr_initialize in the APRInitalizator constructor or after apr_terminate in the corresponding destructor, however I would not think that would be the case here since it appears in the middle of the apps lifetime.

Is there anything unusual about seeing /lib/tls/pthread? Are you doing anything funky with thread local storage?

Reply via email to