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

Debugger causes applet deadlock -- sometimes

XMLWordPrintable

    • 1.0beta2
    • sparc
    • generic
    • Not verified

      Before I rebooted my system [rather, it rebooted
      itself after a panic], the following sequence
      would reliably cause the killme thread to become
      a zombie -- it was deadlocked waiting in some
      monitor. (I'd include the fascinating results of
      the threads command, but they got blown away
      by the panic.)

      yojimbo% appletviewer -debug index.html
      Loading jdb ...
      0xee301818:class(sun.applet.AppletViewer)
      > stop in NervousText.start
      Breakpoint set at NervousText.start
      > run
      run sun.applet.AppletViewer index.html
      running ...
      Breakpoint hit: NervousText.start (NervousText.java:35)
      Thread-6[1] list
      31 resize(150,50);
      32 }
      33
      34 public void start() {
      35 => if(killme == null)
      36 {
      37 killme = new Thread(this, "killme");
      38 killme.start();
      39 }
      Thread-6[1] stop at NervousText:38
      Breakpoint set at NervousText:38
      Thread-6[1] cont
      Breakpoint hit: NervousText.start (NervousText.java:38)
      Thread-6[1] cont
      Thread-6[1]

      If before the second cont I put a step,
      then everything would work fine.

      Now, after rebooting, everything works fine.
      OOPS -- JUST THE FIRST TIME. Doing the same
      sequence again, I'm running into the same problem.

      Here's the output:

      appletviewer -debug index.html
      Loading jdb ...
      0xee301bb8:class(sun.applet.AppletViewer)
      > stop in NervousText.start
      Breakpoint set at NervousText.start
      > run
      run sun.applet.AppletViewer index.html
      running ...
      Breakpoint hit: NervousText.start (NervousText.java:35)
      Thread-6[1] stop at NervousText:38
      Breakpoint set at NervousText:38
      Thread-6[1] cont
      Breakpoint hit: NervousText.start (NervousText.java:38)
      Thread-6[1] threads
      Group sun.applet.AppletViewer.main:
       1. (java.lang.Thread)0xee303ba8 AWT-Motif suspended
       2. (sun.awt.ScreenUpdater)0xee304010 ScreenUpdater suspended
      Group applet-NervousText.class:
       3. (java.lang.Thread)0xee304078 Thread-6 at breakpoint
       4. (java.lang.Thread)0xee305e08 killme zombie
      Thread-6[1] cont
      Thread-6[1] threads
      Group sun.applet.AppletViewer.main:
       1. (java.lang.Thread)0xee303ba8 AWT-Motif running
       2. (sun.awt.ScreenUpdater)0xee304010 ScreenUpdater cond. waiting
      Group applet-NervousText.class:
       3. (java.lang.Thread)0xee304078 Thread-6 waiting in a monitor
       4. (java.lang.Thread)0xee305e08 killme zombie
      Thread-6[1] cont
      Thread-6[1] threads
      Group sun.applet.AppletViewer.main:
       1. (java.lang.Thread)0xee303ba8 AWT-Motif running
       2. (sun.awt.ScreenUpdater)0xee304010 ScreenUpdater cond. waiting
      Group applet-NervousText.class:
       3. (java.lang.Thread)0xee304078 Thread-6 waiting in a monitor
       4. (java.lang.Thread)0xee305e08 killme zombie
      Thread-6[1]

      Obviously, there's some sort of timing problem, but I
      have no idea of what it is.

            tballsunw Tom Ball (Inactive)
            kwalrathsunw Kathy Walrath (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: