Skip to content

Conversation

@ayushtkn
Copy link
Member

@ayushtkn ayushtkn commented Mar 24, 2025

The ByteBuffer.mark() method returns ByteBuffer itself in Java 8, but starting with JDK 9+, it returns a more specific subclass (like HeapByteBuffer or DirectByteBuffer), which is incompatible with method signatures expecting ByteBuffer.

When running the same code in JDK 17, this mismatch triggers a NoSuchMethodError due to binary incompatibility.

@tez-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 26m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚 mvninstall 11m 16s master passed
+1 💚 compile 0m 36s master passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu122.04
+1 💚 compile 0m 33s master passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu122.04-b06
+1 💚 checkstyle 1m 2s master passed
+1 💚 javadoc 0m 39s master passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu122.04
+1 💚 javadoc 0m 30s master passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu122.04-b06
+0 🆗 spotbugs 1m 19s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 1m 17s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 21s the patch passed
+1 💚 compile 0m 22s the patch passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu122.04
+1 💚 javac 0m 22s the patch passed
+1 💚 compile 0m 20s the patch passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu122.04-b06
+1 💚 javac 0m 20s the patch passed
+1 💚 checkstyle 0m 15s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 18s the patch passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu122.04
+1 💚 javadoc 0m 17s the patch passed with JDK Private Build-1.8.0_442-8u442-b06us1-0ubuntu122.04-b06
+1 💚 findbugs 0m 54s the patch passed
_ Other Tests _
+1 💚 unit 5m 37s tez-runtime-library in the patch passed.
+1 💚 asflicense 0m 13s The patch does not generate ASF License warnings.
52m 26s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-397/1/artifact/out/Dockerfile
GITHUB PR #397
JIRA Issue TEZ-4609
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
uname Linux e83271e24bdb 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/tez.sh
git revision master / 3aa2aa1
Default Java Private Build-1.8.0_442-8u442-b06us1-0ubuntu122.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_442-8u442-b06us1-0ubuntu122.04-b06
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-397/1/testReport/
Max. process+thread count 1090 (vs. ulimit of 5500)
modules C: tez-runtime-library U: tez-runtime-library
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-397/1/console
versions git=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ayushtkn ayushtkn requested a review from abstractdog March 24, 2025 09:55
@abstractdog
Copy link
Contributor

is it about to compile on JDK8 and run on JDK17 scenario?
it fails on this line according to Jira (line 949)

      reserved.mark();

please confirm if the error is because:

  1. the compiler saw a version of ByteBuffer.mark() that returns a ByteBuffer.
  2. at runtime, the JVM is using a different version of ByteBuffer where mark() exists but returns something else (as you mentioned, HeapByteBuffer)

@ayushtkn
Copy link
Member Author

yes, exactly

Copy link
Contributor

@abstractdog abstractdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ayushtkn ayushtkn merged commit c34ec16 into apache:master Mar 24, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants