Martijn Visser created FLINK-40833:
--------------------------------------

             Summary: JobManager and TaskManager logs are rolled at startup 
with log4j 2.25.2 and later
                 Key: FLINK-40833
                 URL: https://issues.apache.org/jira/browse/FLINK-40833
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Coordination
    Affects Versions: 2.3.0, 2.4.0
            Reporter: Martijn Visser


Since the upgrade to log4j 2.25.3 (FLINK-39146), a JobManager or TaskManager 
started with the default conf/log4j.properties sometimes rolls its log file 
about half a second after startup. The startup section (JVM options, 
configuration, Kerberos login) then sits in jobmanager.log.1, and 
jobmanager.log starts at "Trying to start actor system".

The first logger of a class in the RPC system's submodule classloader creates a 
second LoggerContext, which runs OnStartupTriggeringPolicy again on the open 
file. Since 2.25.2 log4j rounds the file's creation time to the second, so a 
file created in the first half of the JVM's start second looks older than the 
JVM and is rolled. Locally that happened in 31 of 100 starts with 2.25.2 and 0 
of 100 with 2.25.1, and not with 
log4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector.

This is the cause of FLINK-40109. FLINK-40070 is the same symptom in 
DynamicParameterITCase.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to