You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Mike (Jira)" <ji...@apache.org> on 2021/06/04 15:15:00 UTC
[jira] [Created] (LOG4J2-3103) ComodificationException in
concurrent access to LoggerContext::stop
Mike created LOG4J2-3103:
----------------------------
Summary: ComodificationException in concurrent access to LoggerContext::stop
Key: LOG4J2-3103
URL: https://issues.apache.org/jira/browse/LOG4J2-3103
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.14.1
Reporter: Mike
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:
{code}
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)
{code}
Proposed fix: https://github.com/apache/logging-log4j2/pull/508
--
This message was sent by Atlassian Jira
(v8.3.4#803005)