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

GetThreadGroupInfo crashes if Thread Group name is null (jvmpi too)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.2_03, 5.0
    • Fix Version/s: 5.0
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b56
    • CPU:
      generic
    • OS:
      generic

      Description

      cruella<37> cat Test.java
      class MyThread extends Thread {
          public MyThread(ThreadGroup g, String name) {
              super(g,name);
          }
          public void run() {
              try {
                  synchronized( this ) {
                      wait();
                  }
              } catch ( InterruptedException i ) {
              }
          }
      }
      public class Test {
          public static void main(String[] ARGS) {
              Thread th = new MyThread(new ThreadGroup((String)null), "tname");
              th.start();
              System.out.println("ThreadGroup=" + th.getThreadGroup().toString());
              synchronized( th ) {
                  th.notify();
              }
          }
      }
      cruella<38> javac -d . Test.java
      cruella<39> java -version
      java version "1.4.2_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
      Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)
      cruella<40> java Test
      ThreadGroup=java.lang.ThreadGroup[name=null,maxpri=10]
      cruella<41> tjava -version
      java version "1.5.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
      Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode)
      cruella<42> tjava Test
      ThreadGroup=java.lang.ThreadGroup[name=null,maxpri=10]
      cruella<43> java -Xrunhprof Test
      HPROF ERROR: unable to resolve a method id
      HPROF ERROR: got NULL trace in obj_alloc
      HPROF ERROR: duplicate obj_id in object_alloc
      HPROF ERROR: unable to resolve a method id
      HPROF ERROR: got NULL trace in obj_alloc
      HPROF ERROR: unable to resolve a method id
      HPROF ERROR: got NULL trace in obj_alloc
      HPROF ERROR: unable to resolve a method id
      HPROF ERROR: got NULL trace in obj_alloc
      HPROF ERROR: unable to resolve a method id
      HPROF ERROR: got NULL trace in obj_alloc
      HPROF ERROR: class ID already in use

      Unexpected Signal : 11 occurred at PC=0xFEE66D68
      Function=[Unknown. Nearest: AsyncGetCallTrace+0x2A08C]
      Library=/opt/java/j2sdk1.4.2_02/jre/lib/sparc/client/libjvm.so
      ...
      cruella<44> tjava -Xrunhprof Test
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # SIGSEGV (0xb) at pc=0xfeeb76b0, pid=10257, tid=10
      #
      # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta2-b51 mixed mode)
      # Problematic frame:
      # V [libjvm.so+0x2b76b0]
      #
      ThreadGroup=java.lang.ThreadGroup[name=null,maxpri=10]
      # An error report file with more information is saved as hs_err_pid10257.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      Abort (core dumped)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alanb Alan Bateman
                Reporter:
                ohair Kelly Ohair (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: