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

Intermittent crash upon VM shutdown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0_02, 1.3.1, 1.4.0
    • hotspot
    • beta2
    • generic, x86
    • linux, linux_redhat_6.2, windows_98

      Run the following program on Redhat 7.1 SMP Linux box with latest ladybird (b24):

      import java.security.SecureRandom;

      public class TestString{
              public static void main(String[] args){
                      SecureRandom rng = new SecureRandom();
                      byte[] array = new byte[1];
                      int index = 0;
                      String testString = null;
                      char testChar;
                      StringBuffer buffer = new StringBuffer();
                      do {
                              rng.nextBytes(array);
                              try{
                                      testChar = new String(array, "US-ASCII").charAt(
      0);
                              } catch(Exception e){
                                      continue;
                              }
                              if (Character.isLetterOrDigit(testChar)) {
                                      buffer.append(testChar);
                                      if (buffer.length() == 8) {
                                              break;
                                      }
                              }
                      } while ( true );

                      String string = buffer.toString();
                      System.out.println("String == " + string);
                      System.out.println("String length == " + string.length());

              }

      }

      I got intermittent error message:

      String == hAv0w2Ve
      String length == 8

      ****************
      Another exception has been detected while we were handling last error.
      Dumping information about last error:
      ERROR REPORT FILE = (N/A)
      PC = 0x0x41628541
      SIGNAL = 11
      FUNCTION NAME = (N/A)
      LIBRARY NAME = (N/A)
      Please check ERROR REPORT FILE for further information, if there is any.
      Good bye.

      This happens about 1 out of 5 runs on RH 7.1 SMP, but not reproducible on
      uniprocessor kernel. Although the crash seems to happen after the Java program
      is all finished, the crash might make it difficult to check return code after
      launching Java in a script or another program.

            hhuangsunw Hui Huang (Inactive)
            hhuangsunw Hui Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: