Let me retract that message above ---- the patch and with the option, did not
fix it.  

First time running the application, it did this:
terminate called after throwing an instance of
'log4cxx::helpers::MutexException'
  what():  Mutex exception: stat = 22
Aborted

Then rerunning it again with the same application, it did this:
 terminate called after throwing an instance of
'log4cxx::helpers::MutexException'
  what():  Mutex exception: stat = 1
Aborted

And then other times it just Segmentation fault

It looks like it's happening when the application exits.  I run the same
application using a different logger, I don't have this crash or exceptions. 
The only thing I could gather from the stack is:
Program received signal SIGSEGV, Segmentation fault.
allocator_alloc (newpool=0x7fffffffe0e0, parent=0x617c68, abort_fn=0,
allocator=0x613b50) at memory/unix/apr_pools.c:252
252                 if ((*ref = node->next) == NULL && i >= max_index) {
(gdb) where
#0  allocator_alloc (newpool=0x7fffffffe0e0, parent=0x617c68, abort_fn=0,
allocator=0x613b50) at memory/unix/apr_pools.c:252
#1  apr_pool_create_ex (newpool=0x7fffffffe0e0, parent=0x617c68, abort_fn=0,
allocator=0x613b50) at memory/unix/apr_pools.c:856
#2  0x00002aaaaafb1060 in log4cxx::helpers::Pool::Pool (this=0x7fffffffe0e0)
at pool.cpp:34
#3  0x00002aaaaaf67692 in log4cxx::helpers::MutexException::formatMessage
(stat=22) at exception.cpp:227
#4  0x00002aaaaaf67739 in log4cxx::helpers::MutexException::MutexException
(this=0x624750, stat=2090152296) at exception.cpp:213
#5  0x00002aaaaafd3f77 in log4cxx::helpers::synchronized::synchronized
(this=<value optimized out>, mutex1=<value optimized out>)
    at synchronized.cpp:35
#6  0x00002aaaaafe783d in log4cxx::WriterAppender::close
(this=0x2aaaac000b20) at writerappender.cpp:135
#7  0x00002aaaaaf6d369 in log4cxx::FileAppender::~FileAppender
(this=0x613b40, __in_chrg=<value optimized out>, 
    __vtt_parm=<value optimized out>) at fileappender.cpp:88
#8  0x00002aaaaaf3e3f8 in
log4cxx::helpers::ObjectPtrT<log4cxx::Appender>::~ObjectPtrT
(this=0x2aaaac000cc0, 
    __in_chrg=<value optimized out>) at
../../../src/main/include/log4cxx/helpers/objectptr.h:100
#9  0x00002aaaaaf3e699 in
_Destroy<log4cxx::helpers::ObjectPtrT<log4cxx::Appender> >
(this=0x2aaaac000de0, 
    __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>)
    at
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_construct.h:107
#10 __destroy_aux<log4cxx::helpers::ObjectPtrT<log4cxx::Appender>*>
(this=0x2aaaac000de0, __in_chrg=<value optimized out>, 
    __vtt_parm=<value optimized out>)
    at
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_construct.h:122
#11 _Destroy<log4cxx::helpers::ObjectPtrT<log4cxx::Appender>*>
(this=0x2aaaac000de0, __in_chrg=<value optimized out>, 
    __vtt_parm=<value optimized out>)
    at
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_construct.h:155
#12 _Destroy<log4cxx::helpers::ObjectPtrT<log4cxx::Appender>*,
log4cxx::helpers::ObjectPtrT<log4cxx::Appender> > (
    this=0x2aaaac000de0, __in_chrg=<value optimized out>, __vtt_parm=<value
optimized out>)
    at
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_construct.h:182
#13 ~vector (this=0x2aaaac000de0, __in_chrg=<value optimized out>,
__vtt_parm=<value optimized out>)
    at
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_vector.h:272
#14 log4cxx::helpers::AppenderAttachableImpl::~AppenderAttachableImpl
(this=0x2aaaac000de0, __in_chrg=<value optimized out>, 
    __vtt_parm=<value optimized out>) at
../../../src/main/include/log4cxx/helpers/appenderattachableimpl.h:46
#15 0x00002aaaaaf8ecfc in ~ObjectPtrT (this=0x61c000, __vtt_parm=<value
optimized out>, __in_chrg=<value optimized out>)
    at ../../../src/main/include/log4cxx/helpers/objectptr.h:100
#16 log4cxx::Logger::~Logger (this=0x61c000, __vtt_parm=<value optimized
out>, __in_chrg=<value optimized out>) at logger.cpp:55
#17 0x00002aaaaafc2521 in log4cxx::spi::RootLogger::~RootLogger
(this=0x613b40, __in_chrg=<value optimized out>, 
    __vtt_parm=<value optimized out>) at
../../../src/main/include/log4cxx/spi/rootlogger.h:37
#18 0x00002aaaaaf96a6c in ~ObjectPtrT (this=0x619c58, __in_chrg=<value
optimized out>)
    at ../../../src/main/include/log4cxx/helpers/objectptr.h:100
#19 log4cxx::logstream_base::~logstream_base (this=0x619c58,
__in_chrg=<value optimized out>) at logstream.cpp:51


Could someone help?
-- 
View this message in context: 
http://old.nabble.com/log4cxx-0.10.0%3A-Fix-for-64-bit-only-thread-safety-bug-in-ObjectPtrBase-tp21504865p29167682.html
Sent from the Log4cxx - Dev mailing list archive at Nabble.com.

Reply via email to