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

SA-JDI: SAPIDAttachingConnector.attach() causes debugger VM crash on Linux

XMLWordPrintable

    • beta2
    • x86
    • linux
    • Verified



      Name: ipR10196 Date: 01/08/2004


      --------------------------------------
      Test : nsk/sajdi/SAPIDAttachingConnector/attach/attach001
      VM : ClientVM, ServerVM
      Mode : all
      Platform : x86
      OS : Redhat Linux 9.0, Redhat AS 2.1
      JDK : 1.5.0-b32,b33
      ----------------------------------------

      JDK 1.5.0-b32 is the first build with SA-JDI connectors support.

      The SAPIDAttachingConnector crashes debugger VM while attaching to
      debuggee process with AttachingConnector.attach(). DebugServer
      used for debugging remote VM process is also crashed while attaching
      to debuggee VM.

      This crash occurs only on Linux platform. On Solaris this connector
      attaches successfully.

      Also after debugger has crashed, debuggee VM process sometimes
      is not terminated with 'kill -9' command and test may hang waiting
      for debuggee VM termination. I noticed this often on Redhat Linux 9.0
      and never on Redhat AS 2.1.

      As all SA-JDI tests are using SAPIDAttachingConnector by default,
      this causes all SA-JDI tests to fail on Linux.

      To reproduce the failure:
        cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
        sh build.sh $JAVA_HOME
        sh run.sh [-g] [-v] $JAVA_HOME [JAVA_OPTS]
      where
          -g - run test with java_g binaries
          -v - run test in verbose mode

      Here is test output (see also full crash dump in comments):
      ==================================================================
      $ sh run.sh -v $JDK
      Run: nsk/sajdi/SAPIDAttachingConnector/attach/attach001
      script>
      script> Check if feature not implemented: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
      script> Feature is implemented: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
      script>
      script> Run SA-JDI test:
      script> DEBUGGER_CLASS: nsk/sajdi/SAPIDAttachingConnector/attach/attach001
      script> DEBUGGEE_CLASS: nsk/sajdi/SAPIDAttachingConnector/attach/attach001a
      script> TEST_OPTS: -arch=linux -waittime=1 -debugee.vmkind=java -connector=attaching_pid -debugee.vmkeys= -verbose
      script> CONNECTOR_NAME: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
      script> SERVER_CONNECT:
      script> DEBUGGER_JAVA: /export/ld24/java/hotspot/jdk1.5/linux/bin/java
      script> JAVA_OPTS:
      script> DEBUGGEE_JAVA: /export/ld24/java/hotspot/jdk1.5/linux/bin/java
      script> JAVA_OPTS:
      script>
      script> Check if generated files exist: debuggee.status DebugServer.status
      script>
      script> Run debuggee: nsk/sajdi/SAPIDAttachingConnector/attach/attach001a
      script> Debuggee VM process started with pid: 2814
      script>
      script> Wait for debuggee class to become ready within timeout: 60 seconds
      script> - not ready: 0 seconds
      Debuggee class started
      Debuggee class ready for debugging
      DEBUGGEE_READY_FOR_DEBUGGING
      script> Debuggee VM got ready for debugging
      script>
      script> Run debugger: nsk/sajdi/SAPIDAttachingConnector/attach/attach001
      Check AttachingConnector.attach() with sa-jdi connector:
          connector: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
          pid: 2814
      Find connector in VirtualMachineManager.attachingConnectors():
          name: com.sun.jdi.SocketAttach
          name: sun.jvm.hotspot.jdi.SACoreAttachingConnector
          name: sun.jvm.hotspot.jdi.SADebugServerAttachingConnector
          name: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
      Found AttachingConnector:
          name: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
          transport: null
          description: This connector allows you to attach to a Java process using the Serviceability Agent
      Set arguments for AttachingConnector:
          name: pid, value: 2814
      Attaching to target VM
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # SIGSEGV (0xb) at pc=0x4e51388c, pid=2826, tid=8201
      #
      # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta2-b33 mixed mode)
      # Problematic frame:
      # C [libsaproc.so+0x188c]
      #
      # An error report file with more information is saved as hs_err_pid2826.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      share/sajdi/run_sajdi.sh: line 449: 2826 Aborted $JAVA $JAVA_OPTS $DEBUGGER_CLASS "$@" $EXTRA_TEST_OPTS
      script> Debugger finished with exit status: 134
      script> # ERROR: Debugger class returned fail status: 134
      script>
      script> Kill debuggee VM process for pid: 2814
      script> Wait for debuggee VM process terminated: 2814
      share/sajdi/run_sajdi.sh: line 497: 2814 Killed $DEBUGGEE_JAVA $DEBUGGEE_JAVA_OPTS $DEBUGGEE_CLASS "$@"
      $EXTRA_TEST_OPTS
      script> Debuggee VM terminated with exit status: 137
      script>
      script> Test exit status: 97
      Test exit status: 97
      ==================================================================

      Ivan Popov <###@###.###>

      ======================================================================

            sundar Sundararajan Athijegannathan
            popovsunw Popov Popov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: