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

SA-JDI: ThreadReference.status() returns unexpected THREAD_STATUS_WAIT

    XMLWordPrintable

Details

    • beta2
    • generic
    • generic
    • Verified

    Description



      Name: ipR10196 Date: 03/02/2004


      -----------------------------------------------------
      Test : nsk/sajdi/ThreadReference/status/status002
      VM : ClientVM, ServerVM
      Mode : all
      Platform : generic
      OS : generic
      JDK : 1.5.0-beta2-b40 and earlier
      ------------------------------------------------------

      This test checks if ThreadReference methods such as
      name(), status(), isSuspended(), suspendCount(), toString()
      are working correctly for running threads with different statuses.

      With SA-JDI connectors status() returns wrong status
      THREAD_STATUS_WAIT instead of THREAD_STATUS_SLEEPING for thread
      sleeping in Thread.sleep() and instead of THREAD_STATUS_MONITOR
      for thread entering to synchronized block.

      Here is typical test output:
      ------------------------------------------------------------------
      # ERROR: ThreadReference.status() returned unexpected thread status:
      # ERROR: thread nom: 1
      # ERROR: thread name: threadEntering
      # ERROR: thread obj: instance of nsk.sajdi.ThreadReference.status.status002aThreadEntering
                                (name='threadEntering', id=3)
      # ERROR: status: 4(THREAD_STATUS_WAIT)
      # ERROR: expected: 3(THREAD_STATUS_MONITOR)

      # ERROR: ThreadReference.status() returned unexpected thread status:
      # ERROR: thread nom: 3
      # ERROR: thread name: threadSleeping
      # ERROR: thread obj: instance of nsk.sajdi.ThreadReference.status.status002aThreadSleeping
                                (name='threadSleeping', id=5)
      # ERROR: status: 4(THREAD_STATUS_WAIT)
      # ERROR: expected: 2(THREAD_STATUS_SLEEPING)
      ------------------------------------------------------------------

      To reproduce this failure:
        cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
        sh build.sh $JAVA_HOME
        sh run.sh [-pid | -core | -socket] [-g] [-v] $JAVA_HOME [JAVA_OPTS]
      where:
          -pid - run test with SA-JDI pid attaching connector (default)
          -core - run test with SA-JDI core attaching connector
          -socket - run test with JDI socket attaching connector
          -g - run test with java_g binaries
          -v - run test in verbose mode

      This test will appear in the next r27 testbase release.
      Running on Linux this test may fail due to known bug:
      4996081 SA-JDI: SAPIDAttachingConnector.attach() throws IOEception on RH AS2.1

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

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            popovsunw Popov Popov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: