RFR: 8274196: Crashes in VM_HeapDumper::work after JDK-8252842
Coleen Phillimore
coleenp at openjdk.java.net
Fri Sep 24 15:05:27 UTC 2021
On Fri, 24 Sep 2021 14:05:48 GMT, Lin Zang <lzang at openjdk.org> wrote:
>> I think it may be because this is actually not a JavaThread. So the assert in `Mutex::check_no_safepoint_state` would pass.
>> Moreover, I have tried to use `PaddedMonitor(Mutex::nosafepoint, "ParallelHProfWriter_lock", Mutex::_safepoint_check_never);` here, but the slowdebug would report errors as you mentioned in JDK-8274245.
>
> I agree the flag here and at the place of lock acquiring seems problematic. I will try to see whether I can use `Mutex::_safepoint_check_never` here and get rid of the assert.
yes
void Mutex::check_no_safepoint_state(Thread* thread) {
check_block_state(thread);
assert(!thread->is_active_Java_thread() || _safepoint_check_required != _safepoint_check_always,
"This lock should always have a safepoint check for Java threads: %s",
name());
}
yes, we exclude the check for a non-java thread, which I thought was an odd exclusion last time I looked. I pass the tests in sun/tools/jmap/BasicJMapTest.java so maybe leave it for now?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5681
More information about the serviceability-dev
mailing list