JDK-6389730 : SA: On amd64 machine getAllThreads throws wrong type exception.
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2006-02-23
  • Updated: 2013-08-30
  • Resolved: 2013-08-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
On amd64 SA is not able to get the thread list information
because it is not able to deduce the type of thread from the
address got from _thread_list. It throughs wrong type 
exception. 

Exception stack trace:


Exception in thread "main" java.lang.RuntimeException: Unable to deduce type of
thread from address 0x0000000005130000 (expected type JavaThread, CompilerThread
, LowMemoryDetectorThread, JvmtiAgentThread, JVMPIDaemonThread or SurrogateLocke
rThread)
        at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:
125)
        at sun.jvm.hotspot.runtime.Threads.first(Threads.java:113)
        at sun.jvm.hotspot.jdi.VirtualMachineImpl.getAllThreads(VirtualMachineIm
pl.java:460)
        at sun.jvm.hotspot.jdi.VirtualMachineImpl.allThreads(VirtualMachineImpl.
java:475)
        at nsk.sajdi.SACoreAttachingConnector.attach.attach002.runIt(attach002.j
ava:162)
        at nsk.sajdi.SACoreAttachingConnector.attach.attach002.run(attach002.jav
a:26)
        at nsk.sajdi.SACoreAttachingConnector.attach.attach002.main(attach002.ja
va:21)
Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type
of address 0x0000000005130000 (nearest symbol is jvm!??_7LowMemoryDetectorThread
@@6B@)
        at sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(Virt
ualConstructor.java:78)
        at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:
121)
        ... 6 more

Comments
EVALUATION The problem is setting the symbol path in SA to the location of jvm.dll is causing GetOffsetByName() to fail. Do not know why this is a problem. So workaround for this problem is do not set Symbol path to the location of jvm.dll or do not have the jvm.dll location in PATH env.
01-03-2006

EVALUATION LOOKUPNYNAME gHotSpotVMIntConstantEntryNameOffset 138994208 LOOKUPNYNAME gHotSpotVMIntConstantEntryValueOffset 138862952 LOOKUPNYNAME gHotSpotVMIntConstantEntryArrayStride 138994240 LOOKUPNYNAME gHotSpotVMIntConstants 138862944 LOOKUPNYNAME gHotSpotVMLongConstantEntryNameOffset 138994216 LOOKUPNYNAME gHotSpotVMLongConstantEntryValueOffset 138862968 LOOKUPNYNAME gHotSpotVMLongConstantEntryArrayStride 138994248 LOOKUPNYNAME gHotSpotVMLongConstants 138862960 LOOKUPNYNAME ??_7GenCollectedHeap@@6B@ 0 0x80004005 LOOKUPNYNAME ??_7ParallelScavengeHeap@@6B@ 0 0x80004005 LOOKUPNYNAME ??_7JVMPIDaemonThread@@6B@ 0 0x80004005 LOOKUPNYNAME ??_7LowMemoryDetectorThread@@6B@ 0 0x80004005 LOOKUPNYNAME ??_7JavaThread@@6B@ 0 0x80004005 LOOKUPNYNAME ??_7SurrogateLockerThread@@6B@ 0 0x80004005 LOOKUPNYNAME ??_7CompilerThread@@6B@ 0 0x80004005 LOOKUPNYNAME ??_7JvmtiAgentThread@@6B@ 0 0x80004005 GetOffsetByName is failing with error code of 0x80004005. That is E_FAIL symbol not found. -Swamy
24-02-2006

EVALUATION It looks like _thread_list first thread is LowMemoryDetectorThread and the address is 0x86e7070. And the vtbl address for this we got was 0x86e5e70. This does not match. So something wrong in the symbol lookup code which is causing this failure. Investigating... -Swamy
23-02-2006