Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.2.3
-
Linux
Description
We have a multitenant application. When one "instance" is shutdown, it called logbackLogger.detactAndStopAllAppenders(). This function appears to wait indefinitely. See stack trace further below.
public static synchronized void removeAndStopAllAppenders(String loggerName) {
ch.qos.logback.classic.Logger logbackLogger = getLogger(loggerName);
if (logbackLogger != null) {
logbackLogger.detachAndStopAllAppenders();
loggers.clear();
}
}
ool-98202-thread-7 - priority:5 - threadId:0x000000001c4b5000 - nativeId:0x2090 - state:TIMED_WAITING
stackTrace:
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.$$YJP$$wait(Native Method)
at java.lang.Object.wait(Object.java)
at java.lang.Thread.join(Thread.java:1257)
- locked <0x00000004f21db758> (a ch.qos.logback.core.AsyncAppenderBase$Worker)
at ch.qos.logback.core.AsyncAppenderBase.stop(AsyncAppenderBase.java:133)
at ch.qos.logback.core.spi.AppenderAttachableImpl.detachAndStopAllAppenders(AppenderAttachableImpl.java:107)
at ch.qos.logback.classic.Logger.detachAndStopAllAppenders(Logger.java:206)
..
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)