RFR: 8261448: Preserve GC stack watermark across safepoints in StackWalk [v2]
Roman Kennke
rkennke at openjdk.java.net
Mon Feb 15 15:20:59 UTC 2021
On Mon, 15 Feb 2021 09:26:03 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Nesting code looks wrong.
>
> I incorrectly read Erik's comment as "Nesting code looks **good**", so I created a unit test to show the problem with the patch:
> https://github.com/stefank/jdk/commit/8760f1b0409b3cccf76a8ea417b90e66da31af72
>
> Maybe you could build a few more test based on this?
> I think this solution is wrong, regarding nesting. There is only a single node but it looks like you think there are multiple. The result is seemingly that the unlink function won't unlink anything, which permanently disables incremental stack scanning on that thread.
> Is there any way the mark can be placed closer to the problematic allocation so we don't need nesting?
I just realized that the reentrancy comes from the Java call lower in fetchFirstBatch(). The problem can be easily avoided by putting the KeepStackGCProcessedMark in sensible scope that excludes the call.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2500
More information about the hotspot-gc-dev
mailing list