使用log4cplus记录日记出现阻塞,使用gdb调试,栈信息如下:
(gdb) bt
#0 0x00007fc2703e02fd in write () from /lib/libc.so.0
#1 0x00007fc2703c9327 in ?? () from /lib/libc.so.0
#2 0x00007fc2703cffcc in fwrite_unlocked () from /lib/libc.so.0
#3 0x00007fc2703cf0b6 in fwrite () from /lib/libc.so.0
#4 0x00007fc270a9a274 in ?? () from /usr/lib/libstdc++.so.6
#5 0x00007fc270a9a34f in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) () from /usr/lib/libstdc++.so.6
#6 0x00007fc270d34ee1 in log4cplus::SimpleLayout::formatAndAppend(std::ostream&, log4cplus::spi::InternalLoggingEvent const&) () from /usr/lib/liblog4cplus-1.1.so.9
#7 0x00007fc270d25640 in log4cplus::ConsoleAppender::append(log4cplus::spi::InternalLoggingEvent const&) () from /usr/lib/liblog4cplus-1.1.so.9
#8 0x00007fc270d1c4f7 in log4cplus::Appender::doAppend(log4cplus::spi::InternalLoggingEvent const&) () from /usr/lib/liblog4cplus-1.1.so.9
#9 0x00007fc270d1b4ce in log4cplus::helpers::AppenderAttachableImpl::appendLoopOnAppenders(log4cplus::spi::InternalLoggingEvent const&) const () from /usr/lib/liblog4cplus-1.1.so.9
#10 0x00007fc270d38314 in log4cplus::spi::LoggerImpl::callAppenders(log4cplus::spi::InternalLoggingEvent const&) () from /usr/lib/liblog4cplus-1.1.so.9
#11 0x0000000000423d67 in _log4cplus_debug (filename=<optimized out>, line=<optimized out>, level=<optimized out>, format=<optimized out>) at log4cplus_debug.cc:98
#12 0x00000000004161d0 in ping () at ping_thread.c:252
#13 0x0000000000415aa3 in thread_ping (arg=0x0) at ping_thread.c:93
#14 0x00007fc271691b57 in ?? () from /lib/libpthread.so.0
#15 0x00007fc27168d78e in clone () from /lib/libpthread.so.0
#16 0x0000000000000000 in ?? ()
求解原因!!谢谢。
http://blog.csdn.net/lingdi20...
你打开一下上面的网址,来看一下能不能帮到你