RFR: 8331553: Windows JVM leaks Event and Thread handles when multiple threads are used

Daniel Jeliński djelinski at openjdk.org
Wed Jun 19 13:12:10 UTC 2024


On Wed, 19 Jun 2024 12:09:41 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> With UseHeavyMonitors, even uncontended locks are inflated to OMs.

I don't think that matters much for the changed code; only the implementation of park/unpark methods changed, and these methods are called for contended locks only.

I ran the philosophers benchmark without heavy monitors; the results before and after were very similar, the difference between the averages was way below the standard deviation. I'll look into running the benchmark with heavy monitors next.

I found the EventWait code deep in the archives...

  // On Windows millis values greater than max_millis_value
  // have special semantics.
  const DWORD max_millis_value = 0xFFFF0000;

searching the net for FFFF0000, I found another piece of code [here](https://opensource.apple.com/source/llvmgcc42/llvmgcc42-2118/gcc/ada/s-taprop-mingw.adb.auto.html):

      Time_Out_Max : constant DWORD := 16#FFFF0000#;
      --  NT 4 cannot handle timeout values that are too large,
      --  e.g. DWORD'Last - 1

I will update the comment.

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

PR Comment: https://git.openjdk.org/jdk/pull/19778#issuecomment-2178685294


More information about the build-dev mailing list