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

initContext core dump

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 0.9, 2.0
    • Fix Version/s: 1.0
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.0alpha2
    • CPU:
      sparc
    • OS:
      generic, solaris_2.4
    • Verification:
      Not verified

      Description

      The following program causes initContext to core dump
      package test;

      class Lock {
          int i;
          synchronized void grab() {
              wait();
          }
          synchronized void notify_it() {
              notifyAll();
          }
      }

      class Victim extends Thread {
          Lock m_l;
          int m_count;

          Victim(Lock l, int count) {
              m_l = l;
              m_count = count;
          }
          public void run() {
              while (true) {
                  //System.out.print(m_count);
      m_l.grab();
              }
          }
      }

      class Notifier extends Thread {
          Lock m_l;

          Notifier(Lock l) {
              m_l = l;
          }
          public void run() {
              while(true) {
                  //System.out.print("n");
                  m_l.notify_it();
                  yield();
              }
          }
      }

      class Murderer extends Thread {
          killnotify m_main;
          
          Murderer(killnotify main) {
              m_main = main;
          }
          public void run() {
              while (true) {
      Thread victim = m_main.getVictim();
                  if (victim != null) {
                      try {
      victim.stop();
      //System.out.println("!");
                          m_main.setVictim(null);
                      } catch (IllegalStateException e) {
                          //System.out.print("-");
      yield();
                      }
                  } else {
                      sleep(100);
                  }
              }
          }
      }

      class killnotify extends Thread {
          Thread m_victim;

          public void run() {
              int count = 0;
              Lock l = new Lock();

      Murderer m = new Murderer(this);
      m.start();

      Notifier n = new Notifier(l);
      n.start();

              while (true) {
                  try {
                      Thread v = getVictim();
                      if (v != null) v.stop();
      } catch (IllegalStateException e) {
                      //System.out.println("*");
                  }
                  //System.out.print("v");
      Victim v = new Victim(l, count++);
                  v.start();
                  sleep(50);
                  setVictim(v);
                  sleep(100);
              }
          }

          public Thread getVictim() {
              return m_victim;
          }
          public void setVictim(Thread victim) {
              m_victim = victim;
          }
          public static void main(String args[]) {
              killnotify self = new killnotify();
              self.start();
          }
      }

      The description field as copied from bug report 1191598 follows:

      I was running server interpreters and was slowly running out of swap space
      when I saw this core dump:

      (dbx) where
        [1] kill(0x0, 0x6, 0x1, 0xef73dcb0, 0xef740778, 0x3e8), at 0xef721830
        [2] abort(0x27, 0x27, 0x3e8fe8, 0x3e7d08, 0x3e6e2c, 0xfcaf2800), at 0xef6ed7ec
      =>[3] signalHandlerPanic(sig = 11, info = 0x3e70c8, uc = 0x3e6f08), line 403 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/solaris/java/runtime/interrupt_md.c"
        ---- called from signal handler with signal 11 (SIGSEGV) ------
        [4] makecontext(), at 0xef6d660c
        [5] initContext(tid = 0x4a7ec8, pc = 282312, death_func = &start_func(int dummy, int arg, void (*func)()) at 0x4af58, arg = 3086904), line 168 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/solaris/java/runtime/context.c"
        [6] sysThreadCreate(stack_size = 65536, flags = 1, start = &`thread.c`ThreadRT0(register Hjava_lang_Thread *p) at 0x44ec8, ptid = 0x3e72c4, cookie = 0x2f1a38), line 154 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/solaris/java/runtime/threads_md.c"
        [7] threadCreate(tid = 0x2f1a38, flags = 1, stack_size = 65536, func = &`thread.c`ThreadRT0(register Hjava_lang_Thread *p) at 0x44ec8), line 98 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/threads.c"
        [8] java_lang_Thread_start(p = 0x2f1a38), line 75 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/lang/thread.c"
        [9] java_lang_Thread_start_stub(_P_ = 0x3e9148, _EE_ = 0x3e8cbc), line 799 in "/net/acorn/work/java/build/solaris/java/JAVA/classstubs.c"
        [10] invokeSynchronizedNativeMethod(o = 0x2f1a38, mb = 0x3a0890, args_size = 1, ee = 0x3e8cbc), line 201 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/classruntime.c"
        [11] ExecuteJava(initial_pc = 0x3e7bb2 "Õ", ee = 0x3e8cbc), line 1928 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/interpreter.c"
        [12] do_execute_java_method_vararg(ee = 0x3e8cbc, obj = 0x2ec5f0, method_name = 0xef5c3604 "selected", method_signature = 0xef5c3610 "()V", mb = (nil), isStaticCall = FALSE, args = 0x3e7ca4), line 418 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/interpreter.c"
        [13] execute_java_dynamic_method(ee = 0x3e8cbc, obj = 0x2ec5f0, method_name = 0xef5c3604 "selected", signature = 0xef5c3610 "()V", ...), line 194 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/interpreter.c"
        [14] TextField_changed(w = 0x432de8, client_data = 0x2ec5f0 "", s = 0x3e7d14), line 25 in "/net/acorn/work/java/build/solaris/awt/../../../src/solaris/awt/awt_TextField.c"
        [15] Activate(0x432de8, 0x3e80b0, 0x0, 0xef38f40c, 0xef38f41c, 0xef483d38), at 0xef483d68
        [16] HandleActions(0x432de8, 0x3e80b0, 0x428f08, 0x0, 0x4978dc, 0xef38f404), at 0xef372000
        [17] HandleSimpleState(0x1, 0x0, 0x1, 0x0, 0x0, 0x4978dc), at 0xef3725e4
        [18] _XtTranslateEvent(0x432de8, 0x3e80b0, 0x0, 0x3e7f27, 0x0, 0x432e18), at 0xef372ba0
        [19] DispatchEvent(0x3e80b0, 0x432de8, 0x1, 0x4, 0x0, 0x0), at 0xef355bdc
        [20] DecideToDispatch(0x3e80b0, 0x3f22e4, 0x1, 0x432de8, 0x432de8, 0x0), at 0xef3562f0
        [21] XtDispatchEvent(0x3e80b0, 0x0, 0x1, 0x0, 0x1, 0x3d3ac0), at 0xef3563d0
        [22] XtAppProcessEvent(0x3d3ac0, 0x0, 0x3d3c8c, 0x3d3acc, 0x3d3c88, 0x1), at 0xef35ecfc
        [23] awt_WServer_loop(wsdata = 0x3d4e00, poll = 0x3e82d4, isModal = 0), line 159 in "/net/acorn/work/java/build/solaris/awt/../../../src/solaris/awt/awt_WServer.c"
        [24] awt_WServer_eventLoop(this = 0x2eb818), line 185 in "/net/acorn/work/java/build/solaris/awt/../../../src/solaris/awt/awt_WServer.c"
        [25] awt_WServer_eventLoop_stub(_P_ = 0x3e9058, _EE_ = 0x3e8cbc), line 151 in "/net/acorn/work/java/build/solaris/awt/libstubs.c"
        [26] invokeNativeMethod(o = 0x2eb818, mb = 0x3d69a8, args_size = 1, ee = 0x3e8cbc), line 180 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/classruntime.c"
        [27] invokeLazyNativeMethod(o = 0x2eb818, mb = 0x3d69a8, args_size = 1, ee = 0x3e8cbc), line 216 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/classruntime.c"
        [28] ExecuteJava(initial_pc = 0x3e8bba "Õ", ee = 0x3e8cbc), line 1928 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/interpreter.c"
        [29] do_execute_java_method_vararg(ee = 0x3e8cbc, obj = 0x2eb818, method_name = 0x7e43c "run", method_signature = 0x7e440 "()V", mb = (nil), isStaticCall = FALSE, args = 0x3e8cac), line 418 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/interpreter.c"
        [30] execute_java_dynamic_method(ee = 0x3e8cbc, obj = 0x2eb818, method_name = 0x7e43c "run", signature = 0x7e440 "()V", ...), line 194 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/runtime/interpreter.c"
        [31] ThreadRT0(p = 0x2eb818), line 52 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/share/java/lang/thread.c"
        [32] start_func(dummy = 1, arg = 3061784, func = &`thread.c`ThreadRT0(register Hjava_lang_Thread *p) at 0x44ec8), line 131 in "/net/acorn/work/java/build/solaris/java/JAVA/../../../../src/solaris/java/runtime/threads_md.c"
      (dbx)

      The description field as copied from bug report 1192471 follows:

      Going to http://prinny.pavilion.co.uk/Gallery/Shot/Stella/
      SIGSEGV 11* segmentation violation
          si_signo [11]: SIGSEGV 11* segmentation violation
          si_errno [0]: Error 0
          si_code [1]: SEGV_ACCERR [addr: 0xef7ffff0]

      stackbase=EFFFF99C, stackpointer=EFFFECB8

      Full thread dump:
          "Thread-1015" (0x70ffc0): priority=4
      java.lang.Object.wait(Object.java)
      awt.DIWUpdaterThread.getRequest(DisplayItemWindow.java:569)
      awt.DIWUpdaterThread.run(DisplayItemWindow.java:594)
          "Background Image Reader" (0x6cd510): priority=2
      java.lang.Object.wait(Object.java)
      webrunner.ImageReader.waitForRequest(ImageReader.java:76)
      webrunner.ImageReader.run(ImageReader.java:137)
          "Thread-2" (0x6c3510): priority=5
      webrunner.HistoryWindow.run(webrunner.java:1764)
      java.lang.Thread.run(Thread.java)
          "Thread-1" (0x6c1850): priority=6
      webrunner.StatusWindow.run(webrunner.java:505)
      java.lang.Thread.run(Thread.java)
          "AWT WServer Thread" (0x6c0688): priority=5
      awt.WServer.run(WServer.java:65)
          "Async Garbage Collector" (0x6c0460): priority=1
          "Finalizer thread" (0x6c0408): priority=1
          "Idle thread" (0x6c03f8): priority=0
          "clock handler" (0x6c03e8): priority=11
          "main" (0x6c03e0): priority=5 *current thread*
      webrunner.DocumentManager.fetchDocument(DocumentManager.java:96)
      webrunner.DocumentManager.newDocument(DocumentManager.java:82)
      webrunner.WRWindow.pushURL(WRWindow.java:296)
      webrunner.webrunner.go(webrunner.java:105)
      test.Webrunner.go(test.java:57)
      test.test.<init>(test.java:91)
      test.test.main(test.java:107)
      Monitor Cache Dump:
          awt.DIWUpdaterThread@70FFC0/5DA898 (key=0x70ffc0): unowned
      Waiting to be notified:
      "Thread-1015" (0x70ffc0): priority=4
          webrunner.FetcherThread@71C460/5FC140 (key=0x71c460): monitor owner: "main" (0x89ecf8)
          webrunner.WRWindow@6C1348/5E720 (key=0x6c1348): monitor owner: "main" (0x89ecf8)
          unknown key (key=0x987b28): unowned
      Waiting to be notified:
      "Thread-2" (0x6c3510): priority=5
          unknown key (key=0x945550): unowned
      Waiting to be notified:
      "Thread-1" (0x6c1850): priority=6
          webrunner.ImageReader@6CD510/A0BE8 (key=0x6cd510): unowned
      Waiting to be notified:
      "Background Image Reader" (0x6cd510): priority=2
          unknown key (key=0xef3622a0): monitor owner: "AWT WServer Thread" (0x8dd398)
      Registered Monitor Dump:
          Finalization queue lock: unowned
      Waiting to be notified:
      "Finalizer thread" (0x6c0408): priority=1
          Thread queue lock: unowned
          Class lock: unowned
          Java stack lock: unowned
          Code rewrite lock: unowned
          Heap lock: unowned
          Monitor registry: monitor owner: "main" (0x89ecf8)
          Monitor cache lock: unowned
          Event monitor: unowned
          I/O monitor: monitor owner: "AWT WServer Thread" (0x8dd398)
          Alarm monitor: unowned
      Waiting to be notified:
      "clock handler" (0x6c03e8): priority=11
      Thread Alarm Q:
          sys_thread_t 0x945550 [Timeout in 161 ms]
          sys_thread_t 0x987b28 [Timeout in 163 ms]
      Abort (core dumped)
      ~/awt> alias ji
      (gdb) frame
      #0 0xef7156c8 in _heap_lock ()
      (gdb) bt
      #0 0xef7156c8 in _heap_lock ()
      #1 0xef6ec36c in _heap_lock ()
      #2 0xef6eae3c in _heap_lock ()
      #3 0xef6d56dc in _heap_lock ()
      #4 0x392b8 in initContext ()
      #5 0x2f51c in sysThreadCreate ()
      #6 0x2c394 in threadCreate ()
      #7 0x2bf80 in java_lang_Thread_start ()
      #8 0x31d8c in java_lang_Thread_start_stub ()
      #9 0x22134 in invokeSynchronizedNativeMethod ()
      #10 0x20f64 in ExecuteJava ()
      #11 0x1d228 in do_execute_java_method_vararg ()
      #12 0x1d0c0 in do_execute_java_method ()
      #13 0x33d88 in start_java ()
      (gdb) quit
      ~/awt>

        Attachments

          Activity

            People

            Assignee:
            tlindholsunw Timothy Lindholm (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: