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

timer functions return JVMTI_ERROR_UNATTACHED_THREAD while heap

XMLWordPrintable

    • b39
    • generic
    • generic
    • Verified



      Name: dkR10014 Date: 02/06/2004


      --------------------------------------
      Tests : nsk/jvmti/IterateOverHeap/iterheap007
                    nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007
                    nsk/jvmti/IterateOverReachableObjects/iterreachobj005
                    nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005
      VM : ClientVM, ServerVM
      Mode : all
      Platform : generic
      OS : generic
      JDK : 1.5.0 b36
      ----------------------------------------

      The tests fail reporting that JVMTI_ERROR_UNATTACHED_THREAD is
      returned when GetCurrentThreadCpuTimerInfo or GetCurrentThreadCpuTime
      are invoked in callbacks of Heap iteration functions.

      This contradicts to the spec of following timer functions
         GetCurrentThreadCpuTimerInfo
         GetCurrentThreadCpuTime
         GetTimerInfo
         GetTime
      which says:
         This function may be called from the callbacks to the Heap
         iteration functions, or from the event handles for the
         GarbageCollectionStart, GarbageCollectionFinish, and
         ObjectFree events.

      Steps to reproduce a failure of nsk/jvmti/IterateOverHeap/iterheap007:

        cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
        sh build.sh $JAVA_HOME [-g] [-d64]
        sh run.sh $JAVA_HOME [-g] [-v] [JAVA_OPTS]
      where
          -d64 - build for 64-bit solaris-sparcv9
          -g - build for or run with java_g binaries
          -v - run in verbose mode
          
      Here is test output on Solaris:
      -------------------------------------------------------------------------------
      $ sh run.sh $JAVA_HOME -v
      Run: nsk/jvmti/IterateOverHeap/iterheap007
      - iterheap007.c, 105: Wait for debugee start
      - iterheap007.c, 110: Calling IterateOverHeap with filter
      JVMTI_HEAP_OBJECT_EITHER
      # ERROR: iterheap007.c, 31: NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo,
      st_jvmti, &timer_info1 )
      # jvmti error: code=115, name=JVMTI_ERROR_UNATTACHED_THREAD
      # ERROR: iterheap007.c, 36: GetCurrentThreadCpuTimerInfo returned zero in
      jvmtiTimerInfo.max_value
      # ERROR: iterheap007.c, 53: NSK_CPP_STUB2(GetCurrentThreadCpuTime, st_jvmti,
      &nanos )
      # jvmti error: code=115, name=JVMTI_ERROR_UNATTACHED_THREAD
      # ERROR: iterheap007.c, 57: GetCurrentThreadCpuTime returned zero
      # ERROR: iterheap007.c, 72: GetTimerInfo returned negative value in
      jvmtiTimerInfo.max_value
      - iterheap007.c, 123: Let debugee to finish
      Java exit code: 97
      -------------------------------------------------------------------------------

      The tests will be available in next r27 release of testbase.

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

      Name: dkR10014 Date: 02/15/2004


      The test
        nsk/jvmti/scenarios/allocation/AP10/ap10t001
      fails due to this bug too.

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

            alanb Alan Bateman
            kdossunw Kdos Kdos (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: