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

Core dumps occure when using native threads.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Cannot Reproduce
    • Affects Version/s: unknown
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_9

      Description

      (jelvehg, 5/20/97)
      Please read the following paragraphs which give a very in-depth description of the nature of our code which uses native threads and the applicable HotJava bugs. Also, please refer to the attached files showing the crashes based on two different scenarios. customize_solaris_core_hotjava.log.Z is a hotjava log file and customize_solaris_core_trace.log.Z is the trace of the core file.
      Another set of files which are provided for your consideration are:
      customize2_core_hotjava.log.Z which is a hotjava log file and
      customize2_trace.core.log.Z which is the trace of the core file.

      These crashes occure on a page where we have a list of radio-boxes each in
      a separate panel. When the mouse enters one of the panels, we start a
      thread that lasts for 100ms or until the mouse enters another panel.
      If we have not received another mouse-enter event after 100ms, we update
      some text to the left of the list of radio-boxes.

      Thus, threads are being fairly heavily exercised in this code. When we
      first tried native threads many months ago, we had to go back to green
      threads because crashes occurred frequently. But after native threads
      had stabilized, we started using them again.

      The pertinent Genie code for this use of threads is:


      public class MouseOverPanel extends InsetPanel {
          static MouseOverPanel focusPanel = null;
          static TimerThread timerThread = null;

          <...snip...>

          public void handleMouseEnter(boolean doHilite) {

              if (timerThread != null) {
      timerThread.stop();
      timerThread = null;
              }

              timerThread = new TimerThread (this, delayDuration);
              timerThread.start();
          }


          public void handleMouseExit() {
              if (timerThread != null) {
      timerThread.stop();
      timerThread = null;
              }

              timerThread = new TimerThread (null, delayDuration);
              timerThread.start();
          }

          <...snip...>
      }


      class TimerThread extends Thread {
        private MouseOverPanel timerPanel;
        private int timerInterval;
        static private MouseOverPanel lastActivePanel;
        
        public TimerThread(MouseOverPanel moPanel, int duration) {
            timerPanel = moPanel;
            timerInterval = duration;
            if (moPanel != null)
      lastActivePanel = moPanel;
        }

        public void run() {
            try {
                sleep(timerInterval, 0);
            } catch (InterruptedException e) {
            }

            MouseOverPanel p;
            if (timerPanel == null)
                p = lastActivePanel;
            else
                p = timerPanel;

            if (p.getFocusPanel() == timerPanel) {
      p.updateMouseOverInfo();
            }
        }
      }


        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: