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

JDI: Uncaught exception in debugee does not lead to VM exit

XMLWordPrintable

    • generic
    • generic



      Name: egR10015 Date: 12/13/2000



      The internal build (provided by Karen Kinnear) of
      HotSpot 1.3.1beta-b11 (build 1.3.1-internal) fails to pass the tests

      nsk/jdi/EventRequestManager/createExceptionRequest/crexreq003,
      nsk/jdi/EventRequestManager/createExceptionRequest/crexreq005,
      nsk/jdi/EventRequestManager/createExceptionRequest/crexreq007

      from testbase_nsk on all platforms (Solaris/Sparc, Linux and win32), except
      Solaris/x86.
      The tests hang in method Thread.join() when wait for a separate
      thread to die. This separate thread asynchronously listens to JDI events
      and exits after processing the exceptions InterruptedException or
      VMDisconnectedException. These exceptions are thrown by JDI method
      EventQueue.remove() if the connection to the target VM is no longer
      available (see source file share/EventListener.java from
      /net/sqesvr/export/vsn/GammaBase/Bugs/<this bug number>).

      For example please look at the test crexreq003 from GammaBase.
      This test consists of debugger program (see source file crexreq003.java)
      and debugee program (see source file crexreq003t.java).
      Debugee throws uncaught exception crexreq003tException which should lead
      to the VM exit, but actually the process with the target VM (debugee) does
      not really exit after throwing the exception. Therefore the previously
      mentioned event listener thread in the debugger VM never ends, and the main
      test program hangs.

      Note that with previous builds of HotSpot the tests fail with exit code 97
      due to a bug 4323439 (nevertheless the process with the target VM really
      exits after uncaught exception). Also the test crexreq003 passes
      with HotSpot 1.3.1-b11 (build 1.3.1beta-b11) on Solaris/x86,
      Linux and win32.

      To reproduce the bug run
      doit.ksh <jdk root directory> on Solaris/Sparc, Linux and win32
      in
      /net/sqesvr/export/vsn/GammaBase/Bugs/<this bug number>

      --- output on Linux with with HS 1.3.1-b11 (build 1.3.1-internal) ---
      $ ./doit.ksh /home/eug/novo73/hotspot/jdk1.3.1ph/linux
      Note: crexreq003.java uses or overrides a deprecated API.
      Note: Recompile with -deprecation for details.
      java version "1.3.1beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1beta-b11)
      Java HotSpot(TM) Client VM (build 1.3.1-internal, mixed mode)
      thread 80aa158 resume depth=1
      VirtualMachineManager: version 1.3
      LaunchingConnector:
          name: com.sun.jdi.CommandLineLaunch
          description: Launches target using Sun Java VM command line and attaches to
      it
          transport: dt_socket
      Arguments:
      {home=home=/.automount/novo73/root/export/home2/java/hotspot/jdk1.3.1ph/linux,
      vmexec=vmexec=java, options=options=, main=main=crexreq003t, quote=quote=",
      suspend=suspend=true}
      <the test hangs>
      ^C
      --------------------------------------------------------------------

      ----- output on Linux with HS 1.3.1-b11 (build 1.3.1beta-b11) ------
      $ ./doit.sh /net/java10/export/home/java/dest/jdk1.3.1-b11/linux-i386
      Note: crexreq003.java uses or overrides a deprecated API.
      Note: Recompile with -deprecation for details.
      java version "1.3.1beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1beta-b11)
      Java HotSpot(TM) Client VM (build 1.3.1beta-b11, mixed mode)
      VirtualMachineManager: version 1.3
      LaunchingConnector:
          name: com.sun.jdi.CommandLineLaunch
          description: Launches target using Sun Java VM command line and attaches to
      it
          transport: dt_socket
      Arguments:
      {home=home=/.automount/java10/root/export/home/java/dest/jdk1.3.1-b11/linux-i386
      , vmexec=vmexec=java, options=options=, main=main=crexreq003t, quote=quote=",
      suspend=suspend=true}
      Event name is
      VMStartEvent in thread main
      Exception in thread "main" crexreq003tException
              at crexreq003t.communication(crexreq003t.java:21)
              at crexreq003t.main(crexreq003t.java:12)
      com.sun.jdi.VMDisconnectedException: Socket closed
              at com.sun.tools.jdi.TargetVM.send(TargetVM.java:260)
              at
      com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:691)
              at com.sun.tools.jdi.PacketStream.send(PacketStream.java:44)
              at
      com.sun.tools.jdi.JDWP$VirtualMachine$Resume.enqueueCommand(JDWP.java:603)
              at
      com.sun.tools.jdi.VirtualMachineImpl$1.send(VirtualMachineImpl.java:280)
              at com.sun.tools.jdi.VMState.thawCommand(VMState.java:97)
              at
      com.sun.tools.jdi.VirtualMachineImpl.resume(VirtualMachineImpl.java:284)
              at com.sun.tools.jdi.EventSetImpl.resume(EventSetImpl.java:578)
              at nsk.jdi.share.EventListener.run(EventListener.java:50)
      <the test passes with exit code 95>
      --------------------------------------------------------------------

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

            rfield Robert Field (Inactive)
            eugsunw Eug Eug (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: