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

VM crash or NPE at Thread.getAllStackTraces()

    Details

    • Subcomponent:
    • Resolved In Build:
      b28
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description



      Name: elR10090 Date: 09/10/2003



      Tiger-b18, all platforms, intermittently crashes while executing
      new NSK tests against the new Thread.getAllStackTraces() feature.
      Or, saying exactly, there are variable crash scenarios observed
      if VM runs the tests with -Xmixed or -Xcomp mode; and running the
      tests with -Xint mode looks even more complicated -- instead of
      crash, sometimes NPE is observed like the following:

          Exception in thread "main" java.lang.NullPointerException
              at java.util.HashMap.hash(HashMap.java:264)
              at java.util.HashMap.put(HashMap.java:382)
              at java.lang.Thread.getAllStackTraces(Thread.java:1363)
              at nsk.stress.strace.strace002.makeSnapshot(strace002.java:126)
              at nsk.stress.strace.strace002.run(strace002.java:69)
              at nsk.stress.strace.strace002.main(strace002.java:51)

      I'm providing a doit.sh stuff for GammaBase to reproduce the fault;
      see it under the directory:

          /net/jano.sfbay/export/disk20/GammaBase/Bugs/${THIS_BUG_ID}

      Use it like:

          time sh doit.sh $JAVA_HOME [ $OPTIONS ]

      E.g.:

          JAVA_HOME=/java/re/jdk/1.5.0/latest/binaries/solaris-sparcv9
          time sh doit.sh $JAVA_HOME -d64 -Xint

      The script runs the test "strace002" many times; until VM crashes,
      or until NPE is thrown. A number of iterations before the fault
      depends on a tested platform. The following table shows how long
      it took me to see a fault for different platforms (-Xint mode):


                    | Client VM | Server VM
                    | 1xCPU 2(4)xCPU | 1xCPU 2(4)xCPU
      --------------+------------+------------+------------+-----------
      Sol. SPARC v9 | n/a | n/a | 40m, crash | 33m, crash
      Sol. SPARC | 7h, crash | 20m, crash | 50m, crash | 7m, crash
      Sol. x86 | 30m, NPE | 20m, crash | 2h, crash | 2m, NPE
      Linux x86 | 1h, crash | - | 15m, NPE | -
      Windows x86 | 15h, exit | - | 10m, crash | -

      Footnotes:
      (1) I didn't have a chance to test against multi-CPU Linux nor
          Windows systems.
      (2) Windows -client silently exited after 15 hours of iterations;
          this looks like a different bug, but I can't understand what
          is it.

      I saw various kinds of VM crash; particularly, Linux reported
      problematic frame is in java.util.HashMap.hash() method. Compare
      this to the NPE trace displayed above. It looks like this bug is
      caused by something happening inside the HashMap.hash() method.

      Following is the list of computers I've used:
      (a) SPARC, 1xCPU, 450MHz, 512Mb, Solaris 8
      (b) SPARC, 4xCPU , 512Mb, Solaris 7 (don't know MHz)
      (c) P-III, 1xCPU, 866MHz, 512Mb, Solaris 8
      (d) P-III, 2xCPU, 600MHz, 512Mb, Solaris 8
      (e) P-III, 1xCPU, 866MHz, 512Mb, Linux RedHat 8.0
      (f) P-II , 1xCPU, 350MHz, 384Mb, Windows 2000 Pro


      Well. Following is the complete list of the tests which I've found
      affected by this bug. I'm enumerating the tests here to help with
      evaluating further regular QA runs of these tests against Tiger:

          nsk/stress/strace/strace001
          nsk/stress/strace/strace002
          nsk/stress/strace/strace005
          nsk/stress/strace/strace006
          nsk/stress/strace/strace008

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

      Name: elR10090 Date: 09/15/2003


      This bug also affects the tests:

          nsk/stress/strace/strace003
          nsk/stress/strace/strace004


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

        Attachments

          Activity

            People

            • Assignee:
              sgoldman Steve Goldman (Inactive)
              Reporter:
              latkinsunw Latkin Latkin (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: