==5259== Thread #1 is the program's root thread ==5259== ==5259== Thread #1: lock order "0x486E4FC before 0x486E52C" violated ==5259== at 0x4025D47: pthread_mutex_lock (hg_intercepts.c:409) ==5259== by 0x43F14B5: pthread_mutex_lock (in /lib/libc-2.8.so) ==5259== by 0x461FDDF: apr_thread_mutex_lock (in /usr/lib/libapr-1.so.0.2.12) ==5259== by 0x41683A1: log4cxx::helpers::synchronized::synchronized(log4cxx::helpers::Mutex const&) (synchronized.cpp:33) ==5259== by 0x4108994: log4cxx::Hierarchy::setConfigured(bool) (hierarchy.cpp:393) ==5259== by 0x410B6C9: log4cxx::Hierarchy::fireAddAppenderEvent(log4cxx::helpers::ObjectPtrT const&, log4cxx::helpers::ObjectPtrT const&) (hierarchy.cpp:164) ==5259== by 0x411F0FA: log4cxx::Logger::addAppender(log4cxx::helpers::ObjectPtrT const&) (logger.cpp:75) ==5259== by 0x41493E0: log4cxx::PropertyConfigurator::parseLogger(log4cxx::helpers::Properties&, log4cxx::helpers::ObjectPtrT&, std::string const&, std::string const&, std::string const&) (propertyconfigurator.cpp:373) ==5259== by 0x414A0B5: log4cxx::PropertyConfigurator::configureRootLogger(log4cxx::helpers::Properties&, log4cxx::helpers::ObjectPtrT&) (propertyconfigurator.cpp:228) ==5259== by 0x414ADB1: log4cxx::PropertyConfigurator::doConfigure(log4cxx::helpers::Properties&, log4cxx::helpers::ObjectPtrT&) (propertyconfigurator.cpp:168) ==5259== by 0x414B385: log4cxx::PropertyConfigurator::doConfigure(log4cxx::File const&, log4cxx::helpers::ObjectPtrT&) (propertyconfigurator.cpp:109) ==5259== by 0x414BDD1: PropertyWatchdog::doOnChange() (propertyconfigurator.cpp:67) ==5259== Required order was established by acquisition of lock at 0x486E4FC ==5259== at 0x4025D47: pthread_mutex_lock (hg_intercepts.c:409) ==5259== by 0x43F14B5: pthread_mutex_lock (in /lib/libc-2.8.so) ==5259== by 0x461FDDF: apr_thread_mutex_lock (in /usr/lib/libapr-1.so.0.2.12) ==5259== by 0x41683A1: log4cxx::helpers::synchronized::synchronized(log4cxx::helpers::Mutex const&) (synchronized.cpp:33) ==5259== by 0x4108EB9: log4cxx::Hierarchy::Hierarchy() (hierarchy.cpp:57) ==5259== by 0x4125C7D: log4cxx::LogManager::getLoggerRepository() (logmanager.cpp:87) ==5259== by 0x414BDB1: PropertyWatchdog::doOnChange() (propertyconfigurator.cpp:67) ==5259== by 0x4101FCB: log4cxx::helpers::FileWatchdog::checkAndConfigure() (filewatchdog.cpp:64) ==5259== by 0x41021B1: log4cxx::helpers::FileWatchdog::start() (filewatchdog.cpp:88) ==5259== by 0x41467EF: log4cxx::PropertyConfigurator::configureAndWatch(log4cxx::File const&, long) (propertyconfigurator.cpp:139) ==5259== by 0x804917A: main (in /home/bvassche/test/log4cxx/locking-order-violation-example) ==5259== followed by a later acquisition of lock at 0x486E52C ==5259== at 0x4025D47: pthread_mutex_lock (hg_intercepts.c:409) ==5259== by 0x43F14B5: pthread_mutex_lock (in /lib/libc-2.8.so) ==5259== by 0x461FDDF: apr_thread_mutex_lock (in /usr/lib/libapr-1.so.0.2.12) ==5259== by 0x41683A1: log4cxx::helpers::synchronized::synchronized(log4cxx::helpers::Mutex const&) (synchronized.cpp:33) ==5259== by 0x411EA93: log4cxx::Logger::Logger(log4cxx::helpers::Pool&, std::string const&) (logger.cpp:48) ==5259== by 0x4155363: log4cxx::spi::RootLogger::RootLogger(log4cxx::helpers::Pool&, log4cxx::helpers::ObjectPtrT const&) (rootlogger.cpp:28) ==5259== by 0x4108EE8: log4cxx::Hierarchy::Hierarchy() (hierarchy.cpp:58) ==5259== by 0x4125C7D: log4cxx::LogManager::getLoggerRepository() (logmanager.cpp:87) ==5259== by 0x414BDB1: PropertyWatchdog::doOnChange() (propertyconfigurator.cpp:67) ==5259== by 0x4101FCB: log4cxx::helpers::FileWatchdog::checkAndConfigure() (filewatchdog.cpp:64) ==5259== by 0x41021B1: log4cxx::helpers::FileWatchdog::start() (filewatchdog.cpp:88) ==5259== by 0x41467EF: log4cxx::PropertyConfigurator::configureAndWatch(log4cxx::File const&, long) (propertyconfigurator.cpp:139) ==5259== ==5259== Thread #2 was created ==5259== at 0x43E4DB8: clone (in /lib/libc-2.8.so) ==5259== by 0x4676AA2: pthread_create@@GLIBC_2.1 (in /lib/libpthread-2.8.so) ==5259== by 0x4028803: pthread_create@* (hg_intercepts.c:214) ==5259== by 0x462BCE9: apr_thread_create (in /usr/lib/libapr-1.so.0.2.12) ==5259== by 0x416ED17: log4cxx::helpers::Thread::run(void* (*)(apr_thread_t*, void*), void*) (threadcxx.cpp:76) ==5259== by 0x41021CA: log4cxx::helpers::FileWatchdog::start() (filewatchdog.cpp:90) ==5259== by 0x41467EF: log4cxx::PropertyConfigurator::configureAndWatch(log4cxx::File const&, long) (propertyconfigurator.cpp:139) ==5259== by 0x804917A: main (in /home/bvassche/test/log4cxx/locking-order-violation-example) ==5259==