rm5248 commented on pull request #105: URL: https://github.com/apache/logging-log4cxx/pull/105#issuecomment-1015955472
> If `static` objects are being destroyed while another thread is logging, then `APRInitializer` is also destroyed (which is bad). So all logging activity must be stopped in `Logger` before `apr_terminate()` is called. Removing the heirarchy from the `Logger` did this (except for threads active in doAppend()). > This is the big problem that I've been trying to wrap my head around. What exists currently is the least bad thing in my mind, since if you unexpectedly exit(which you shouldn't do in the first place) you at least get some log messages after that, it mostly works. > I am getting SegFault in multithreadtest on Ubuntu now with this PR. I am thinking the `const LevelPtr&` return values (i.e. no locking in `Level::getDebug()` ) in this PR expose the case where threads are active in doAppend(). It's been a while, but that does sound right to me. I know that what I did made segfaults happen _less_, but they're still not completely fixed. I suspect that a more complex situation would make it more apparent -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org