-
Bug
-
Resolution: Fixed
-
P2
-
hs25
-
Windows x64
-
b51
-
x86
-
windows
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8025346 | 8 | Ioi Lam | P2 | Closed | Fixed | b109 |
The implementation of stack unwinding in frame_x86.cpp does not handle Windows x64 stack frame structure as generated by the Microsoft VC compiler. The result is that any stack trace in a hs_err file will only contain the first native frame encountered as we will get an invalid IP as we try to find the sender.
In short, on Windows x64 frame pointers are not pushed on the stack, instead each frame has a static size encoded in the PE file header, plus a dynamic size recorded in a dynamic function table. This information can most easily be retrieved through the SymFunctionTableAccess64 function in dbghelp.dll. (A very good description can be found here http://www.codejury.com/a-walk-in-x64-land/)
Example from a hs_err file (also attached):
Stack: [0x0000000018e90000,0x0000000018f90000], sp=0x0000000018f8e520, free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x27060] ciInstance::field_value+0x90
Note that the same issue exists in SA with tools like jstack -F and CLHSDB.
In short, on Windows x64 frame pointers are not pushed on the stack, instead each frame has a static size encoded in the PE file header, plus a dynamic size recorded in a dynamic function table. This information can most easily be retrieved through the SymFunctionTableAccess64 function in dbghelp.dll. (A very good description can be found here http://www.codejury.com/a-walk-in-x64-land/)
Example from a hs_err file (also attached):
Stack: [0x0000000018e90000,0x0000000018f90000], sp=0x0000000018f8e520, free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x27060] ciInstance::field_value+0x90
Note that the same issue exists in SA with tools like jstack -F and CLHSDB.
- backported by
-
JDK-8025346 Native stack walk while generating hs_err does not work on Windows x64
- Closed
- relates to
-
JDK-8185706 [windows] Native callstacks printing terminates prematurely
- Resolved
-
JDK-8024363 Native stack printing on Win/x64 cannot print the Java frames
- Closed
-
JDK-8024364 Win/x64: os::current_frame() and os::fetch_frame_from_context() returns wrong frame pointer.
- Closed
-
JDK-6655385 Disable frame pointer omission in jvm.dll on Windows for better crash logs
- Closed
-
JDK-8213399 DecoderLocker is unused
- Resolved
(1 relates to)