On Thu, 18 Jun 2026 21:46:38 GMT, Serguei Spitsyn <[email protected]> wrote:

> The test does not handle exceptions, e.g. `InterruptedException`, in the 
> `Producer` and `Consumer` threads. This can cause deadlocks. This timeout 
> issue is hard to reproduce. This update is to add catch any `Throwable` and 
> log all information needed to understand the root cause.
> Also, removed unneeded fragment with the call: 
> `System.loadLibrary(agentLib);`.
> 
> Testing:
>  - Executed the test locally: 
> `serviceability/jvmti/vthread/VThreadTest/VThreadTest.java`
>  - TBD: Submit: mach5 tiers 1-3 to be completely safe
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadTest/VThreadTest.java 
line 60:

> 58:             }
> 59:         } catch (Throwable t) {
> 60:             log("Failed: PRODUCER caught a trowable: " + t);

Suggestion:

            log("Failed: PRODUCER caught a throwable: " + t);

test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadTest/VThreadTest.java 
line 71:

> 69:             }
> 70:         } catch (Throwable t) {
> 71:             log("Failed: CONSUMER caught a trowable: " + t);

Suggestion:

            log("Failed: CONSUMER caught a throwable: " + t);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31581#discussion_r3447863641
PR Review Comment: https://git.openjdk.org/jdk/pull/31581#discussion_r3447863791

Reply via email to