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

Test indy against full test matrix #13095

Closed
wants to merge 1 commit into from

Conversation

trask
Copy link
Member

@trask trask commented Jan 24, 2025

I'm getting failures when running indy against openj9 locally, not sure if it's a real issue or not, but realized we're missing some test coverage.

related to #13031

cc @JonasKunz @SylvainJuge

@trask trask added the test openj9 This label can be applied to PRs to trigger them to run openj9 tests label Jan 24, 2025
@JonasKunz
Copy link
Contributor

At first sight looks like the fix for recursive invokedynamic-bootstrapping implemented in #12242 seems to work only for hotspot and not openJ9.

        at java.lang.invoke.MutableCallSite.<init>(MutableCallSite.java:77)
	at io.opentelemetry.javaagent.tooling.instrumentation.indy.IndyBootstrap.bootstrapAdvice(IndyBootstrap.java:183)
	at io.opentelemetry.javaagent.tooling.instrumentation.indy.IndyBootstrap.internalBootstrap(IndyBootstrap.java:135)
	at io.opentelemetry.javaagent.tooling.instrumentation.indy.IndyBootstrap.bootstrap(IndyBootstrap.java:115)
	at io.opentelemetry.javaagent.bootstrap.IndyBootstrapDispatcher.bootstrap(IndyBootstrapDispatcher.java:43)
	at java.lang.invoke.MethodHandleResolver.invokeBsm(MethodHandleResolver.java:117)
	at java.lang.invoke.MethodHandleResolver.resolveInvokeDynamic(MethodHandleResolver.java:165)
	at com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:79)
	at java.lang.invoke.MutableCallSite.<init>(MutableCallSite.java:77)
	at io.opentelemetry.javaagent.tooling.instrumentation.indy.IndyBootstrap.bootstrapAdvice(IndyBootstrap.java:183)
	at io.opentelemetry.javaagent.tooling.instrumentation.indy.IndyBootstrap.internalBootstrap(IndyBootstrap.java:135)
	at io.opentelemetry.javaagent.tooling.instrumentation.indy.IndyBootstrap.bootstrap(IndyBootstrap.java:115)
	at io.opentelemetry.javaagent.bootstrap.IndyBootstrapDispatcher.bootstrap(IndyBootstrapDispatcher.java:43)
	at java.lang.invoke.MethodHandleResolver.invokeBsm(MethodHandleResolver.java:117)
	at java.lang.invoke.MethodHandleResolver.resolveInvokeDynamic(MethodHandleResolver.java:165)
	at com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:79)
	at java.lang.invoke.MutableCallSite.<init>(MutableCallSite.java:77)

The problem seems to be that on the code path that should prevent the recursion we trigger a new recursion:
The construction of MutableCallSite causes classloading, which again involves our instrumentation.

Best case is we should get away with just creating a MutableCallSite in the static initializer of IndyBootstrap to eagerly trigger the invovled classloading to remove it from the recursion code path.
I'll give it a try.

@trask
Copy link
Member Author

trask commented Feb 13, 2025

closing in favor of #13282

@trask trask closed this Feb 13, 2025
@trask trask deleted the test-indy-against-matrix branch February 13, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test openj9 This label can be applied to PRs to trigger them to run openj9 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants