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

REGRESSION : Error ID: 4F530E43505002CC 01 occured with -server mode

XMLWordPrintable

    • sparc
    • solaris_7



      Name: rmT116609 Date: 07/12/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)



      bash-2.03$ javac -O java_test_io.java
      bash-2.03$ /net/pepsi/usr/local/j2re1_3_1/bin/java -server java_test_io
      Writing bytes: 7.676sec/20000rec (avg len=846), 2605 record/sec, 16920 Kbytes:
      2204 Kbyte/sec

      Unexpected Signal : 11 occurred at PC=0xfe1058ec
      Function name=JVM_GetCPMethodClassNameUTF
      Library=/net/pepsi/usr/local/j2re1_3_1/lib/sparc/server/libjvm.so

      Current Java thread:

      Dynamic libraries:
      0x10000
      /net/pepsi/usr/local/j2re1_3_1/bin/../bin/sparc/native_threads/java
      0xff350000 /usr/lib/libthread.so.1
      0xff390000 /usr/lib/libdl.so.1
      0xff280000 /usr/lib/libc.so.1
      0xff270000 /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
      0xfe000000 /net/pepsi/usr/local/j2re1_3_1/lib/sparc/server/libjvm.so
      0xff200000 /usr/lib/libCrun.so.1
      0xff1e0000 /usr/lib/libsocket.so.1
      0xff100000 /usr/lib/libnsl.so.1
      0xff0d0000 /usr/lib/libm.so.1
      0xff230000 /usr/lib/libw.so.1
      0xff0b0000 /usr/lib/libmp.so.2
      0xff080000
      /net/pepsi/usr/local/j2re1_3_1/lib/sparc/native_threads/libhpi.so
      0xff050000 /net/pepsi/usr/local/j2re1_3_1/lib/sparc/libverify.so
      0xfe7c0000 /net/pepsi/usr/local/j2re1_3_1/lib/sparc/libjava.so
      0xff020000 /net/pepsi/usr/local/j2re1_3_1/lib/sparc/libzip.so

      Local Time = Thu May 31 08:08:57 2001
      Elapsed Time = 8
      #
      # HotSpot Virtual Machine Error : 11
      # Error ID : 4F530E43505002CC 01
      # Please report this error at
      # http://java.sun.com/cgi-bin/bugreport.cgi
      #
      # Java VM: Java HotSpot(TM) Server VM (1.3.1-b24 mixed mode)
      #
      # An error report file has been saved as hs_err_pid25315.log.
      # Please refer to the file for further information.
      #
      Abort (core dumped)

      ---- java_test_io.java ----

      import java.util.*;
      import java.io.*;
      import java.lang.*;

      /** Simple tests of Java file I/O and time to output strings + ints
       **/

      /* Copyright XACCT, 2001 */

      public class java_test_io {

          /** vector of strings: half empty, half with a moderate-length string **/
          String[] vString = new String[20];

          /** vector of medium-sized numbers **/
          long[] vLong = new long[60];

          /** contains one sample output line, for testing */
          String line;

          /** Constructor **/

          public java_test_io() {
              initVectors();
              initLine();
          }

          /** Set up the string and number vectors **/

          private void initVectors() {
              for (int i = 0; i < vString.length / 2; i++) {
                  vString[i] = "Ceci n'est pas une pipe";
              }
              for (int i = vString.length / 2;i < vString.length; i++) {
                  vString[i] = "";
              }
              int sign = 1;
              for (int i = 0; i < vLong.length; i++) {
                  vLong[i] = sign * i * 123456789;
                  sign = - sign;
              }
          }

          /** Initialize a sample output line **/

          private void initLine() {
              line = "";
              for (int i = 0; i < vString.length; i++) {
                  line += vString[i] + '\t';
              }
              for (int i = 0; i < vLong.length; i++) {
                  line += vLong[i] + '\t';
              }
              line += '\n';
          }

          /** Initialize a sample output line, using string buffer for speed **/

          private void initLineFast(StringBuffer sb) {
              sb.setLength(0);
              for (int i = 0; i < vString.length; i++) {
                  sb.append(vString[i]).append('\t');
              }
              for (int i = 0; i < vLong.length; i++) {
                  sb.append(vLong[i]).append('\t');
              }
              sb.append('\n');
              line = sb.toString();
          }

          /** Record start of time for a single test **/

          long timeBegin;

          /** Record end of time for a single test **/

          long timeEnd;

          /** Start the timer for a test **/

          private void startTimer() {
              timeBegin = System.currentTimeMillis();
          }

          /** End the timer for a test and output a message **/

          private void endTimer(String msg, long records, long bytes) {
              timeEnd = System.currentTimeMillis();
              double timeDiff = (timeEnd - timeBegin) / 1000.0;
              System.err.println(msg + ": " +
                                 (timeEnd-timeBegin)/1000.0 + "sec/" +
                                 records + "rec (avg len=" +
                                 (bytes / records) + "), " +
                                 new Double(records / timeDiff).longValue() + "record/sec" +", " + bytes/1000 + " Kbytes: " +new Double(bytes / timeDiff / 1000).longValue() + "Kbyte/sec");
          }

          /** The main program **/

          public static void main(String[] args) {
              java_test_io test = new java_test_io();

              test.test1();
              test.test5();
              test.test4();

              test.test2();
              test.test3();
          }

          /** Test writing entire lines **/

          void test1() {
              int records = 20000;
              long byteCount = 0;
              try {
                  byte[] lineBytes = line.getBytes();
                  FileOutputStream fo = new FileOutputStream((true ? "out1.txt" : "/dev/null"));
                  BufferedOutputStream bfo = new BufferedOutputStream(fo, 10240);
                  startTimer();
                  for (int rec = 0; rec < records; rec++) {
                      bfo.write(lineBytes);
                      byteCount += line.length();
                  }
                  bfo.close();
                  endTimer("Writing bytes", records, byteCount);
              } catch(Exception e) { System.err.println("ERROR: " + e.getMessage()); }
          }

          /** Test by building a line (naively) and outputting **/

          void test2() {
              int records = 10000;
              long byteCount = 0;
              try {
                  FileOutputStream fo = new FileOutputStream((true ? "out2.txt" : "/dev/null"));
                  BufferedOutputStream bfo = new BufferedOutputStream(fo, 10240);

                  startTimer();

                  for (int rec = 0; rec < records; rec++) {
                      initLine();
                      bfo.write(line.getBytes());
                      byteCount += line.length();
                  }
                  bfo.close();
                  endTimer("Writing lines (naive)", records, byteCount);
              } catch(Exception e) { System.err.println("ERROR: " + e.getMessage()); }
          }

          /** Test by building a line (fast) and outputting **/

          void test3() {
              int records = 10000;
              long byteCount = 0;
              try {
                  FileOutputStream fo = new FileOutputStream((true ? "out3.txt" : "/dev/null"));
                  BufferedOutputStream bfo = new BufferedOutputStream(fo, 256*1024);

                  StringBuffer sb = new StringBuffer(10240);

                  startTimer();

                  for (int rec = 0; rec < records; rec++) {
                      initLineFast(sb);
                      bfo.write(line.getBytes());
                      byteCount += line.length();
                  }
                  bfo.close();
                  endTimer("Writing lines (fast)", records, byteCount);
              } catch(Exception e) { System.err.println("ERROR: " + e.getMessage()); }
          }

          /** Test by using a BufferedWriter directly **/

          void test4() {
              int records = 10000;
              long byteCount = 0;
              try {
                  FileOutputStream fo = new FileOutputStream((true ? "out4.txt" : "/dev/null"));
                  OutputStreamWriter osw = new OutputStreamWriter(fo);
                  BufferedWriter bw = new BufferedWriter(osw, 10240);

                  startTimer();

                  for (int rec = 0; rec < records; rec++) {
                      for (int j = 0; j < vString.length; j++ ) {
                          bw.write(vString[j]);
                          bw.write('\t');
                          byteCount += vString[j].length() + 1;
                      }
                      for (int j = 0; j < vLong.length; j++ ) {
                          String s = Long.toString(vLong[j]);
                          bw.write(s);
                          bw.write('\t');
                          byteCount += s.length() + 1;
                      }
                      bw.write('\n');
                      // bw.flush(); // flush slows things down a bit
                      byteCount += 1; // line.length();
                  }
                  bw.flush();
                  fo.close();
                  endTimer("BufferedWriter", records, byteCount);
              } catch(Exception e) { System.err.println("ERROR: " + e.getMessage()); }
          }

          /** Test by using a BufferedWriter directly into a byte array**/

          void test5() {
              int records = 10000;
              long byteCount = 0;
              try {
                  FileOutputStream fo = new FileOutputStream((true ? "out5.txt" : "/dev/null"));
                  BufferedOutputStream bw = new BufferedOutputStream(fo, 256*1024);

                  startTimer();

                  byte[] buffer = new byte[10000]; // alloc'ed here to avoid re-allocinside loop
                  byte[] numBuf = new byte[100]; // alloc'ed here to avoid re-allocinside loop

                  for (int rec = 0; rec < records; rec++) {
                      int pos = 0;
                      for (int j = 0; j < vString.length; j++ ) {
                          String s = vString[j];
                          for (int k = 0; k < s.length(); k++) {
                              buffer[pos++] = (byte) s.charAt(k);
                          }
                          buffer[pos++] = (byte)'\t';
                      }
                      for (int j = 0; j < vLong.length; j++ ) {
                          long v = vLong[j];
                          int numPos = 0;
                          if (v < 0) { v = - v; }
                          do {
                              long v2 = v / 10;
                              numBuf[numPos++] = (byte) ('0' + v - (v2 * 10));
                              v = v2;
                              // - The following 2 lines are equivalent to the 3 above,
                              // - but are 50% slower
                              // - numBuf[numPos++] = (byte) ('0' + v % 10);
                              // v /= 10;
                          } while (v != 0);
                          if (vLong[j] < 0) { buffer[pos++] = (byte)'-'; }
                          while (numPos > 0) { // reverse it
                              buffer[pos++] = numBuf[--numPos];
                          }
                          buffer[pos++] = (byte)'\t';
                      }
                      buffer[pos++] = (byte)'\n';

                      bw.write(buffer, 0, pos);
                      // bw.flush(); // flush slows things down a bit
                      byteCount += pos;
                  }
                  bw.flush();
                  fo.close();
                  endTimer("BufferedOutputStream", records, byteCount);
              } catch(Exception e) { System.err.println("ERROR: " + e.getMessage()); }
          }
      }
      (Review ID: 125521)
      ======================================================================

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: