Description
Mostly just happens in integration tests, but if two concurrent processes both attempt to stop and add new shutdown listeners at the same time, you can see the following exception:
Caused by: java.util.ConcurrentModificationException at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1043) at java.base/java.util.ArrayList$Itr.next(ArrayList.java:997) at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:405) at org.apache.logging.log4j.core.async.AsyncLoggerContext.stop(AsyncLoggerContext.java:106) at com.palantir.sls.logging.log4j.service.Log4jServiceLogging.shutdown(Log4jServiceLogging.java:152) at com.palantir.witchcraft.logging.log4j.Log4jLoggingFramework.shutdown(Log4jLoggingFramework.java:124) at com.palantir.witchcraft.logging.log4j.Log4jLoggingFramework.initialize(Log4jLoggingFramework.java:59) at com.palantir.witchcraft.logging.LoggingFrameworks.initialize(LoggingFrameworks.java:41) at com.palantir.witchcraft.logging.Logging.configureDefault(Logging.java:76)
Proposed fix: https://github.com/apache/logging-log4j2/pull/508
Attachments
Issue Links
- links to