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

ThreadReference suspend/resume throw for non-alive threads

XMLWordPrintable

    • b57
    • generic
    • generic



      Name: dkR10014 Date: 12/08/2003


      The following NSK jdi tests fails on all platforms and in all VM modes:
          nsk/jdi/ThreadReference/status/status008
          nsk/jdi/ThreadReference/status/status003

      These tests will be available in r25 of testbase_nsk.

      The status008 test fails with exception when debugger tries to suspend
      initialized, but unstarted debuggee's thread:
      # ERROR: debugger FAILURE > CHECK2 FAILED
      # ERROR: debugger FAILURE > Unexpected exception while calling ThreadReference.suspend
      for unStartedThread : java.lang.IllegalThreadStateException

      And the status003 test fails with the same exception when debugger tries
      to suspend finished debuggee's threads:
      # ERROR: debugger FAILURE > CHECK2 FAILED
      # ERROR: debugger FAILURE > Unexpected exception while calling ThreadReference.suspend()
      for finishedThread : java.lang.IllegalThreadStateException
      # ERROR: debugger FAILURE > CHECK4 FAILED
      # ERROR: debugger FAILURE > Unexpected exception while calling ThreadReference.suspend()
      for interruptedThread : java.lang.IllegalThreadStateException

      Though this exception looks reasonable in these cases, but the JDI spec
      says nothing about IllegalThreadStateException which may be thrown in
      ThreadReference.suspend() and ThreadReference.resume(). The JDWP spec
      also has no errors if Suspend or Resume command is called for ThreadReference
      of unstarted or finished threads.
      But JVMTI spec specify JVMTI_ERROR_THREAD_NOT_ALIVE error in this case.

      To reproduce the failure of status008 test do the following steps:
          cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
          sh doit.sh $JAVA_HOME [$DEBUGEE_VM_OPTS]

      ======================================================================

      Name: ipR10196 Date: 03/04/2004


      If not running threads cannot be suspended, specifications for those
      ThreadReference methods which require threads to be suspended, like
      frameCount(), frames() and so on, should also have words about their
      application to not running threads.


      ======================================================================

      ###@###.### 2004-04-07
      This test fails for the same reason, see http://vmsqe.sfbay/nightly/mantis/DTWS/results/04-05-04/ClientVM/linux-i386/mixed/Main_Baseline/nsk.sajdi-NIGHTLY-Main_Baseline-ClientVM-mixed-linux-i386-2004-04-05-22-33-28/analysis.html

        nsk/sajdi/ThreadReference/frames/frames001


      ###@###.### 2004-06-09
      JDI method ThreadReference.resume() has the same problem - it
      throws
          java.lang.IllegalThreadStateException

      for unstarted/finished threads, but this is not stated in the JDI spec.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: