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

jdk22 WrapperHiddenClassTest: MHP impl class cannot be cleared by GC #18804

Closed
babsingh opened this issue Jan 24, 2024 · 6 comments · Fixed by adoptium/aqa-tests#5116
Closed

Comments

@babsingh
Copy link
Contributor

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Personal_testList_0/1
jdk_lang
java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java

16:34:54  STARTED    WrapperHiddenClassTest::testWeakImplClass '[2] interface Client'
16:34:54  org.opentest4j.AssertionFailedError: MHP impl class cannot be cleared by GC
16:34:54  	at [email protected]/org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
16:34:54  	at [email protected]/org.junit.jupiter.api.Assertions.fail(Assertions.java:135)
16:34:54  	at WrapperHiddenClassTest.testWeakImplClass(WrapperHiddenClassTest.java:209)
... 
16:34:54  FAILED     WrapperHiddenClassTest::testWeakImplClass '[2] interface Client'
@babsingh babsingh changed the title JDK22 WrapperHiddenClassTest: MHP impl class cannot be cleared by GC jdk22 WrapperHiddenClassTest: MHP impl class cannot be cleared by GC Jan 24, 2024
@babsingh babsingh added this to the Java 22 milestone Jan 24, 2024
@tajila tajila added the comp:gc label Jan 29, 2024
@babsingh
Copy link
Contributor Author

There are two WrapperHiddenClassTest failures: this issue and #18805. The failures only happen with gencon and optthruput GC policies. WrapperHiddenClassTest consistently passes with metronome and balanced GC policies.

fyi @dmitripivkine

@dmitripivkine
Copy link
Contributor

There are two WrapperHiddenClassTest failures: this issue and #18805. The failures only happen with gencon and optthruput GC policies. WrapperHiddenClassTest consistently passes with metronome and balanced GC policies.

fyi @dmitripivkine

Such set of GC policies points to the JIT most likely. There are many JIT optimizations disabled for Metronome and Balanced. Another possibility for such set that Discontiguous array can be involved, code might expect contiguous array mistakenly.

@dmitripivkine
Copy link
Contributor

@babsingh Would you please help to triage this?
I need:

  • link to the test source
  • help to generate system core to look at
  • nice to have comments what test trying to achieve and what is failed (ideally with references in the core)

@babsingh
Copy link
Contributor Author

link to the test source

16:34:54 at WrapperHiddenClassTest.testWeakImplClass(WrapperHiddenClassTest.java:209)

https://github.com/ibmruntimes/openj9-openjdk-jdk22/blob/1159998e1cb3beb441d35bc1ca6aea768d6c9afb/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java#L209

nice to have comments what test trying to achieve and what is failed (ideally with references in the core)

Tests the caching and weak reference of implementation classes for system and user interfaces. Test expects the GC to clear the weak reference after the strong reference has been cleared.

help to generate system core to look at

This failure is intermittent, and the failure in #18805 is dominating the test runs. I will share a link to the core file once I generate it.

@pshipton
Copy link
Member

pshipton commented Mar 1, 2024

This can be closed now that #19020 is merged?

@babsingh
Copy link
Contributor Author

babsingh commented Mar 1, 2024

I had locally verified that #19020 fixes this issue. I have opened adoptium/aqa-tests#5116 to re-enable the test.

pshipton pushed a commit to adoptium/aqa-tests that referenced this issue Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants