Assert during stackwalk

Roman Kennke rkennke at redhat.com
Tue Feb 9 13:43:44 UTC 2021


Hi Ron,

> I don’t recall us changing anything about how StackWalker interacts with the stack watermark. Can you change the Fuzz test so
> that it doesn’t use continuations and see if this reproduces in mainline?

I don't know how to easily do this. There's a lot of 
continuation-specific stuff in there that doesn't look simple to turn 
into full-thread based implementation.

However, there *are* a number of StackWalker tests in JDK mainline that 
I can run, and they produce the same failure when running in aggressive 
mode (i.e. do back-to-back GCs even if there is no work).

I suspect that the StackWalker using StackWatermark is not going to work 
well if GC is using/manipulating the StackWatermark at the same time 
(during concurrent thread-stacks processing).

This test produces the problem:
make run-test TEST=java/lang/StackWalker 
TEST_VM_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC 
-XX:ShenandoahGCHeuristics=aggressive"

But I guess I should rather take this somewhere else (zgc-dev or 
hotspot-gc-dev I suppose) :-)

Thanks for helping out so far!
Roman


> — Ron
> 
>> On 8 Feb 2021, at 16:58, Roman Kennke <rkennke at redhat.com> wrote:
>>
>> Hello again,
>>
>> I think I have now implemented the proper parts for Shenandoah GC in ShHeap::requires_barriers() now (will send PR shortly) and now I'm hitting another problem: the Fuzz.java test throws an assertion at me (when running in Shenandoah aggressive mode, which does a *lot* of GC work):
>>
>> #  Internal Error (/home/rkennke/src/openjdk/loom/src/hotspot/share/runtime/stackWatermark.cpp:178), pid=54418, tid=54534
>> #  assert(is_frame_safe(f)) failed: Frame must be safe
>>
>> The full hs_err:
>> http://cr.openjdk.java.net/~rkennke/hs_err_pid54418.log
>>
>> It looks to me that the stackwalk uses the stack watermark mechanism, and this conflicts with Shenandoah's own use of the stack watermark to concurrently update thread roots during the evacuation phase. Am I missing some necessary coordination there?
>>
>> (Also, is this all Loom tests, or should I also run other tests too?
>>
>> make run-test TEST=java/lang/Continuation TEST_VM_OPTS="-XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive"
>>
>> )
>>
>> Thanks,
>> Roman
>>
> 



More information about the loom-dev mailing list