You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2026/06/22 10:52:29 UTC
[PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
HyukjinKwon opened a new pull request, #56660:
URL: https://github.com/apache/spark/pull/56660
### What changes were proposed in this pull request?
Upgrade `log4j` from 2.25.x to **2.26.0** (`pom.xml` and `dev/deps/spark-deps-hadoop-3-hive-2.3`).
### Why are the changes needed?
Under JDK 25, log4j2's `ThrowableStackTraceRenderer` throws
`NullPointerException: Cannot read field "stackLength" because "metadata" is null` when rendering
any logged exception's stack trace. On Spark this surfaces as `FsHistoryProviderSuite`
"provider reports error after FS leaves safe mode" failing on the JDK 25 scheduled build.
Example failing upstream run (Build / Java25):
https://github.com/apache/spark/actions/runs/27894816608
log4j 2.26.0 fixes the renderer (snapshots the stack trace during metadata population; upstream
LOG4J2 #3940 / #3955).
### Does this PR introduce any user-facing change?
No. Build/logging dependency upgrade.
### How was this patch tested?
Validated on a fork.
- `FsHistoryProviderSuite` "provider reports error after FS leaves safe mode" is GREEN on **JDK 25**
with this bump: https://github.com/HyukjinKwon/spark/actions/runs/27929988232
- Fully GREEN combined Maven (Scala 2.13, JDK 21) run that includes this log4j bump, 0 failed jobs
(the same suite also fails on JDK 21 without the bump):
**https://github.com/HyukjinKwon/spark/actions/runs/27935083986**
- A combined JDK 25 proof run is also in progress:
https://github.com/HyukjinKwon/spark/actions/runs/27943439418
### Was this patch authored or co-authored using generative AI tooling?
Yes. Drafted with Claude Code (Anthropic) and reviewed before submission.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #56660:
URL: https://github.com/apache/spark/pull/56660#issuecomment-4773448026
@pan3793 just to clarify, so does this upgrade not fix the build?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #56660:
URL: https://github.com/apache/spark/pull/56660#issuecomment-4783688925
Let me merge this into master only for now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #56660:
URL: https://github.com/apache/spark/pull/56660#issuecomment-4783690118
Merged to master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #56660: [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE
URL: https://github.com/apache/spark/pull/56660
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #56660:
URL: https://github.com/apache/spark/pull/56660#issuecomment-4775032683
> so does this upgrade not fix the build?
@HyukjinKwon I think so. Actually, the log4j community claimed to have fixed the issue in 2.26.0, but later withdrew and claims this would be fixed in 2.27.0. You can read the conversion in https://github.com/apache/spark/pull/51719 for more information.
And again, this is unrelated to JDK 25, it's a pure log4j bug.
I think the safe choice for now is to downgrade log4j2 to 2.24.3 (for functionality perspective), but this means we will bring the CVE back - direct CVE links can be found in https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core/2.24.3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #56660:
URL: https://github.com/apache/spark/pull/56660#issuecomment-4775367382
Let's then just try to upgrade this one for now as the CI is fixed by this at least.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57604][BUILD] Upgrade log4j to 2.26.0 to fix JDK 25 ThrowableStackTraceRenderer NPE [spark]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #56660:
URL: https://github.com/apache/spark/pull/56660#issuecomment-4785221579
@HyukjinKwon supposed you were informed https://github.com/apache/spark/pull/51719#issuecomment-4776649682
1. log4j 2.26.0 does NOT fix the issue
2. this is irrelevant to JDK 25, PR title and description are misleading
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org