RFR: 8360702: runtime/Thread/AsyncExceptionTest.java timed out [v2]

David Holmes dholmes at openjdk.org
Fri Oct 3 06:21:46 UTC 2025


On Thu, 2 Oct 2025 20:34:02 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> Please review this small test fix. To make sure the worker thread receives the async exception at a safe place, we should avoid using synchronization objects where the worker thread might need to unpark the main thread. Otherwise, if the main thread is virtual, the async exception might be set while the worker is still executing FJP code. See JBS comments for more detail.
>> 
>> I fixed test AsyncExceptionOnMonitorEnter.java too and removed it from test/hotspot/jtreg/ProblemList-Virtual.txt. The alternative was to problem list AsyncExceptionTest.java, but I think it’s better if we can just keep the tests for this mode too.
>> 
>> Thanks,
>> Patricio
>
> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
> 
>   David's comments

test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java line 95:

> 93:             throw new Error("Unexpected: " + e);
> 94:         } finally {
> 95:             exitRawMonitor();

This isn't quite right. If we have the exit in the finally block then it should be deleted from the main block. But we also need the enter to be outside the scope of the try-catch-finally incase we abort before entering the raw monitor. Not worth wasting time on this part - just restore it to how it was.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27582#discussion_r2400919911


More information about the hotspot-runtime-dev mailing list