JDK-8254668 : JVMTI process frames on thread without started processing
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-10-13
  • Updated: 2020-10-19
  • Resolved: 2020-10-14
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 16
16 b20Fixed
Related Reports
Relates :  
Description
This cause asserts like this:

#  Internal Error (/home/stefank/git/alt/open/src/hotspot/share/runtime/stackWatermark.inline.hpp:67), pid=828170, tid=828734
#  assert(processing_started()) failed: Processing should already have started

Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1626d75]  StackWatermarkSet::on_iteration(JavaThread*, frame const&)+0xd5
V  [libjvm.so+0xad791a]  frame::sender(RegisterMap*) const+0x7a
V  [libjvm.so+0xacd3f8]  frame::real_sender(RegisterMap*) const+0x18
V  [libjvm.so+0x1804c4a]  vframe::sender() const+0xea
V  [libjvm.so+0x175f47b]  JavaThread::last_java_vframe(RegisterMap*)+0x5b
V  [libjvm.so+0x10e10fc]  JvmtiEnvBase::vframeFor(JavaThread*, int)+0x4c
V  [libjvm.so+0x10e6972]  JvmtiEnvBase::check_top_frame(Thread*, JavaThread*, jvalue, TosState, Handle*)+0xe2
V  [libjvm.so+0x10e759c]  JvmtiEnvBase::force_early_return(JavaThread*, jvalue, TosState)+0x11c
V  [libjvm.so+0x105b8f5]  jvmti_ForceEarlyReturnObject+0x215

The proposal is to dodge this problem by turning of "frame processing" for these calls. The processing is only needed when oops are read, and the current code doesn't read oops.
Comments
Changeset: db9dcdf1 Author: Stefan Karlsson <stefank@openjdk.org> Date: 2020-10-14 10:29:15 +0000 URL: https://git.openjdk.java.net/jdk/commit/db9dcdf1
14-10-2020

Reproducer: makec ../build/fastdebug/ test TEST=test/hotspot/jtreg/vmTestbase/nsk/jvmti JTREG="JAVA_OPTIONS=-XX:+UseZGC -Xmx2g -XX:ZCollectionInterval=1 -XX:ZFragmentationLimit=0.01" JTREG_EXTRA_PROBLEM_LISTS=ProblemList-zgc.txt
13-10-2020