logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaspar Fischer <kaspar.fisc...@dreizak.com>
Subject getRootLogger() thread-safe?
Date Mon, 10 Mar 2014 02:20:27 GMT
Hi everybody,

Is getRootLogger() thread safe?

I am running into a situation where calling getRootLogger() concurrently
from many requests results in a EXC_BAD_ACCESS:

liblog4cxx.10.dylib`log4cxx::LogManager::getRootLogger():
0x101f180a0:  pushq  %rbp
0x101f180a1:  movq   %rsp, %rbp
0x101f180a4:  pushq  %rbx
0x101f180a5:  pushq  %rax
0x101f180a6:  movq   %rdi, %rbx
0x101f180a9:  callq  0x101f17de0               ;
log4cxx::LogManager::getLoggerRepository()
0x101f180ae:  movq   8(%rax), %rsi
0x101f180b2:  movq   (%rsi), %rax
0x101f180b5:  movq   %rbx, %rdi
0x101f180b8:  callq  *120(%rax) <<<<<< THREAD  1: EXC_BAD_ACCESS
(code=EXC_I386_GPFLT)
0x101f180bb:  movq   %rbx, %rax
0x101f180be:  addq   $8, %rsp
0x101f180c2:  popq   %rbx
0x101f180c3:  popq   %rbp
0x101f180c4:  ret
0x101f180c5:  nopw   %cs:(%rax,%rax)

If I replace the logging statement with a statement that writes to
std::cerr, I do not run into any problems.

I am using log4cxx 0.10.0 on MacOS 10.9.1.

Any ideas?

- Kaspar

$ brew info log4cxx

log4cxx: stable 0.10.0

http://logging.apache.org/log4cxx/index.html

/opt/brew/Cellar/log4cxx/0.10.0 (183 files, 7.9M) *

  Built from source

Mime
View raw message