[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8304436: com/sun/jdi/ThreadMemoryLeakTest.java fails with "OutOfMemoryError: Java heap spac
From:       Chris Plummer <cjplummer () openjdk ! org>
Date:       2023-03-29 21:50:34
Message-ID: 3VbqFGgJf2mLJvmv1Fd4EdCmDfYq8FM3zmw82lFNuxM=.1e221416-b5b6-4cff-9a9f-ed0fd9f686aa () github ! com
[Download RAW message or body]

On Tue, 21 Mar 2023 22:38:18 GMT, Chris Plummer <cjplummer@openjdk.org> wrote:

> > 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

Just the one test.

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

PR Comment: https://git.openjdk.org/jdk/pull/13130#issuecomment-1489294898


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic