Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump log4j version to 2.24.3 to fix ConcurrentModificationException in LoggerContext #6960

Closed
wants to merge 1 commit into from

Conversation

turboFei
Copy link
Member

@turboFei turboFei commented Mar 5, 2025

Why are the changes needed?

Bump the log4j version to fix below issue:

2025-03-04 22:27:58.291 WARN [main-SendThread(xxxx:2181)] org.apache.kyuubi.shaded.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
: java.lang.ExceptionInInitializerError
        at org.apache.log4j.Logger.getLogger(Logger.java:35)
        at org.apache.kyuubi.shaded.zookeeper.Login.<init>(Login.java:44)
        at org.apache.kyuubi.shaded.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:228)
        at org.apache.kyuubi.shaded.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:131)
        at org.apache.kyuubi.shaded.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:990)
        at org.apache.kyuubi.shaded.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1042)
Caused by: java.util.ConcurrentModificationException
        at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1657)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
        at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
        at java.util.WeakHashMap$ValueSpliterator.forEachRemaining(WeakHashMap.java:1216)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
        at org.apache.logging.log4j.core.LoggerContext.updateLoggers(LoggerContext.java:776)
        at org.apache.logging.log4j.core.LoggerContext.updateLoggers(LoggerContext.java:766)
        at org.apache.logging.log4j.core.config.Configurator.setLevel(Configurator.java:379)
        at org.apache.logging.log4j.core.config.Configurator.setLevel(Configurator.java:344)
        at org.apache.log4j.legacy.core.CategoryUtil.setLevel(CategoryUtil.java:131)
        at org.apache.log4j.Category.setLevel(Category.java:643)
        at org.apache.log4j.Category.setLevel(Category.java:638)
        at org.apache.log4j.spi.RootLogger.setLevel(RootLogger.java:60)
        at org.apache.log4j.spi.RootLogger.<init>(RootLogger.java:39)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:70)
        ... 6 more

It is fixed in https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.3

apache/logging-log4j2#3234

How was this patch tested?

Existing GA.

Was this patch authored or co-authored using generative AI tooling?

No.

@turboFei turboFei requested a review from pan3793 March 5, 2025 05:42
@turboFei turboFei added this to the v1.9.4 milestone Mar 5, 2025
@turboFei turboFei changed the title Bump log4j version to 2.24.3 Bump log4j version to 2.24.3 to fix ConcurrentModificationException in LoggerContext Mar 5, 2025
@turboFei turboFei modified the milestones: v1.9.4, v1.11.0 Mar 5, 2025
@turboFei
Copy link
Member Author

turboFei commented Mar 5, 2025

This issue only exists in 2.24.2.
Due the branch-1.9 and branch-1.10 log4j version is 2.20.0 and do not have this issue, so change the milestone version to 1.11.0

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (851178c) to head (48b076c).
Report is 3 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #6960   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         689     689           
  Lines       42637   42637           
  Branches     5804    5804           
======================================
  Misses      42637   42637           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pan3793
Copy link
Member

pan3793 commented Mar 5, 2025

Thanks, merged to master

@turboFei turboFei deleted the log4j_version branch March 5, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants