JDK-4808151 : crash in AsyncGetCallTrace() when invoked during Deoptimization
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.
When a method is being deoptimized, its callstack can not be safely
walked by AsyncGetCallTrace().
BugTraq+ Release Management Values
COMMIT TO FIX:
At first glance, the DeoptimizationMarker object appears to provide
the flag needed to prevent AsyncGetCallTrace() from walking a stack
that is in the process of being deoptimized.
DeoptimizationMarker objects set a global flag during several deopt
However, Deoptimization::unpack_frames() does not create any
DeoptimizationMarker objects so the flag is not necessarily set
during the unpack_frames() call.
All of the stack traces listed in the comments section show code that
executes from the deoptimization handler. I experimented with just
protecting the unpack_frames() call, but that is insufficient. The
deoptimization handler itself creates temporary frames in preparation
for unpack_frames(). AsyncGetCallTrace() can also get confused by the
It looks like marking the thread as being in the deoptimization
handler is the safest thing to do. AsyncGetCallTrace() can detect
the new condition and bail out.
crash in AsyncGetCallTrace() when invoked during Deoptimization