[AIX] Wrong object class or methodID passed to JNI call in TestSharedCloseJvmti

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 26
    • Component/s: core-libs
    • None

      The new test java/foreign/sharedclosejvmti/TestSharedCloseJvmti.java fails on AIX:
      [fork] FATAL ERROR in native method: Wrong object class or methodID passed to JNI call
      [fork] at jdk.internal.foreign.MemorySessionImpl.checkValidStateRaw(java.base@26-internal/MemorySessionImpl.java:206)
      [fork] at jdk.internal.foreign.MemorySessionImpl.checkValidState(java.base@26-internal/MemorySessionImpl.java:215)
      [fork] at jdk.internal.foreign.SegmentFactories.allocateNativeInternal(java.base@26-internal/SegmentFactories.java:189)
      [fork] at jdk.internal.foreign.SegmentFactories.allocateNativeSegment(java.base@26-internal/SegmentFactories.java:181)
      [fork] at jdk.internal.foreign.ArenaImpl.allocate(java.base@26-internal/ArenaImpl.java:56)
      [fork] at jdk.internal.foreign.ArenaImpl.allocate(java.base@26-internal/ArenaImpl.java:31)
      [fork] at java.lang.foreign.SegmentAllocator.allocate(java.base@26-internal/SegmentAllocator.java:644)
      [fork] at TestSharedCloseJvmti$EventDuringScopedAccessRunner.<clinit>(TestSharedCloseJvmti.java:75)

      The native stack shows more details:
      0x000000011023bc10 - 0x09000000092810a8 libjvm.so::jniCheck::validate_jmethod_id(JavaThread*, _jmethodID*)+0x128 (C++ uses_alloca saves_lr stores_bc gpr_saved:4 fixedparms:2 parmsonstk:1)
      0x000000011023bca0 - 0x0900000009280b48 libjvm.so::jniCheck::validate_call(JavaThread*, _jclass*, _jmethodID*, _jobject*)+0xc8 (C++ uses_alloca saves_cr saves_lr stores_bc gpr_saved:7 fixedparms:4 parmsonstk:1)
      0x000000011023bd50 - 0x09000000092a35d0 libjvm.so::checked_jni_CallStaticVoidMethodV+0x190 (C++ uses_alloca saves_lr stores_bc gpr_saved:8 fixedparms:4 parmsonstk:1)
      0x000000011023be10 - 0x0900000003ce5888 libSharedCloseAgent.so::JNIEnv_::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+0x48 (C++ saves_lr stores_bc fixedparms:3 parmsonstk:1)
      0x000000011023be90 - 0x0900000003ce5708 libSharedCloseAgent.so::method_exit(_jvmtiEnv*, JNIEnv_*, _jobject*, _jmethodID*, unsigned char, jvalue)+0x168 (C++ saves_lr stores_bc gpr_saved:6 fixedparms:6 parmsonstk:1)
      0x000000011023bf50 - 0x090000000a1ee234 libjvm.so::JvmtiExport::post_method_exit_inner(JavaThread*, methodHandle&, JvmtiThreadState*, bool, frame, jvalue&)+0x5d4 (C++ uses_alloca saves_cr saves_lr stores_bc gpr_saved:18 fixedparms:8 parmsonstk:1)
      0x000000011023c160 - 0x090000000a1ed9d0 libjvm.so::JvmtiExport::post_method_exit(JavaThread*, Method*, frame)+0x330 (C++ fp_present uses_alloca saves_cr saves_lr stores_bc gpr_saved:9 fixedparms:8 parmsonstk:1)
      0x000000011023c2a0 - 0x090000000a1ed4bc libjvm.so::InterpreterRuntime::post_method_exit(JavaThread*)+0x15c (C++ fp_present uses_alloca saves_lr stores_bc gpr_saved:5 fixedparms:1 parmsonstk:1)

      method_id is 0.

      stderr: [Exception in thread "main" java.lang.NoClassDefFoundError: TestSharedCloseJvmti$EventDuringScopedAccessRunner

            Assignee:
            Unassigned
            Reporter:
            Martin Doerr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: