JDK-7051798 : SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-06-06
  • Updated: 2015-04-09
  • Resolved: 2011-11-28
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 7 JDK 8 Other
7u2Fixed 8Fixed hs22Fixed
Related Reports
Relates :  
Description
SA-JDI fails to get a stack trace:

# ERROR: Test caught an exception: 
# ERROR: java.lang.NullPointerException
# ERROR: 	at sun.jvm.hotspot.runtime.Frame.addressOfStackSlot(Frame.java:224)
# ERROR: 	at sun.jvm.hotspot.runtime.x86.X86Frame.senderForCompiledFrame(X86Frame.java:342)
# ERROR: 	at sun.jvm.hotspot.runtime.x86.X86Frame.sender(X86Frame.java:283)
# ERROR: 	at sun.jvm.hotspot.runtime.Frame.sender(Frame.java:194)
# ERROR: 	at sun.jvm.hotspot.runtime.Frame.realSender(Frame.java:199)
# ERROR: 	at sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:119)
# ERROR: 	at sun.jvm.hotspot.runtime.CompiledVFrame.sender(CompiledVFrame.java:178)
# ERROR: 	at sun.jvm.hotspot.runtime.VFrame.javaSender(VFrame.java:146)
# ERROR: 	at sun.jvm.hotspot.jdi.ThreadReferenceImpl.privateFrames(ThreadReferenceImpl.java:218)
# ERROR: 	at sun.jvm.hotspot.jdi.ThreadReferenceImpl.frames(ThreadReferenceImpl.java:183)
...

Warning: the type "const char*" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 4 twice. Continuing.
Warning: the type "const size_t" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 4 twice. Continuing.
Warning: the type "const int" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 4 twice. Continuing.
Warning: the type "const MemRegion" (declared in the remote VM in VMStructs::localHotSpotVMTypes) had its size declared as 8 twice. Continuing.
WARNING: You have disabled SA and VM version check. You may be using incompatible version of SA and you may see unexpected results.

Comments
EVALUATION See main CR
12-09-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/7588156f5cf9
08-09-2011

EVALUATION 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244) Reviewed-by: kvn The SA was never updated to handle ricochet frames so stack walking was broken when they were encountered. The X86 stack walking code hadn't been updated in a while so I sync'ed it the current version of frame_x86.cpp and eliminated the AMD64 variants of many of these classes since they should be exactly that same. All SA related exceptions in the mlvm test have been fixed. I had to convert the PcDesc flags into masks since the SA can't deal with bitfields. Because of some JDI features being used by the test I had to fix other unreported SAJDI issues when asking for locals for optimized and native frames. I also hit an unreported assertion failure in C1 with large frames. Tested with failing mlvm sajdi tests from report plus the regular tmtools and sajdi test to stress the stack walking.
06-09-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/7588156f5cf9
06-09-2011