On Tue, 23 Jun 2026 04:50:52 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).
>
> Serguei Spitsyn has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   remove leftover changes of another bug fix

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

> 57:         } catch (Throwable t) {
> 58:             t.printStackTrace(System.out);
> 59:             throw new RuntimeException("VThreadTest failed: PRODUCER 
> caught a throwable: " + t");

This is failing to compile:

/home/runner/work/jdk/jdk/test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadTest/VThreadTest.java:59:
 error: unclosed string literal
            throw new RuntimeException("VThreadTest failed: PRODUCER caught a 
throwable: " + t");
                                                                                
              ^

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

> 68:         } catch (Throwable t) {
> 69:             t.printStackTrace(System.out);
> 70:             throw new RuntimeException("VThreadTest failed: CONSUMER 
> caught a throwable: " + t");

Same quoting problem on this line.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31581#discussion_r3468686366
PR Review Comment: https://git.openjdk.org/jdk/pull/31581#discussion_r3468688014

Reply via email to