> There are two GC related issues with this test that are being addressed. The 
> test was limiting the heap size to 6m so if there is still a leak, it will be 
> detected quickly. This proved to be too small of a size when using ZGC. For 
> the most part changing the size to 7m fixed this issue. However, I was still 
> seeing frequent issues with ZGC on macOS. This is explained by 
> [JDK-8304449](https://bugs.openjdk.org/browse/JDK-8304449), which noticed 
> (rarely) OOME on macos even when not using ZGC. From JDK-8304449:
> 
> "macOS has a thread behavior that is not seen on linux and windows that is 
> causing more memory usage, which sometimes leads to this unexpected OOME. The 
> debuggee side of the test constantly creates threads that do little more than 
> a short sleep. It has a counter of "live" threads, and won't let that go over 
> 500. On the debugger side it is just tracking ThreadStartEvents and 
> ThreadDeathEvents. It keep tracks of threads (ThreadReferences) for which a 
> ThreadStartEvent had been received but a ThreadDeathEvent has not. On linux 
> and windows the count of outstanding threads is generally in the 200-400 
> range, sometimes briefly going over 500. However, on macOS it is closer to 
> 2400. This means a lot more ThreadReferences being tracked, which means more 
> memory usage, so sometimes you see an OOME on macOS as a result. "
> 
> The `threads` collection mainly existed just so its size could be used to log 
> the number of outstanding ThreadDeathEvents. I got rid of the `threads` 
> collection and instead am just tracking the number of ThreadStartEvents and 
> ThreadDeathEvents, and computing the difference to get the number of 
> outstanding ThreadDeathEvents.

Chris Plummer has updated the pull request incrementally with one additional 
commit since the last revision:

  get rid of some locals that are not needed

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13130/files
  - new: https://git.openjdk.org/jdk/pull/13130/files/2a2efb13..89f73875

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13130&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13130&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/13130.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13130/head:pull/13130

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

Reply via email to