RuntimeAttach smoke tests fail on Java 17 HotSpot with OTel 2.22.0-alpha#4603
Draft
RuntimeAttach smoke tests fail on Java 17 HotSpot with OTel 2.22.0-alpha#4603
Conversation
Pre-load java.lang.invoke.MethodHandle before runtime attach to avoid ClassCircularityError that occurs with OpenTelemetry 2.22.0-alpha on Java 17 HotSpot JVM. See open-telemetry/opentelemetry-java-instrumentation#3396 Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix RuntimeAttach smoke tests
Fix Java 17 ClassCircularityError in runtime attach smoke tests
Jan 28, 2026
Copilot
AI
changed the title
Fix Java 17 ClassCircularityError in runtime attach smoke tests
RuntimeAttach smoke tests fail on Java 17 HotSpot with OTel 2.22.0-alpha
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #4549 upgrades OpenTelemetry Instrumentation from 2.21.0-alpha to 2.22.0-alpha. This breaks RuntimeAttach smoke tests specifically on Java 17 HotSpot JVM with
ClassCircularityError: java/lang/invoke/MethodHandle$1.Investigation
Tested workaround from opentelemetry-java-instrumentation#3396 (pre-loading MethodHandle before agent attach):
Result: Workaround fails - calling
Class.forName("java.lang.invoke.MethodHandle")itself triggers the ClassCircularityError with OTel 2.22.0-alpha.Test Matrix
Issue is isolated to Java 17 HotSpot during runtime attach.
Options
@Disabledpending upstream fixThis PR documents findings. No fix implemented yet - requires decision on approach.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.