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

Erik Österlund eosterlund at openjdk.org
Tue Jan 3 08:51:49 UTC 2023


On Tue, 3 Jan 2023 05:20:06 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix release build
>
> src/hotspot/share/runtime/disableStackTracingMark.cpp line 34:
> 
>> 32:   : _jt(nullptr),
>> 33:     _sp(nullptr) {
>> 34:   if (jt == Thread::current()) {
> 
> Just a drive-by comment, but what is the case for `jt` not being the current thread?

If one thread is processing oops of a different thread, for example when you perform a handshake with a target thread and its oops need to be sane, then the jt is the target thread, which is not the current one. But the stack sampling is based on the current thread always, so if the passed in thread isn't the current thread, there is nothing to do. Hmm - I should add a comment shouldn't I? :-)

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

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


More information about the hotspot-dev mailing list