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

Server VM crashed while handling SIGQUIT

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.3.0, 1.3.1, 1.3.1_03, 1.4.0
    • Fix Version/s: 1.3.1_05
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      05
    • CPU:
      generic, x86, sparc
    • OS:
      generic, linux, solaris_2.6, solaris_7, solaris_8, windows_nt

      Backports

        Description



        Name: kb87695 Date: 07/26/2001


        The problem is that the VM will crash when handling SIGQUIT by user to print the stack trace of threads.
        The failure may occur only when a thread is in native code which has been called from compiled code.

        It is easily reproducible in 1.4 and 1.3.1 with the server VM since the code is generated by the server compiler.
        It does not fail with the client VM.

        hppdl694:/net/yadoking/extra/liangg/JAGad74432_sigquit$ java_g -server -version
        java version "1.3.1"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
        Java HotSpot(TM) Server VM (build 1.3.1-b24-debug, mixed mode)

        1, Save the simple testcase hi.java.

        public class hi {
            public static void main( String argv[] ) {
                while (true)
                    System.out.print( "." );
            }
        }

        2, Compile it by javac hi.java.

        3, Run it by type on the command line
        $java_g -server hi

        4, Keep sending SIGQUIT by repeatedly pressing Ctrl-\. You will get the stack trace and the dumb output of millions of dot, and finally the VM crash message. Be patient while trying to crash the VM by signaling SIGQUIT, because the code that calls Java_java_io_FileOutputStream_writeBytes has to be compiled.

        The possible reason is that the _last_native_pc field in the JavaThread object does not contain the return pc after the native call. The code responsible for patching the load pc is in Compile::Compute_size(), where the code in question is flagged with the comment "// LNPC".
        This code assumes that the load pc and call are in the same basic block. It fails silently if they are not.

        Sample output and error message is attached below.
        ..............................................................................................................................................^\..Full thread dump:

        "Signal Dispatcher" daemon prio=10 tid=0x1387b8 nid=0xa runnable [0..0]

        "Finalizer" daemon prio=8 tid=0x1335f8 nid=0x7 waiting on monitor [0xfa381000..0xfa381814]
                at java.lang.Object.wait(Native Method)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
                at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)

        "Reference Handler" daemon prio=10 tid=0x131d08 nid=0x6 waiting on monitor [0xfd681000..0xfd681814]
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)

        "main" prio=5 tid=0x3a698 nid=0x1 runnable [0xffbee000..0xffbee81c]
        #
        # HotSpot Virtual Machine Error, Internal Error
        # Please report this error at
        # http://java.sun.com/cgi-bin/bugreport.cgi
        #
        # Fatal: scope must be present
        #
        # Error happened during: print threads
        #
        # Error ID: /usr/re/hotspot/hotspot1.3.1/ws/solsparc/hotspot1.3.1fcs/src/share/vm/code/nmethod.cpp, 358 [ Patched ]
        #
        # Problematic Thread: prio=5 tid=0x130830 nid=0x4 runnable
        #
        Dumping core....
        Abort
        (Review ID: 128215)
        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                cclicksunw Clifford Click (Inactive)
                Reporter:
                kevibrow Kevin Brown
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: