RFR: 8356648: runtime/Thread/AsyncExceptionTest.java fails with +StressCompiledExceptionHandlers [v3]

Tobias Hartmann thartmann at openjdk.org
Fri May 23 07:18:52 UTC 2025


On Fri, 23 May 2025 00:34:11 GMT, Dean Long <dlong at openjdk.org> wrote:

>> The test fails (or times out) because Runtime1::counter_overflow offers a safepoint, allowing async exceptions, but there is no exception handler for the out-of-line slow path call to Runtime1::counter_overflow.  Rather than add an exception handler, the simple fix is to replace JRT_BLOCK with JRT_BLOCK_NO_ASYNC so that counter_overflow doesn't need to deal with async exceptions.  The GC poll point for backwards branches is sufficient to allow async exceptions.
>> I also improved the test so that it fails more quickly rather than waiting forever and eventually timing out, and added a C1-specific run using -XX:+StressCompiledExceptionHandlers.
>
> Dean Long has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java
>   
>   Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>

Similar to [JDK-8353638](https://bugs.openjdk.org/browse/JDK-8353638), wouldn't it make sense to now make the behavior of `StressCompiledExceptionHandlers` the default to avoid deopts on async exceptions? I.e., get rid of this code and potentially add another stress flag that triggers deopt:

https://github.com/openjdk/jdk/blob/a919f6d04e5e1e3ccb123132ad945b240345dcaf/src/hotspot/share/runtime/javaThread.cpp#L1094-L1106

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

PR Review: https://git.openjdk.org/jdk/pull/25375#pullrequestreview-2863443513


More information about the hotspot-dev mailing list