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

TEST_BUG: REG-TESTS: com/sun/jdi/SDENullTest.java intermittently fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.1
    • other-libs
    • x86
    • linux



      Name: icR10030 Date: 08/02/2002



      Filed By : J2SE-SQA [###@###.###
      JDK : jdk1.4.1-rc-b18
      Testbase : Regression testsuite
      Platform[s] : Linux Redhat 7.2
      Failing Test : com/sun/jdi/SDENullTest.java

      Here is the some code from the com/sun/jdi/VMConnection.java:275
      (as a part of the test com/sun/jdi/SDENullTest.java):
      ...
          /**
           * Create a Thread that will retrieve and display any output.
           * Needs to be high priority, else debugger may exit before
           * it can be displayed.
           */
          private void displayRemoteOutput(final InputStream stream) {
      Thread thr = new Thread("output reader") {
      public void run() {
                      try {
                          dumpStream(stream);
                      } catch (IOException ex) {
                          System.err.println("IOException reading output of child java interpreter:"
                                             + ex.getMessage());
                      } finally {
                          notifyOutputComplete();
                      }
      }
      };
      thr.setPriority(Thread.MAX_PRIORITY-1);
      thr.start();
          }
      ...

      The test supposes that the new thread will be executed before debugger exits.
      But this is not true - sometimes debugger exits before and, therefore the
      java.lang.NullPointerException is thrown.

      jtr file location:
      ==================

      How to reproduce:
      =================
      Run the test on Linux.

      Test output:
      ============
      run args: [SDENullTarg]
      SDENullTest: passed
      STATUS:Passed.
      java.lang.NullPointerException
      at java.io.BufferedInputStream.read(BufferedInputStream.java:279)
      at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:406)
      at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:446)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
      at java.io.InputStreamReader.read(InputStreamReader.java:167)
      at java.io.BufferedReader.fill(BufferedReader.java:136)
      at java.io.BufferedReader.readLine(BufferedReader.java:299)
      at java.io.BufferedReader.readLine(BufferedReader.java:362)
      at VMConnection.dumpStream(VMConnection.java:261)
      at VMConnection.access$000(VMConnection.java:12)
      at VMConnection$1.run(VMConnection.java:275)
      STATUS:Failed.`main' threw exception: java.lang.NullPointerException

      Specific Machine Info:
      ======================
      Hostname: linux-12
      OS: Redhat Linux 7.2

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

            alanb Alan Bateman
            ichesunw Iche Iche (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: