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

ThreadMXBean.getThreadInfo(long[]) causes failure: assert(SharedSkipVerify || obj->is_oop() )

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • hotspot
    • None
    • svc
    • b91
    • generic, x86
    • generic, windows_xp

      The attached simple program (ThreadInfoGetter) asks for all thread Id's and then passes those Id's back into getThreadInfo to obtain ThreadInfo objects for each live thread. When it does so it triggers an assertion failure:

       assert(SharedSkipVerify || obj->is_oop(),"sanity check")

      because the obj in question is not an Oop. A partial stack ttrace is:

      Stack: [0xc3f4e000,0xc3f9e000), sp=0xc3f9d1d8, free space=316k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xa95943];; __1cHVMErrorOreport_and_die6M_v_+0x517
      V [libjvm.so+0x310803];; __1cYreport_assertion_failure6Fpkci1_v_+0x5f
      V [libjvm.so+0x3cb165];; __1cKHandleAreaPallocate_handle6MnDoop__p1_+0x189
      V [libjvm.so+0x3cb219];; __1cGHandle2t6MpnGThread_nDoop__v_+0xa5
      V [libjvm.so+0x7ab240];; __1cbRinitialize_ThreadInfo_constructor_arguments6FpnRJavaCallArguments_pnOThreadSnapshot_pnGThread__v_+0x2bc
      V [libjvm.so+0x7ab903];; __1cKManagementbBcreate_thread_info_instance6FpnOThreadSnapshot_pnGThread__nLinstanceOop__+0x3cb
      V [libjvm.so+0x7b9646];; jmm_GetThreadInfo+0x1576
      C [libmanagement.so+0x377f] Java_sun_management_ThreadImpl_getThreadInfo0+0x2f;; Java_sun_management_ThreadImpl_getThreadInfo0+0x2f
      j sun.management.ThreadImpl.getThreadInfo0([JI[Ljava/lang/management/ThreadInfo;)V+0

      The hs_err log is attached.

      The obj in question is supposed to be a reference to the blocker_object that the given Thread is/was blocked on.

      Note the test program is actually expecting to trigger a different bug that will result in:

      java.lang.IllegalArgumentException: Invalid thread ID parameter: 0
              at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:101)
              at ThreadInfoGetter.run(ThreadInfoGetter.java:39)

      if the crash does not occur.

            mchung Mandy Chung (Inactive)
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: