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

Backend hangs when invokeMethod is called from a JDI eventHandler

XMLWordPrintable

    • b83
    • generic
    • generic

        See example in attached zip file.
        It has a debugger that starts a debuggee with two bkpts
        set. The debuggee starts two threads. When
        a thread hits a bkpt, an invokeMethod is done.

        I have seen two failure modes:
        1.
        - main thread just starts the two debuggee threads
          and then completes. It issues a thread death
          event and then the commandLoop waits for a resume that never
          comes

        - thread 2 is reporting a bkpt and is waiting for cmd complete lock
        - thread 1 is posting method entry and has suspended itself under
                 JavaThread::handle_special_runtime_exit_condition(

         
        2.
        - I think main thread exitted ok
        - thread 1 has hit a bkpt and reported it. The debugger does an invokeMethod
          on this thread. It hangs trying to get the System.out
          monitor in a println call, because thread 2 has this monitor.
        - thread 2 is under a println call so it has the monitor. It
          is trying to post a method entry event and is blocked waiting
          for the threadLock (which thread 1 must hold, but I haven't
          been able to prove it).

        I have seen some variations of this 2nd hang.
        Needless to say, this doesn't happen everytime. The testcase
        does several iterations and it happens sooner or later.
        This happens in 5.0 and 1.4.2 as well as mustang.



        ###@###.### 2005-07-02 07:54:57 GMT

              jjh James Holmlund (Inactive)
              jjh James Holmlund (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: