RFR: 8294924: JvmtiExport::post_exception_throw() doesn't deal well with concurrent stack processing [v2]

David Holmes dholmes at openjdk.org
Tue Nov 29 01:35:27 UTC 2022


On Mon, 28 Nov 2022 11:52:22 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> There is a stack walk in JvmtiExport::post_exception_throw() that has safepoints in it. This trips up the stack watermark code. This patch adds a RAII object to JvmtiExport::post_exception_throw() that keeps the thread and its stack fully processed throughout the function.
>> Testing: tier1-7 of ZGC tests on linux x86_64 debug and manual testing of the test that failed.
>
> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add comment

Thanks for the added comment. I can approve this as-is but I think we have a significant problem here as it remains completely unclear when `KeepStackGCProcessedMark` is needed or how its omission would be detected. This seems extremely fragile.

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-dev mailing list