Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8293010

JDI ObjectReference/referringObjects/referringObjects001 fails: assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking

XMLWordPrintable

    • b14
    • aarch64
    • os_x

        The following test failed in my jdk-20+12 stress testing:

        vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects001/referringObjects001.java

        Here's a snippet from the log file:

        debugee.stderr> Debuggee nsk.share.jdi.HeapwalkingDebuggee : sending the command: ready
        debugee.stderr> Debuggee: received the command: deleteInstances:java.lang.String:2
        debugee.stderr> Debuggee nsk.share.jdi.HeapwalkingDebuggee : sending the command: ready
        debugee.stderr> Debuggee: received the command: deleteReferrers:java.lang.String:5
        debugee.stderr> Debuggee nsk.share.jdi.HeapwalkingDebuggee : sending the command: ready
        debugee.stderr> Debuggee: received the command: createInstances:java.lang.String:4:10:JNI_LOCAL
        debugee.stderr> Debuggee nsk.share.jdi.HeapwalkingDebuggee : sending the command: ready
        debugee.stdout> # To suppress the following error report, specify this argument
        debugee.stdout> # after -XX: or in .hotspotrc: SuppressErrorAt=/jvmtiExport.cpp:1700
        debugee.stdout> #
        debugee.stdout> # A fatal error has been detected by the Java Runtime Environment:
        debugee.stdout> #
        debugee.stdout> # Internal Error (/System/Volumes/Data/work/shared/bug_hunt/thread_SMR_stress/jdk20_exp.git/open/src/hotspot/share/prims/jvmtiExport.cpp:1700), pid=83056, tid=40455
        debugee.stdout> # assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking
        debugee.stdout> #
        debugee.stdout> # JRE version: Java(TM) SE Runtime Environment (20.0) (slowdebug build 20-internal-2022-08-25-1408339.dcubed...)
        debugee.stdout> # Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 20-internal-2022-08-25-1408339.dcubed..., mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
        debugee.stdout> # Core dump will be written. Default location: /cores/core.83056
        debugee.stdout> #
        debugee.stdout> # An error report file with more information is saved as:
        debugee.stdout> # /System/Volumes/Data/work/shared/bug_hunt/thread_SMR_stress/jdk20_exp.git/build/macosx-aarch64-normal-server-slowdebug/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/scratch/10/hs_err_pid83056.log
        debugee.stdout> #
        debugee.stdout> # If you would like to submit a bug report, please visit:
        debugee.stdout> # https://bugreport.java.com/bugreport/crash.jsp
        debugee.stdout> #
        # ERROR: Unexpected exception: com.sun.jdi.VMDisconnectedException
        The following stacktrace is for failure analysis.
        nsk.share.TestFailure: Unexpected exception: com.sun.jdi.VMDisconnectedException
                at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
                at nsk.share.Log.complain(Log.java:403)
                at nsk.share.jdi.TestDebuggerType2.runIt(TestDebuggerType2.java:221)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.run(referringObjects001.java:89)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.main(referringObjects001.java:85)
                at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
                at java.base/java.lang.reflect.Method.invoke(Method.java:578)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:1589)
        com.sun.jdi.VMDisconnectedException
                at jdk.jdi/com.sun.tools.jdi.TargetVM.waitForReply(TargetVM.java:304)
                at jdk.jdi/com.sun.tools.jdi.VirtualMachineImpl.waitForTargetReply(VirtualMachineImpl.java:1176)
                at jdk.jdi/com.sun.tools.jdi.PacketStream.waitForReply(PacketStream.java:89)
                at jdk.jdi/com.sun.tools.jdi.JDWP$ReferenceType$Instances.waitForReply(JDWP.java:3006)
                at jdk.jdi/com.sun.tools.jdi.JDWP$ReferenceType$Instances.process(JDWP.java:2982)
                at jdk.jdi/com.sun.tools.jdi.ReferenceTypeImpl.instances(ReferenceTypeImpl.java:955)
                at nsk.share.jdi.HeapwalkingDebugger.getObjectReferences(HeapwalkingDebugger.java:224)
                at nsk.share.jdi.HeapwalkingDebugger.countNewInstances(HeapwalkingDebugger.java:189)
                at nsk.share.jdi.HeapwalkingDebugger.checkDebugeeAnswer_instanceCounts(HeapwalkingDebugger.java:180)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.testReferrerType(referringObjects001.java:160)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.testClass(referringObjects001.java:104)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.doTest(referringObjects001.java:254)
                at nsk.share.jdi.TestDebuggerType2.runIt(TestDebuggerType2.java:214)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.run(referringObjects001.java:89)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.main(referringObjects001.java:85)
                at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
                at java.base/java.lang.reflect.Method.invoke(Method.java:578)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:1589)
        # ERROR: TEST FAILED: debuggee's process finished with status: 134
        The following stacktrace is for failure analysis.
        nsk.share.TestFailure: TEST FAILED: debuggee's process finished with status: 134
                at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
                at nsk.share.Log.complain(Log.java:403)
                at nsk.share.jdi.TestDebuggerType2.quitDebuggee(TestDebuggerType2.java:202)
                at nsk.share.jdi.TestDebuggerType2.runIt(TestDebuggerType2.java:225)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.run(referringObjects001.java:89)
                at nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001.main(referringObjects001.java:85)
                at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
                at java.base/java.lang.reflect.Method.invoke(Method.java:578)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:1589)
        TEST FAILED


        #>
        #> SUMMARY: Following errors occured
        #> during test execution:
        #>
        # ERROR: Unexpected exception: com.sun.jdi.VMDisconnectedException
        # ERROR: TEST FAILED: debuggee's process finished with status: 134

        Here's the crashing thread's stack trace from the hs_err_pid file:

        --------------- T H R E A D ---------------

        Current thread (0x0000000158018410): JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_in_vm, id=40455, stack(0x0000000171328000,0x000000017152b000)]
                
        Stack: [0x0000000171328000,0x000000017152b000], sp=0x000000017152a2a0, free space=2056k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.dylib+0x101a624] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x868 (jvmtiExport.cpp:1700)
        V [libjvm.dylib+0x101ac54] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, char*)+0x68
        V [libjvm.dylib+0x560528] report_vm_error(char const*, int, char const*, char const*, ...)+0x88
        V [libjvm.dylib+0xb1ed98] JvmtiExport::post_object_free(JvmtiEnv*, GrowableArray<long>*)+0xb4
        V [libjvm.dylib+0xb48e5c] JvmtiTagMap::post_dead_objects(GrowableArray<long>*)+0x80
        V [libjvm.dylib+0xb4a8f4] JvmtiTagMap::follow_references(int, Klass*, _jobject*, jvmtiHeapCallbacks const*, void const*)+0x198
        V [libjvm.dylib+0xb01d08] JvmtiEnv::FollowReferences(int, _jclass*, _jobject*, jvmtiHeapCallbacks const*, void const*)+0x134
        V [libjvm.dylib+0xab38f0] jvmti_FollowReferences(_jvmtiEnv*, int, _jclass*, _jobject*, jvmtiHeapCallbacks const*, void const*)+0x188
        C [libjdwp.dylib+0x42ce0] classInstances+0x168
        C [libjdwp.dylib+0x9eb8] instances+0x9c
        C [libjdwp.dylib+0x1a5a8] debugLoop_run+0x210
        C [libjdwp.dylib+0x387b8] connectionInitiated+0xf8
        C [libjdwp.dylib+0x38318] attachThread+0x7c
        V [libjvm.dylib+0xb2b010] JvmtiAgentThread::call_start_function()+0x74
        V [libjvm.dylib+0xb2af44] JvmtiAgentThread::start_function_wrapper(JavaThread*, JavaThread*)+0x60
        V [libjvm.dylib+0x8beb1c] JavaThread::thread_main_inner()+0x118
        V [libjvm.dylib+0x8be9f8] JavaThread::run()+0x124
        V [libjvm.dylib+0xf76a64] Thread::call_run()+0x154
        V [libjvm.dylib+0xd4b524] thread_native_entry(Thread*)+0x138
        C [libsystem_pthread.dylib+0x7878] _pthread_start+0x140

              sspitsyn Serguei Spitsyn
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: