[Log4cplus-devel] Thread blocking when calling ev.gatherThreadSpecificData ();
Logging Framework for C++
Brought to you by:
wilx
|
From: Andersen, J. B. (E W EN R&D DT ES 2 1)
<jes...@si...> - 2014-03-14 12:43:32
|
Hi,
Setup:
log4cplus version 1.1.2.0.
Compiled for Windows XP target platform
Compiled using visual studio 2010 compiler as dynamic libraries.
Logging is done from multiple threads.
Loggers are configured with the AsyncAppender and a sub RollingFileAppender like this:
########################################################################
## log file configuration (to disable, remove it from the rootLogger) ##
##
log4cplus.appender.IRlogfile=log4cplus::AsyncAppender
log4cplus.appender.IRlogfile.QueueLimit=100
log4cplus.appender.IRlogfile.Appender=log4cplus::RollingFileAppender
log4cplus.appender.IRlogfile.Appender.layout=log4cplus::PatternLayout
log4cplus.appender.IRlogfile.Appender.BufferSize=10000
log4cplus.appender.IRlogfile.Appender.ImmediateFlush=true
##
## The name and location for the log file
log4cplus.appender.IRlogfile.Appender.File=d:/IRCore.log.txt
##
## The frequency at which log files will be rotated
log4cplus.appender.IRlogfile.Appender.DatePattern='.'yyyy-MM-dd
##
## The maximum size of log files before they are rotated
log4cplus.appender.IRlogfile.Appender.MaxFileSize=10MB
##
## The number of backup log files to keep
log4cplus.appender.IRlogfile.Appender.MaxBackupIndex=10
##
## pattern used for the log file
log4cplus.appender.IRlogfile.Appender.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S.%q};%c;%m%n
I have experienced one of my threads blocked for aprox. 1500 ms.
This triggered my watchdog thread to write a minidump file. This mini dump indicated that the blocking thread was located somewhere in the ev.gatherThreadSpecificData() method.
Maybe my configuration is faulted?
>From the source I can see it must have been in one of the these methods the block occured:
getNDC ();
getMDCCopy ();
getThread ();
getThread2 ();
Can anybody see / explain why a block can occur?
Kind regards
Jesper
|