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

JDI spec: Wrong exit code returned after VirtualMachine.exit() on Linux

XMLWordPrintable

    • mantis
    • x86, itanium
    • linux
    • Verified



      Name: elR10090 Date: 05/15/2001



      Java Hotspot VM both merlin-beta (build 1.4.0-beta-b64) and
      ladybird-rc2 (build 1.3.1-b24) failed to pass the test

          nsk/jdi/VirtualMachine/exit/exit002

      on Linux platform. On the other platforms test passes successfully.

      This test checks if debuggee exits with specified exit code (9876)
      after VirtualMachine.exit() is invoked. When the debuggee process
      exits it returns unexpected exit code (-108).

      Debuggee is launched using nsk.jdi.share support classes,
      which launch it using default CommandLineLaunch connector and
      obtain Process object for the debuggee process. After
      VirtualMachine.exit() is invoked, support classes use Process.waitFor()
      to wait for debuggee process exits. Exit status code returned by this
      method found to be unequal to the expected one.

      Probably, this failure is related to the following bug:

        4397968 Process.waitFor returns incorrect exit status code on linux

      which is marked as fixed and integrated at Mar 1, 2001.

      This test will appear in the release r05 of testbase_nsk.
      Location of testbase_nsk is:

          /net/sqesvr.eng/export/vsn/VM/testbase/testbase_nsk.v14

      To reproduce the bug run 'doit.sh' script that is located here:

          /net/sqesvr.eng/export/vsn/GammaBase/Bugs/<this bug number>

      Use:
          sh doit.sh $JAVA_HOME

      Where $JAVA_HOME should point to merlin-b64 or ladybird-24 on Linux.

      Running against merlin-b64 on Linux test produces following log:
      ----------------------------------------------------------------
      Compiling support classes...
      Compiling test classes...
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -deprecation for details.
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b64)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b64, mixed mode)
      binder> Listening for a pipe connection to port: 7000
      binder> Binding to pipe socket
      binder> Listening to pipe server socket
      binder> VirtualMachineManager: version 1.4
      binder> FindingConnector: default
      binder> LaunchingConnector:
      binder> name: com.sun.jdi.CommandLineLaunch
      binder> description: Launches target using Sun Java VM command line and
      attaches to it
      binder> transport: dt_socket
      binder> Connector arguments:
      binder>
      home=/.automount/novo172/root/export/home/java/dest/jdk1.4.0beta-b64/linux-i386
      binder> vmexec=java
      binder> options= -classpath
      ".:/export/ld24/java/hotspot/jdk1.4/linux/lib/tools.jar"
      binder> main=nsk.jdi.VirtualMachine.exit.exit002a -vbs "-verbose"
      binder> quote="
      binder> suspend=true
      binder> Launch debugee
      --> debugger: issuspended002a debuggee launched
      test.pipe> Waiting for pipe connection
      debugee.err> **> exit002a: debuggee started!
      --> debugger: 'ready' recieved

      ==> nsk/jdi/VirtualMachine/exit/exit002 TESTING BEGINS
      debugee.err> **> exit002a: waiting for an instruction from the debugger ...
      --> debugger: ......vm.exit(testedReturnCode);
      debugee.err> **> exit002a: performing loop of waiting; neither normal end
      nor Exception is expected
      ##> debugger: debuggee returned UNEXPECTED exit status: -108 (expected 9876)

      ==> nsk/jdi/VirtualMachine/exit/exit002 TESTING ENDS
      TEST FAILED
      binder> Closing pipe server socket
      test.pipe> Closing pipe socket
      Java exit code= 97
      ----------------------------------------------------------------

      This bug also affects the following tests from testbase_nsk:

          nsk/jdwp/VirtualMachine/Exit/exit001

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

            busersunw Btplusnull User (Inactive)
            latkinsunw Latkin Latkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: