Integrated: 8282704: runtime/Thread/StopAtExit.java may leak memory

Daniel D.Daugherty dcubed at openjdk.java.net
Sat Mar 19 13:45:28 UTC 2022


On Tue, 15 Mar 2022 14:56:29 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

> Fix memory leak/pinning in runtime/Thread/StopAtExit.java stress test.
> Change the test to:
> - create and use its own ThreadGroup so it knows the expected thread count
> - detect failures to cleanup the ThreadGroup
> - these failures to cleanup can occur due to ThreadStop landing during Thread.exit()
> 
> The test uses reflection to call the package private ThreadGroup.threadTerminated()
> or ThreadGroup.destroy() as needed. Sometimes the manual cleanup is not needed;
> in a 30 second run, I typically see between 0-5 manual cleanups on my MBP13.

This pull request has now been integrated.

Changeset: 3f923b82
Author:    Daniel D. Daugherty <dcubed at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/3f923b82c31325504430b50dee262fd460004e7b
Stats:     66 lines in 1 file changed: 63 ins; 0 del; 3 mod

8282704: runtime/Thread/StopAtExit.java may leak memory

Reviewed-by: dholmes, alanb

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

PR: https://git.openjdk.java.net/jdk/pull/7819


More information about the hotspot-runtime-dev mailing list