Skip to content

AOT jsr292Test test_bindTo_interfaceMethodImplementation_package - Successfully invoked package private implementation of an interface method, StackWalkerTest testClassLoaderName Wrong classloader name expected #19781

Closed

Description

@pshipton

https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_s390x_linux_aot_Personal/232/
https://openj9-jenkins.osuosl.org/job/Test_openjdk11_j9_extended.functional_s390x_linux_aot_Personal_testList_1/270/
jsr292Test_1
https://openj9-jenkins.osuosl.org/job/Test_openjdk11_j9_extended.functional_s390x_linux_aot_Personal_testList_0/270
jsr292Test_0

=== AOT ITERATION 2 ===

07:27:01  FAILED: test_bindTo_interfaceMethodImplementation_package
07:27:01  java.lang.AssertionError: Successfully invoked package private implementation of an interface method.
07:27:01  	at org.testng.Assert.fail(Assert.java:96)
07:27:01  	at com.ibm.j9.jsr292.InterfaceHandleTest.test_bindTo_interfaceMethodImplementation_package(InterfaceHandleTest.java:102)

This is related so I didn't open another issue.

https://openj9-jenkins.osuosl.org/job/Test_openjdk11_j9_extended.functional_s390x_linux_aot_Personal_testList_0/270
StackWalkerTest_0

09:06:16  FAILED: testClassLoaderName
09:06:16  java.lang.AssertionError: Wrong classloader name expected [TestMyloaderInstance] but found [null]
09:06:16  	at org.testng.Assert.fail(Assert.java:96)
09:06:16  	at org.testng.Assert.failNotEquals(Assert.java:776)
09:06:16  	at org.testng.Assert.assertEqualsImpl(Assert.java:132)
09:06:16  	at org.testng.Assert.assertEquals(Assert.java:118)
09:06:16  	at org.testng.Assert.assertEquals(Assert.java:453)
09:06:16  	at org.openj9.test.stackWalker.MyRunnable.run(MyRunnable.java:45)
09:06:16  	at org.openj9.test.stackWalker.StackWalkerTest.testClassLoaderName(StackWalkerTest.java:243)

Changes from last successful build https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-AOT/291/
bc7affe...581a248
eclipse-openj9/openj9-omr@3a218f2...7709363
ibmruntimes/openj9-openjdk-jdk11@839808e...720cbbf

Activity

  1. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor
  2. dsouzai commented on Jun 28, 2024

    @dsouzai
    Contributor

    These are the changes in omr and openj9:

    OMR:

    * 8aa948709d - x86-64: Use rep movs instructions if array copy size greater than 32 bytes <Annabelle Huo> (Mon Jun 17 11:26:23 2024 -0400)
    * de2d500de7 - Fix trace format for MemorySubSpace <Aleksandar Micic> (Mon Jun 17 13:12:16 2024 -0400)
    * 803891a474 - Delete TR::SelectOpt, which is unused <Devin Papineau> (Thu Jun 13 14:09:22 2024 -0400)
    * ff2d7abe63 - Revert "Change arraycmp length child to 64 bits" <Henry Zongaro> (Fri Jun 14 12:00:40 2024 -0400)
    * 512f1b8434 - AArch64: Improve *cmp*-*select instruction sequence <KONNO Kazuhiro> (Tue Jun 11 10:54:16 2024 +0900)
    * 0d01543c22 - Add option to enable vector API <Bradley Wood> (Wed Jun 12 11:50:48 2024 -0400)
    * 9589a576ef - Change arraycmp length child to 64 bits <Spencer Comin> (Wed May 1 09:46:39 2024 -0400)
    * 51f86018b1 - Fix omrgenerate_ieat_dump.s assembly instruction to load 64 bit <Gaurav Chaudhari> (Fri May 17 11:12:17 2024 -0400)
    * b39e1640ac - omr_static_lib/makefile should not compile anything <Keith W. Campbell> (Tue Jun 11 10:35:23 2024 -0400)
    * c92cfa9848 - Update GCC version in C++ supported features documentation <Nathan Henderson> (Tue Jun 11 07:39:48 2024 -0700)
    

    OpenJ9:

    * b7c75245fb - Adds compatibility to get docker image from non-default registry <Mahdi Ardekanian> (Wed Jun 19 12:44:11 2024 -0400)
    * f6164c9923 - Fix J9NLS_VM_UNRECOGNISED_SUN_MISC_UNSAFE_MEMORY_ACCESS_VALUE <Peter Shipton> (Wed Jun 19 09:40:05 2024 -0400)
    * 13951bc426 - Ignore ByteBufferHandle operations in unsafe fast path <Devin Papineau> (Mon Jun 17 16:36:59 2024 -0400)
    * 33cd27028e - Use sighandler_t instead of sig_handler_t <Keith W. Campbell> (Tue Jun 18 09:50:45 2024 -0400)
    * bc1403159a - Remove some value type q cases <Theresa Mammarella> (Thu Oct 5 16:38:14 2023 -0400)
    * 4ab337625f - Avoid NPE in testThreadMXBeanProxy debug output <Peter Shipton> (Mon Jun 17 17:09:00 2024 -0400)
    * 0af9b126d6 - Remove extra newline chars from j9mprotect/j9munprotect.s <Gaurav Chaudhari> (Mon Jun 17 10:18:39 2024 -0700)
    * 3723e4166a - Split IllegalAccessProtectedMethodTest to openj9 and hotspot variant - Split IllegalAccessProtectedMethodTest due to extendedHCR setting <LongyuZhang> (Mon Jun 17 10:01:51 2024 -0400)
    * c0199d3e9b - Avoid NPE and AIOOBE exceptions <Keith W. Campbell> (Fri Jun 14 17:09:00 2024 -0400)
    * 921596d25b - Format <Keith W. Campbell> (Fri Jun 14 17:02:05 2024 -0400)
    * 6125cb98d4 - [FFI/Test_JDK21+] Convert the native string for downcall on z/OS <ChengJin01> (Wed Jun 12 15:16:44 2024 -0400)
    * 4d9a1a9f7f - Disable failing ValueTypeTests <Theresa Mammarella> (Fri Jun 14 09:56:04 2024 -0400)
    * da2a754720 - Modify testIdentityObjectOnJLObject to match ri <Theresa Mammarella> (Wed Jun 12 13:50:43 2024 -0400)
    * 1cfbd5d6e7 - Remove tests to match lw5 <Theresa Mammarella> (Wed Jun 12 11:10:41 2024 -0400)
    * ca48415479 - Replace q signatures with NullRestricted attribute <Theresa Mammarella> (Wed Jun 12 10:09:54 2024 -0400)
    * ebe8f16b17 - Remove unused ValueTypeTests method and myUnsafe <Theresa Mammarella> (Wed Jun 12 09:51:59 2024 -0400)
    * 3b17734737 - Delete the unused build flag build_openj9JDK8 <Peter Shipton> (Fri Jun 14 14:56:17 2024 -0400)
    * fa7829da0b - JDK24 bring up <Jason Feng> (Fri Jun 14 11:49:02 2024 -0400)
    * 6336ad3488 - Removed unused configuration flag 'build_openj9' <Keith W. Campbell> (Mon Jun 3 14:43:44 2024 -0400)
    * ac7713d0ec - [FFI/JDK22+] Remove the heap argument identifier in downcall <ChengJin01> (Tue Jun 11 15:22:39 2024 -0400)
    

    I went through the JIT changes and nothing really stood out. Might need to do the thing where we run grinders with builds where we first revert all the OMR changes, and then binary search through the J9 changes.

    Probably also worth running a grinder on the failing tests to see how frequently it fails to get a baseline failure rate.

  3. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor

    Before we start making custom builds, I can run grinders on the existing nightly builds and try to narrow it further.

  4. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor

    Failed on 20240611-203600/20240611_822
    passed on 20240610-202914/20240610_821

    bc7affe...58b586d
    eclipse-openj9/openj9-omr@361c9df...8735090

    14:36:26  OpenJDK Runtime Environment (build 11.0.24-internal+0-adhoc.jenkins.BuildJDK11s390xlinuxNightly)
    14:36:26  Eclipse OpenJ9 VM (build master-bc7affe3fed, JRE 11 Linux s390x-64-Bit Compressed References 20240610_821 (JIT enabled, AOT enabled)
    14:36:26  OpenJ9   - bc7affe3fed
    14:36:26  OMR      - 361c9df886c
    14:36:26  JCL      - 839808e0d9f based on jdk-11.0.24+6)
    
    14:27:25  OpenJDK Runtime Environment (build 11.0.24-internal+0-adhoc.jenkins.BuildJDK11s390xlinuxNightly)
    14:27:25  Eclipse OpenJ9 VM (build master-58b586d83e7, JRE 11 Linux s390x-64-Bit Compressed References 20240611_822 (JIT enabled, AOT enabled)
    14:27:25  OpenJ9   - 58b586d83e7
    14:27:25  OMR      - 87350903300
    14:27:25  JCL      - 839808e0d9f based on jdk-11.0.24+6)
    
  5. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor

    I'll create some custom builds. Doesn't look like any OMR change would cause it.

  6. dsouzai commented on Jun 28, 2024

    @dsouzai
    Contributor

    Because this is AOT, maybe Make option -Xshareclasses enable -XX:+ShareOrphans?

    None of the JIT changes really seem to have anything relocatable related 😕

  7. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor
  8. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor

    If that one is the cause, it's adding classes to the cache which aren't normally cached, which allows AOT on them. I expect we'll need to debug why that AOT is causing the test failures.

  9. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor

    I've confirmed that Make option -Xshareclasses enable -XX:+ShareOrphans is the cause.

  10. dsouzai commented on Jun 28, 2024

    @dsouzai
    Contributor

    I expect we'll need to debug why that AOT is causing the test failures.

    Yeah I wonder if the AOT validations aren't strong enough to handle these new classes.

  11. pshipton commented on Jun 28, 2024

    @pshipton
    MemberAuthor
  12. hangshao0 commented on Jun 28, 2024

    @hangshao0
    Contributor

    For the testClassLoaderName test failure, the class is loaded from a custom class loader. It might be related to the romClass being in the SCC are all attached to the bootstrap class loader.

    In this piece of code:

    romClass = findROMClassFromPC(vmThread, methodPC, &classLoader);
    if (NULL != romClass) {
    J9UTF8 const *utfClassName = J9ROMCLASS_CLASSNAME(romClass);
    ramClass = peekClassHashTable(vmThread, classLoader, J9UTF8_DATA(utfClassName), J9UTF8_LENGTH(utfClassName));
    if (j9shr_Query_IsAddressInCache(vm, romClass, romClass->romSize)) {
    if (ramClass == NULL) {
    /* Probe the application loader to determine if it has the J9Class for the current class.
    * This secondary probe is required as all ROMClasses from the SCC appear to be owned
    * by the bootstrap classloader.
    */
    ramClass = peekClassHashTable(vmThread, vm->applicationClassLoader, J9UTF8_DATA(utfClassName), J9UTF8_LENGTH(utfClassName));

    The classLoader will be set to bootstrap class loader if the romClass is from SCC and ramClass is null if it is not loaded by bootstrap or application class loader, which is the case here. I guess getStackTraceIterator() won't set the class loader name in this case.

    We already have this behaviour for all custom SCC aware class loaders. The custom class loader here is not SCC aware but #19679 starts to put its class into SCC.

  13. hangshao0 commented on Jul 4, 2024

    @hangshao0
    Contributor

    The InterfaceHandleTest failure is caused by incorrect romClass comparison result. The class comparison skipped the ROM_CLASS_MODIFIERS, and compareROMClassForEquality() returned TRUE for 2 classes with different modifiers.

    case ROM_CLASS_MODIFIERS:
    if (u32Value == (u32Value & _context->romMethodModifiers())) {
    /*It's ok if the existing rom class has extra debug information and it is not required*/
    return false;

    [2024-06-20T11:27:01.681Z] PASSED: test_bindTo_interfaceMethodImplementation_public
    [2024-06-20T11:27:01.681Z] PASSED: testIfDirectHandleTestIsJitted
    [2024-06-20T11:27:01.681Z] FAILED: test_bindTo_interfaceMethodImplementation_package
    [2024-06-20T11:27:01.681Z] java.lang.AssertionError: Successfully invoked package private implementation of an interface method.
    [2024-06-20T11:27:01.681Z] 	at org.testng.Assert.fail(Assert.java:96)
    [2024-06-20T11:27:01.681Z] 	at com.ibm.j9.jsr292.InterfaceHandleTest.test_bindTo_interfaceMethodImplementation_package(InterfaceHandleTest.java:102)
    

    The class generated by test_bindTo_interfaceMethodImplementation_public is stored into SCC and then incorrectly re-used by test_bindTo_interfaceMethodImplementation_package via romClass comparison, so the test failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions