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

SIGSEGV in JavaThread::is_lock_owned

    XMLWordPrintable

Details

    • svc
    • b23
    • x86
    • linux

    Backports

      Description

        The following test failed in the JDK21 CI:

        applications/runthese/RunThese8H.java

        Here's snippets from the hs_err_pid file:

        # SIGSEGV (0xb) at pc=0x00007f2b1eb8e363, pid=3558129, tid=1440504
        #
        # JRE version: Java(TM) SE Runtime Environment (21.0+35) (build 21+35-LTS-2513)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (21+35-LTS-2513, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x8f9363] JavaThread::is_lock_owned(unsigned char*) const+0x23

        <snip>

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

        Current thread (0x00007f23f09ba260): JavaThread "Thread-1833141" daemon [_thread_in_vm, id=1440504, stack(0x00007f2524600000,0x00007f2524700000) (1024K)] _threads_hazard_ptr=0x00007f25c88e3bb0

        Stack: [0x00007f2524600000,0x00007f2524700000], sp=0x00007f25246fdf40, free space=1015k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x8f9363] JavaThread::is_lock_owned(unsigned char*) const+0x23 (monitorChunk.hpp:40)
        V [libjvm.so+0xea3a84] Threads::owning_thread_from_monitor(ThreadsList*, ObjectMonitor*)+0xd4 (threads.cpp:1214)
        V [libjvm.so+0xe9f65a] ThreadSnapshot::initialize(ThreadsList*, JavaThread*)+0x1fa (threadService.cpp:948)
        V [libjvm.so+0xe9f914] ThreadDumpResult::add_thread_snapshot(JavaThread*)+0x64 (threadService.cpp:573)
        V [libjvm.so+0xc01665] jmm_GetThreadInfo+0x4a5 (management.cpp:1133)
        J 1904181 sun.management.ThreadImpl.getThreadInfo1([JI[Ljava/lang/management/ThreadInfo;)V java.management@21 (0 bytes) @ 0x00007f2b0c159b95 [0x00007f2b0c159aa0+0x00000000000000f5]
        j sun.management.ThreadImpl.getThreadInfo([JI)[Ljava/lang/management/ThreadInfo;+60 java.management@21
        j sun.management.ThreadImpl.getThreadInfo(JI)Ljava/lang/management/ThreadInfo;+13 java.management@21
        j sun.management.ThreadImpl.getThreadInfo(J)Ljava/lang/management/ThreadInfo;+3 java.management@21
        j javasoft.sqe.tests.api.java.lang.management.ThreadInfo.ThreadInfo_addTests.ThreadInfo0027()Ljavasoft/sqe/javatest/Status;+103
        J 21627 c2 java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (14 bytes) @ 0x00007f2b08e02d6c [0x00007f2b08e02d20+0x000000000000004c]
        J 423344 c2 java.lang.invoke.LambdaForm$MH+0x00007f2668009800.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (35 bytes) @ 0x00007f2b08f946ac [0x00007f2b08f945e0+0x00000000000000cc]
        J 66077 c2 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (108 bytes) @ 0x00007f2b0a3cf400 [0x00007f2b0a3cef00+0x0000000000000500]
        j javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(Ljava/lang/reflect/Method;)Ljavasoft/sqe/javatest/Status;+8
        j javasoft.sqe.javatest.lib.MultiTest.run([Ljava/lang/String;Ljava/io/PrintWriter;Ljava/io/PrintWriter;)Ljavasoft/sqe/javatest/Status;+139
        j javasoft.sqe.javatest.lib.MultiTest.run([Ljava/lang/String;Ljava/io/PrintStream;Ljava/io/PrintStream;)Ljavasoft/sqe/javatest/Status;+46
        j javasoft.sqe.tests.api.java.lang.management.ThreadInfo.ThreadInfo_addTests.main([Ljava/lang/String;)V+16
        J 406357 c2 java.lang.invoke.LambdaForm$DMH+0x00007f2668002c00.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V java.base@21 (14 bytes) @ 0x00007f2b0cb2cdec [0x00007f2b0cb2cda0+0x000000000000004c]
        J 406358 c2 java.lang.invoke.LambdaForm$MH+0x00007f26680a1000.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (38 bytes) @ 0x00007f2b0ec17084 [0x00007f2b0ec16fe0+0x00000000000000a4]
        J 401516 c2 applications.kitchensink.process.stress.modules.JckStressModule$TestRunner$$Lambda+0x00007f266800dc00.run()V (24 bytes) @ 0x00007f2b094db2bc [0x00007f2b094dae80+0x000000000000043c]
        J 36726 c2 java.lang.Thread.run()V java.base@21 (23 bytes) @ 0x00007f2b0a2ae3d0 [0x00007f2b0a2ae320+0x00000000000000b0]
        v ~StubRoutines::call_stub 0x00007f2b08070cbf
        V [libjvm.so+0x8dd585] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x2e5 (javaCalls.cpp:415)
        V [libjvm.so+0x8def02] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x1d2 (javaCalls.cpp:329)
        V [libjvm.so+0x9acd5e] thread_entry(JavaThread*, JavaThread*)+0x8e (jvm.cpp:2919)
        V [libjvm.so+0x8f36f8] JavaThread::thread_main_inner() [clone .part.0]+0xb8 (javaThread.cpp:719)
        V [libjvm.so+0xe97ed8] Thread::call_run()+0xa8 (thread.cpp:217)
        V [libjvm.so+0xcbe25a] thread_native_entry(Thread*)+0xda (os_linux.cpp:778)
        Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
        J 1904181 sun.management.ThreadImpl.getThreadInfo1([JI[Ljava/lang/management/ThreadInfo;)V java.management@21 (0 bytes) @ 0x00007f2b0c159b1e [0x00007f2b0c159aa0+0x000000000000007e]
        j sun.management.ThreadImpl.getThreadInfo([JI)[Ljava/lang/management/ThreadInfo;+60 java.management@21
        j sun.management.ThreadImpl.getThreadInfo(JI)Ljava/lang/management/ThreadInfo;+13 java.management@21
        j sun.management.ThreadImpl.getThreadInfo(J)Ljava/lang/management/ThreadInfo;+3 java.management@21
        j javasoft.sqe.tests.api.java.lang.management.ThreadInfo.ThreadInfo_addTests.ThreadInfo0027()Ljavasoft/sqe/javatest/Status;+103
        J 21627 c2 java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (14 bytes) @ 0x00007f2b08e02d6c [0x00007f2b08e02d20+0x000000000000004c]
        J 423344 c2 java.lang.invoke.LambdaForm$MH+0x00007f2668009800.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (35 bytes) @ 0x00007f2b08f946ac [0x00007f2b08f945e0+0x00000000000000cc]
        J 66077 c2 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (108 bytes) @ 0x00007f2b0a3cf400 [0x00007f2b0a3cef00+0x0000000000000500]
        j javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(Ljava/lang/reflect/Method;)Ljavasoft/sqe/javatest/Status;+8
        j javasoft.sqe.javatest.lib.MultiTest.run([Ljava/lang/String;Ljava/io/PrintWriter;Ljava/io/PrintWriter;)Ljavasoft/sqe/javatest/Status;+139
        j javasoft.sqe.javatest.lib.MultiTest.run([Ljava/lang/String;Ljava/io/PrintStream;Ljava/io/PrintStream;)Ljavasoft/sqe/javatest/Status;+46
        j javasoft.sqe.tests.api.java.lang.management.ThreadInfo.ThreadInfo_addTests.main([Ljava/lang/String;)V+16
        J 406357 c2 java.lang.invoke.LambdaForm$DMH+0x00007f2668002c00.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V java.base@21 (14 bytes) @ 0x00007f2b0cb2cdec [0x00007f2b0cb2cda0+0x000000000000004c]
        J 406358 c2 java.lang.invoke.LambdaForm$MH+0x00007f26680a1000.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@21 (38 bytes) @ 0x00007f2b0ec17084 [0x00007f2b0ec16fe0+0x00000000000000a4]
        J 401516 c2 applications.kitchensink.process.stress.modules.JckStressModule$TestRunner$$Lambda+0x00007f266800dc00.run()V (24 bytes) @ 0x00007f2b094db2bc [0x00007f2b094dae80+0x000000000000043c]
        J 36726 c2 java.lang.Thread.run()V java.base@21 (23 bytes) @ 0x00007f2b0a2ae3d0 [0x00007f2b0a2ae320+0x00000000000000b0]
        v ~StubRoutines::call_stub 0x00007f2b08070cbf

        siginfo: si_signo: 11 (SIGSEGV), si_code: 128 (SI_KERNEL), si_addr: 0x0000000000000000


        Since the crash occurred in JavaThread::is_lock_owned(), I could
        start this bug off in hotspot/runtime, but since that function is called
        from M&M VM code, I'm leaning toward hotspot/svc.

        Attachments

          Issue Links

            Activity

              People

                kevinw Kevin Walls
                dcubed Daniel Daugherty
                Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: