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

HPROF: option "net" causes VM to terminate with unexpected code on solaris

XMLWordPrintable

    • mantis
    • generic
    • solaris
    • Verified

      scribing this issue in more details.

      The test net001 will be available in the releases v14r12, v131r12 of testbase_nsk.
      ======================================================================

      Name: egR10015 Date: 02/10/2002


      This bug affects also the following test from testbase_nsk:

      nsk/hprof/options/net/net003

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


      Name: egR10015 Date: 02/01/2002



      Hprof agent shipped with HotSpot 1.4.0-b92 fails to pass the following test

      nsk/hprof/options/net/net001

      from testbase_nsk on Solaris/SPARC, Solaris/x86.
      The reason is that profiled VM terminates with unexpected code 1 instead of
      expected 95, though no crashes and/or no failures are observed. Note also
      that unexpected exit code never happens on other platforms such as Linux
      RH 6.2, Windows 2000.

      The test checks that HPROF profiler agent will send profiling data over
      a socket, specified by the option "net". It consists of the following
      files.
      net001.java contains a main class which starts profiled VM in a separate
      process and a special thread collecting the data and writing it out to the
      file net001.hprof.out.
      net001p.java contains an auxiliary class used for profiling itself.

      The problems also remains when profiled VM and server collecting the data
      are run as two separate programs mutually independent from each other.
      So, I suppose that issue is not in inorrectly working Java method
      Process.exitValue().

      To reproduce the bug run with HS1.4

      sh doit.sh $JAVA_HOME

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

      where JAVA_HOME should point to jdk1.4.0

      ------------------- output on SolSparc with HS 1.4.0-b92: ---------------------
      eug@novo171N12 sh doit.sh ~/hotspot/jdk1.4/solsparc
      Compiling support classes ...
      Note: share/Status.java uses or overrides a deprecated API.
      Note: Recompile with -deprecation for details.
      Compiling test classes ...
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      Executing the test ...
      Output file name: /export/ld24/java/eug/evaluation/GammaBase/bugdir/./net001.hprof.out
      Waiting for Server's thread ...
      Server: started
      Server: listening to the following address: localhost:55013
      Starting the command: /home/eug/hotspot/jdk1.4/solsparc/bin/java -Xrunhprof:net=localhost:55013 net001p

      Starting potential timed out section:
      waiting 2 minute(s) for profiled VM exit ...

      Server: socket: Socket[addr=/127.0.0.1,port=55014,localport=55013] accepted
      Server: read 1974 bytes from socket input stream
      Server: read 2014 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1068 bytes from socket input stream
      Server: read 2020 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1088 bytes from socket input stream
      Server: read 2026 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1025 bytes from socket input stream
      Server: read 2039 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 997 bytes from socket input stream
      Server: read 2035 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1034 bytes from socket input stream
      Server: read 2024 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1058 bytes from socket input stream
      Server: read 2033 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1040 bytes from socket input stream
      Server: read 2020 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1019 bytes from socket input stream
      Server: read 1994 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1008 bytes from socket input stream
      Server: read 2026 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1051 bytes from socket input stream
      Server: read 2037 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1061 bytes from socket input stream
      Server: read 2044 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1116 bytes from socket input stream
      Server: read 2047 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1066 bytes from socket input stream
      Server: read 2008 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1096 bytes from socket input stream
      Server: read 2010 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1096 bytes from socket input stream
      Server: read 2010 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1102 bytes from socket input stream
      Server: read 2034 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1067 bytes from socket input stream
      Server: read 1984 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1068 bytes from socket input stream
      Server: read 2013 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1069 bytes from socket input stream
      Server: read 2040 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1067 bytes from socket input stream
      Server: read 1991 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1055 bytes from socket input stream
      Server: read 2000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 993 bytes from socket input stream
      Server: read 2001 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1096 bytes from socket input stream
      Server: read 1997 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1106 bytes from socket input stream
      Server: read 1984 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1068 bytes from socket input stream
      Server: read 2040 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 293 bytes from socket input stream
      Server: read 2021 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1023 bytes from socket input stream
      Server: read 2044 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1058 bytes from socket input stream
      Server: read 2045 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1063 bytes from socket input stream
      Server: read 2016 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1064 bytes from socket input stream
      Server: read 2032 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1045 bytes from socket input stream
      Server: read 2027 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1097 bytes from socket input stream
      Server: read 2016 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1089 bytes from socket input stream
      Server: read 2039 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1095 bytes from socket input stream
      Server: read 2046 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1132 bytes from socket input stream
      Server: read 2047 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1122 bytes from socket input stream
      Server: read 2005 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1080 bytes from socket input stream
      Server: read 2024 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1120 bytes from socket input stream
      Server: read 2004 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1117 bytes from socket input stream
      Server: read 2041 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1102 bytes from socket input stream
      Server: read 2016 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1088 bytes from socket input stream
      Server: read 1986 bytes from socket input stream
      profiled VM stderr: Dumping Java heap ... allocation sites ... done.
      Server: read 2284 bytes from socket input stream
      Server: read EOF from socket input stream: -1
      Server: finished

      Potential timed out section successfully passed

      # ERROR: TEST FAILED: profiled VM has terminated with unexpected code = 1
      # ERROR: expected: 95


      #>
      #> SUMMARY: Following errors occured
      #> during test execution:
      #>
      # ERROR: TEST FAILED: profiled VM has terminated with unexpected code = 1
      # ERROR: expected: 95
      exit code = 97
      -------------------------------------------------------------------------------

      --------------------- output on Linux with HS 1.4.0-b92: ----------------------
      $ ~/hotspot/jdk1.4/linux/bin/java -version
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
      $ sh doit.sh ~/hotspot/jdk1.4/linux
      Compiling support classes ...
      Note: share/Status.java uses or overrides a deprecated API.
      Note: Recompile with -deprecation for details.
      Compiling test classes ...
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      Executing the test ...
      Output file name: /export/ld24/java/eug/evaluation/GammaBase/bugdir/./net001.hprof.out
      Server: started
      Waiting for Server's thread ...
      Server: listening to the following address: localhost:4272
      Starting the command: /home/eug/hotspot/jdk1.4/linux/bin/java -Xrunhprof:net=localhost:4272 net001p

      Starting potential timed out section:
              waiting 2 minute(s) for profiled VM exit ...

      Server: socket: Socket[addr=/127.0.0.1,port=4273,localport=4272] accepted
      Server: read 1974 bytes from socket input stream
      Server: read 2043 bytes from socket input stream
      Server: read 2008 bytes from socket input stream
      Server: read 2021 bytes from socket input stream
      Server: read 2016 bytes from socket input stream
      Server: read 2005 bytes from socket input stream
      Server: read 2033 bytes from socket input stream
      Server: read 2033 bytes from socket input stream
      Server: read 2009 bytes from socket input stream
      Server: read 2018 bytes from socket input stream
      Server: read 2003 bytes from socket input stream
      Server: read 2025 bytes from socket input stream
      Server: read 2004 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      profiled VM stderr: Dumping Java heap ... allocation sites ... done.
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 5000 bytes from socket input stream
      Server: read 1458 bytes from socket input stream
      Server: read EOF from socket input stream: -1
      Server: finished

      Potential timed out section successfully passed

      Profiled VM: exit code = 95
      exit code = 95
      -------------------------------------------------------------------------------

      There is also another problem which prevents the test from pass on Windows 2000.
      It seems like Hprof or underlying network support abruptly closes socket stream
      on that platform, and it leads to incomplete profiled data. I'm going to file
      a separate bug de

            dcubed Daniel Daugherty
            eugsunw Eug Eug (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: