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

HotSpot VM: Process.getInputStream().read() method hangs for destroyed Process

XMLWordPrintable

    • x86
    • windows_nt



      Name: dkC59003 Date: 02/10/2000


      The regression test (testbase_nsk) nsk/regression/regresab37 fails
      under the HotSpot Client VM (build 1.3.0rc1-S) on win32.

      The test generates the Process by the
      runtime.exec(command, environment[]) method, where command is
      "jdb regresab37a". In 15 seconds the test destroys the Process
      and then tries to read from the Process OutputStream. After
      successful reading of few bytes the read() method hangs.

      The test does not hang if System.exit() method is called
      in the regresab37a class.

      To reproduce the bug run doit.bat on win32 in
      /net/sqesvr/vsn/GammaBase/Bugs/<this bug number>.

      The first parameter for doit.bat should be JDK root directory
      (e.g. L:/java/jdk1.3/win32) and the other parameter(s) -
      VM option(s) (optional).

      The doit.bat file contains the variables which must be tuned :

      The JDB_COMMAND variable defines the executed JDB
      (e.g. L:/java/jdk1.3/win32/bin/jdb).

      The OUT_SIZE_LIMIT variable defines the number of bytes to read
      from the Process OutputStream. For OUT_SIZE_LIMIT=-1 the number
      of bytes is not limited. For OUT_SIZE_LIMIT=-2 the number
      of bytes is not limited too and the output.read() method tracing
      is turned on. This helps to find out on which byte the
      hanging happens.

      If the reading from the OutputStream completes successfuly
      the reading from the ErrorStream hangs.
      Therefore there is the ERROR_SIZE_LIMIT variable in the doit.bat file
      which is similar to the OUT_SIZE_LIMIT variable.

      The same results are produced under the HotSpot Server VM
      (2.0merlin, mixed mode, build A) on Win32.

      The HotSpot Client VM (build 1.3.0rc1-S, interpreted mode) on Solaris
      runs the test perfectly. To run the test on Solaris use doit.sh.


      See logs:

      On Win32:

      % doit.bat d:\bond\java\dest\jdk1.3.0T\win32
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)

      ==> nsk/regression/regresab37 test LOG:
      ---> test OPTIONs:
      ----> out_size_limit to read - unlimited
      ----> output.read() tracing - off
      ----> error_size_limit to read - unlimited
      ----> error.read() tracing - off
       
      ----> regresab37a PROCESS is created:
      ----> Command: d:\bond\java\dest\jdk1.3.0T\win32\bin\jdb regresab37a
      ----> regresab37a PROCESS has not finished during 15 seconds => It has been destroyed!
      ----> reading from regresab37a PROCESS OutputStream:
      <hanging>
       

      % doit.bat d:\bond\java\dest\jdk1.3.0T\win32
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)

      ==> nsk/regression/regresab37 test LOG:
      ---> test OPTIONs:
      ----> out_size_limit to read - 213
      ----> output.read() tracing - off
      ----> error_size_limit to read - unlimited
      ----> error.read() tracing - off
       
      ----> regresab37a PROCESS is created:
      ----> Command: d:\bond\java\dest\jdk1.3.0T\win32\bin\jdb regresab37a
      ----> regresab37a PROCESS has not finished during 15 seconds => It has been destroyed!
      ----> reading from regresab37a PROCESS OutputStream:
      ----> reading from regresab37a PROCESS OutputStream COMPLETED
      ----> regresab37a PROCESS.OUT_SIZE = 213
      ----> regresab37a PROCESS.OUT: --------------------
      Initializing jdb...
      > run regresab37a
      Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored
      >
      VM Started: -> regresab37a PROCESS STARTED
       -> regresab37a PROCESS: loop_counter = 0
      ----> END of regresab37a PROCESS.OUT: ----------------

      ----> reading from regresab37a PROCESS ErrorStream:
      <hanging>


      On Solaris:

      doit.sh /net/java7/d/bond/java/dest/jdk1.3.0T/solaris
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, interpreted mode)

      ==> nsk/regression/regresab37 test LOG:
      ---> test OPTIONs:
      ----> out_size_limit to read - unlimited
      ----> output.read() tracing - off
      ----> error_size_limit to read - unlimited
      ----> error.read() tracing - off
       
      ----> regresab37a PROCESS is created:
      ----> Command: /net/java7/d/bond/java/dest/jdk1.3.0T/solaris/bin/jdb regresab37a
      ----> regresab37a PROCESS has not finished during 15 seconds => It has been destroyed!
      ----> reading from regresab37a PROCESS OutputStream:
      ----> reading from regresab37a PROCESS OutputStream COMPLETED
      ----> regresab37a PROCESS.OUT_SIZE = 252
      ----> regresab37a PROCESS.OUT: --------------------
      Initializing jdb...
      > run regresab37a
      Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored
      >
      VM Started: -> regresab37a PROCESS STARTED
       -> regresab37a PROCESS: loop_counter = 0
       -> regresab37a PROCESS: loop_counter = 1

      ----> END of regresab37a PROCESS.OUT: ----------------

      ----> reading from regresab37a PROCESS ErrorStream:
      ----> reading from regresab37a PROCESS ErrorStream COMPLETED
      ----> regresab37a PROCESS.ERROR_SIZE = 0
      ==> nsk/regression/regresab37 test PASSED


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

            Unassigned Unassigned
            dkhukhrosunw Dmitry Khukhro (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: