RFR: 8332154: Memory leak in SynchronousQueue [v2]

Viktor Klang vklang at openjdk.org
Fri May 17 11:39:32 UTC 2024


On Fri, 17 May 2024 11:35:55 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Local testing seems to indicate that this fix (which mirrors what's done in the FIFO mode) addresses the problem.
>> 
>> But with that said, I haven't come up with a decent way of adding some form of regression test. Suggestions are most welcome. /cc @DougLea
>
> Viktor Klang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adding a leak detection test for SynchronousQueue

test/jdk/java/util/concurrent/tck/SynchronousQueueTest.java line 668:

> 666:     }
> 667: 
> 668:     private void assertDoesntLeak(SynchronousQueue<Object> queue) throws InterruptedException {

@DougLea @AlanBateman Decided to create a memory leak detection test for SynchronousQueue. Of course, it will likely take some time to tune the parameters of it, but if it completes successfully there was no leak of queue items tho...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19271#discussion_r1604833973


More information about the core-libs-dev mailing list