pan3793 opened a new pull request, #8265:
URL: https://github.com/apache/hadoop/pull/8265

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   
   The issue was identified on Hadoop 3.4.3 RC1 validation - use OpenJDK 25 
with Kerberos enabled, SparkPi fails immediately and consistently.
   
   The root cause is that JDK 24 introduces a behavior change on 
ServiceLoader's returned iterator, `iterator.hasNext()` might throw 
NoClassDefFoundError, which previously only happened on `iterator.next()`
   
   See https://bugs.openjdk.org/browse/JDK-8350481
   ```
   2026-02-20 19:41:32,117 INFO resourcemanager.ClientRMService: Application 
with id 1 submitted by user spark
   2026-02-20 19:41:32,126 WARN security.DelegationTokenRenewer: Unable to add 
the application to the delegation token renewer.
   java.lang.NoClassDefFoundError: com/google/protobuf/Message$Builder
           at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
           at 
java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:2985)
           at java.base/java.lang.Class.getConstructor0(Class.java:3180)
           at java.base/java.lang.Class.getConstructor(Class.java:2199)
           at 
java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:623)
           at 
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1111)
           at 
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1142)
           at 
java.base/java.util.ServiceLoader$1.hasNext(ServiceLoader.java:1164)
           at 
java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1246)
           at 
org.apache.hadoop.security.token.Token.getClassForIdentifier(Token.java:136)
           at 
org.apache.hadoop.security.token.Token.decodeIdentifier(Token.java:166)
           at 
org.apache.hadoop.security.token.Token.identifierToString(Token.java:425)
           at org.apache.hadoop.security.token.Token.toString(Token.java:445)
           at java.base/java.lang.String.valueOf(String.java:4530)
           at java.base/java.lang.StringBuilder.append(StringBuilder.java:173)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.handleAppSubmitEvent(DelegationTokenRenewer.java:496)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.access$1800(DelegationTokenRenewer.java:83)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.handleDTRenewerAppSubmitEvent(DelegationTokenRenewer.java:1078)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.run(DelegationTokenRenewer.java:1055)
           at java.base/java.lang.StringBuilder.append(StringBuilder.java:173)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.handleAppSubmitEvent(DelegationTokenRenewer.java:496)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer.access$1800(DelegationTokenRenewer.java:83)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.handleDTRenewerAppSubmitEvent(DelegationTokenRenewer.java:1078)
           at 
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenRenewerRunnable.run(DelegationTokenRenewer.java:1055)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
   2026-02-20 19:41:32,139 INFO rmapp.RMAppImpl: application_1771616432238_0001 
State change from FINAL_SAVING to FAILED on event = APP_UPDATE_SAVED
   2026-02-20 19:41:32,139 WARN capacity.CapacityScheduler: Couldn't find 
application application_1771616432238_0001
   ```
   
   ### How was this patch tested?
   
   It's a little bit complex to add a UT to fully verify that - either 
implement custom classloader or create mutliplt Maven modules to simulate the 
ClassNotFoundError, I only modified UT `TestCluster` to use mock to verify the 
issue partially.
   
   Instead I created [a project](https://github.com/pan3793/HADOOP-19821) to 
demonstrate the issue and solution.
   
   Also, manually verified - apply this patch to Hadoop 3.4.3 RC1, and deploy a 
kerberized Hadoop cluster with JDK 25, successfully submit a SparkPi.
   
   ### For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id 
(HADOOP-19821)?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   ### AI Tooling
   
   No AI usage.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to