Conflicting use of StackWatermark in StackWalker vs GC?
Roman Kennke
rkennke at redhat.com
Tue Feb 9 13:54:45 UTC 2021
Hello all,
When running StackWalker tests with 'aggressive' Shenandoah mode (i.e.
run GCs all the time, even if there is no work), then I observe crashes
like this:
# Internal Error
(/home/rkennke/src/openjdk/jdk/src/hotspot/share/runtime/stackWatermark.cpp:178),
pid=549168, tid=549230
# assert(is_frame_safe(f)) failed: Frame must be safe
Full hs_err:
http://cr.openjdk.java.net/~rkennke/hs_err_pid549168.log
I strongly suspect that this is happening because of StackWalker's use
of StackWatermark which conflicts with the GC's own use of StackWalker.
IOW, it asserts that the frame has been processed, but the GC is still
on it.
Are we missing some coordination between StackWalker and the GC here?
It can be reproduced using:
CONF=linux-x86_64-server-fastdebug make run-test
TEST=java/lang/StackWalker
TEST_VM_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC
-XX:ShenandoahGCHeuristics=aggressive"
Thanks,
Roman
More information about the hotspot-gc-dev
mailing list