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

[JDK8 OJDK-MH] getCallerClass failures #14989

Closed
babsingh opened this issue May 2, 2022 · 3 comments
Closed

[JDK8 OJDK-MH] getCallerClass failures #14989

babsingh opened this issue May 2, 2022 · 3 comments
Labels
jdk8 project:MH Used to track Method Handles related work triageRequired

Comments

@babsingh
Copy link
Contributor

babsingh commented May 2, 2022

The below failure(s) is(are) only seen when OJDK MHs are enabled in OpenJ9.

Errors

Testing: call APIs with/without @CallerSensitive annotation from the bootstrap classloader
Test start time: 2022/04/20 01:26:20 Eastern Standard Time
Running command: "/home/jenkins/workspace/Test_openjdk8_j9_extended.functional_x86-64_linux_ojdk292_Personal_testList_0/openjdkbinary/j2sdk-image/bin/java"   -Xdump -Xbootclasspath/a:/home/jenkins/workspace/Test_openjdk8_j9_extended.functional_x86-64_linux_ojdk292_Personal_testList_0/aqa-tests/TKG/../../jvmtest/functional/cmdline_options_testresources/cmdlinetestresources.jar com.ibm.j9.getcallerclass.TestGroup bootClassLoader
Time spent starting: 3 milliseconds
Time spent executing: 236 milliseconds
Test result: FAILED
Output from test:
 [OUT] test_getCallerClass_fromBootExtWithAnnotation: PASSED
 [OUT] test_ensureCalledFromBootstrapClass_fromBootWithAnnotation: PASSED
 [OUT] test_getCallerClass_Helper_Reflection_fromBootExtWithAnnotation: PASSED: return com.ibm.j9.getcallerclass.RefectionMHTests
 [OUT] test_getCallerClass_Direct_Reflection_fromBootExtClassLoader: PASSED
 [OUT] test_getCallerClass_Helper_MethodHandle_fromBootExtWithAnnotation: FAILED: return java.lang.invoke.MethodHandleImpl$BindCaller$T/0x0000000000000000
 [OUT] test_getCallerClass_Direct_MethodHandle_fromBootExtClassLoader: PASSED
 [OUT] test_getCallerClass_MethodHandle_ArgumentHelper: FAILED: return java.lang.invoke.MethodHandleImpl$BindCaller$T/0x0000000000000000
 [OUT] test_getCallerClass_fromBootExtWithoutAnnotation: PASSED
 [OUT] test_ensureCalledFromBootstrapClass_fromBootExtWithoutAnnotation: PASSED
>> Success condition was not found: [Output match: All Tests Completed and Passed]
>> Failure condition was found: [Output match: FAILED]
>> Failure condition was not found: [Output match: Unhandled Exception]
>> Failure condition was not found: [Output match: corrupt]
>> Failure condition was not found: [Output match: Processing dump event]
>> Failure condition was not found: [Output match: JVM requested Java dump]
>> Failure condition was not found: [Output match: JVM requested Snap dump]

Testing: call APIs with/without @CallerSensitive annotation from the extension classloader
Test start time: 2022/04/20 01:26:20 Eastern Standard Time
Running command: "/home/jenkins/workspace/Test_openjdk8_j9_extended.functional_x86-64_linux_ojdk292_Personal_testList_0/openjdkbinary/j2sdk-image/bin/java"   -Xdump -Djava.ext.dirs=/home/jenkins/workspace/Test_openjdk8_j9_extended.functional_x86-64_linux_ojdk292_Personal_testList_0/aqa-tests/TKG/../../jvmtest/functional/cmdline_options_testresources com.ibm.j9.getcallerclass.TestGroup extClassLoader
Time spent starting: 3 milliseconds
Time spent executing: 184 milliseconds
Test result: FAILED
Output from test:
 [OUT] test_getCallerClass_fromBootExtWithAnnotation: PASSED
 [OUT] test_ensureCalledFromBootstrapClass_fromExtWithAnnotation: PASSED
 [OUT] test_getCallerClass_Helper_Reflection_fromBootExtWithAnnotation: PASSED: return com.ibm.j9.getcallerclass.RefectionMHTests
 [OUT] test_getCallerClass_Direct_Reflection_fromBootExtClassLoader: PASSED
 [OUT] test_getCallerClass_Helper_MethodHandle_fromBootExtWithAnnotation: FAILED: return java.lang.invoke.MethodHandleImpl$BindCaller$T/0x0000000000000000
 [OUT] test_getCallerClass_Direct_MethodHandle_fromBootExtClassLoader: PASSED
 [OUT] test_getCallerClass_MethodHandle_ArgumentHelper: FAILED: return java.lang.invoke.MethodHandleImpl$BindCaller$T/0x0000000000000000
 [OUT] test_getCallerClass_fromBootExtWithoutAnnotation: PASSED
 [OUT] test_ensureCalledFromBootstrapClass_fromBootExtWithoutAnnotation: PASSED
>> Success condition was not found: [Output match: All Tests Completed and Passed]
>> Failure condition was found: [Output match: FAILED]
>> Failure condition was not found: [Output match: Unhandled Exception]
>> Failure condition was not found: [Output match: corrupt]
>> Failure condition was not found: [Output match: Processing dump event]
>> Failure condition was not found: [Output match: JVM requested Java dump]
>> Failure condition was not found: [Output match: JVM requested Snap dump]

Failing Test Targets

  • BUILD_LIST=functional
    • cmdLineTester_getCallerClassTests_SE80_0

How-to Run Tests?

https://github.com/eclipse/openj9/blob/master/test/docs/OpenJ9TestUserGuide.md

Steps to build an OpenJ9 JDK8 with OJDK MHs enabled

Refer to #14541.

@babsingh babsingh added jdk8 project:MH Used to track Method Handles related work triageRequired labels May 2, 2022
@babsingh
Copy link
Contributor Author

babsingh commented May 2, 2022

TODO: Check RI behaviour for the failing test. The test may not be checking the correct behaviour.

@babsingh babsingh changed the title [JDK8 OJDK-MH] test_getCallerClass_Helper_MethodHandle_fromBootExtWithAnnotation failed [JDK8 OJDK-MH] getCallerClassTests failures May 2, 2022
@babsingh babsingh changed the title [JDK8 OJDK-MH] getCallerClassTests failures [JDK8 OJDK-MH] getCallerClass failures May 2, 2022
@ThanHenderson
Copy link
Contributor

This also affects JDK11. #18372 supports JDK11 but more investigation is needed for JDK8.

ThanHenderson added a commit to ThanHenderson/openj9 that referenced this issue Oct 31, 2023
This patch addresses eclipse-openj9#14989 for ojdk11 MHs.
Hidden Classes changed InjectedInvoker class signatures. This patch
updates the test case to support pre-hidden-class signatures.

Signed-off-by: Nathan Henderson <[email protected]>
ThanHenderson added a commit to ThanHenderson/openj9 that referenced this issue Nov 3, 2023
This patch addresses eclipse-openj9#14989 for ojdk8 MHs
by matching the MH class to the InjectedInvoker template class.

Signed-off-by: Nathan Henderson <[email protected]>
@ThanHenderson
Copy link
Contributor

Closed by #18396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jdk8 project:MH Used to track Method Handles related work triageRequired
Projects
Development

No branches or pull requests

2 participants