Integrated: 8311989: Test java/lang/Thread/virtual/Reflection.java timed out

Alan Bateman alanb at openjdk.org
Wed Aug 2 10:43:49 UTC 2023


On Fri, 28 Jul 2023 15:44:54 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> This is a test only change to a test that exercises core reflection from virtual threads. One of the tests (testNewInstance6) uses a custom scheduler in setup to check that calling a constructor reflectively, where the constructor parks, doesn't pin the underlying carrier. The test schedules an unpark from a virtual thread but the test is missing a call to Thread::join, thus creating a race between shutdown of the scheduler and the unpark. Two sightings of the test failing so far, both -Xcomp and ZGC.
> 
> While in the area, two usages of Thread.sleep in the test have been replaced with latches.

This pull request has now been integrated.

Changeset: 6faf05c6
Author:    Alan Bateman <alanb at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6faf05c6ddb3a0bcf4dce9516b8fca15d25cd80f
Stats:     20 lines in 1 file changed: 15 ins; 0 del; 5 mod

8311989: Test java/lang/Thread/virtual/Reflection.java timed out

Reviewed-by: jpai, mchung

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

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


More information about the core-libs-dev mailing list