RFR: 8298377: JfrVframeStream causes deadlocks in ZGC [v2]

Markus Grönlund mgronlun at openjdk.org
Wed Jan 18 15:07:14 UTC 2023


On Wed, 18 Jan 2023 14:31:17 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> Stefan Karlsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'upstream/master' into 8298377_zgc_jfr_loom_deadlock
>>  - Start stack watermark processing from JFR async profiler
>>  - Only skip if stack watermark processing has not started
>>  - Merge remote-tracking branch 'upstream/master' into 8298377_zgc_jfr_loom_deadlock
>>  - 8298377: JfrVframeStream causes deadlocks in ZGC
>
> src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp line 393:
> 
>> 391:   // stack walk over Loom continuations. The stack walking code will otherwise
>> 392:   // skip frames in stack chunks on the Java heap.
>> 393:   StackWatermarkSet::start_processing(thread, StackWatermarkKind::gc);
> 
> Maybe this should be moved to under each thread_state_in_java() and thread_state_in_native() preliminary check, see below. That way we only call on threads that we will eventually attempt to suspend.

Just put it in each of JfrThreadSampleClosure::sample_thread_in_java() and JfrThreadSampleClosure::sample_thread_in_native() member functions,

-------------

PR: https://git.openjdk.org/jdk/pull/11586


More information about the hotspot-jfr-dev mailing list