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

[Improvement] Migrate from log4j1 to log4j2 #1552

Closed
3 tasks done
rickyma opened this issue Feb 29, 2024 · 0 comments
Closed
3 tasks done

[Improvement] Migrate from log4j1 to log4j2 #1552

rickyma opened this issue Feb 29, 2024 · 0 comments

Comments

@rickyma
Copy link
Contributor

rickyma commented Feb 29, 2024

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

What would you like to be improved?

Apache Uniffle uses log4j 1.x, so hence is not susceptible to the recent log4j v2 vulnerability. However, log4j 1.x has reached end of life and is no longer supported. Vulnerabilities reported after August 2015 against log4j 1.x were not checked and will not be fixed. As a result, we are recommended to upgrade Uniffle to Log4j 2 as soon as possible.

When using log4j 1.x, there is a probability of performance bottlenecks in high concurrency scenarios, like:

"epollEventLoopGroup-3-100" #267 prio=10 os_prio=0 cpu=1354.16ms elapsed=124.91s tid=0x0000563b3a4dc000 nid=0x202 waiting for monitor entry [0x00007f3532371000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.apache.log4j.Category.callAppenders(Category.java:204)
	- waiting to lock <0x00007f3634089b88> (a org.apache.log4j.spi.RootLogger)
	at org.apache.log4j.Category.forcedLog(Category.java:384)
	at org.apache.log4j.Category.log(Category.java:810)
	at org.slf4j.impl.Reload4jLoggerAdapter.info(Reload4jLoggerAdapter.java:347)
        at org.apache.uniffle.
        ...

Log4j2 uses java.util.concurrent libraries to perform locking at the lowest level possible. Log4j-1.x has known deadlock issues.

How should we improve?

Migrate from log4j1 to log4j2

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
rickyma added a commit to rickyma/incubator-uniffle that referenced this issue Feb 29, 2024
rickyma added a commit to rickyma/incubator-uniffle that referenced this issue Feb 29, 2024
rickyma added a commit to rickyma/incubator-uniffle that referenced this issue Feb 29, 2024
rickyma added a commit to rickyma/incubator-uniffle that referenced this issue Feb 29, 2024
LuciferYang pushed a commit that referenced this issue Mar 4, 2024
### What changes were proposed in this pull request?

Migrate from log4j1 to log4j2

### Why are the changes needed?

For #1552

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing UTs.
@zuston zuston closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants