Integrated: 8373102: com/sun/jdi/MethodInvokeWithTraceOnTest.java can fail with ObjectCollectedException when run with a small heap
Chris Plummer
cjplummer at openjdk.org
Fri Dec 5 15:43:24 UTC 2025
On Thu, 4 Dec 2025 21:00:41 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> With JDI tracing enabled, an attempt to trace an event when using SUSPEND_NONE can result in an ObjectCollectedException because the thread is still running and objects that are part of the trace can be collected already. In this case were were dealing with trying to print the thread name for a VirtualThreadEndEvent, and the virtual thread has already exited and been gc'd.
>
> Tested by running test case before change (verified failure) and after change (50 runs without a failure). Will also run tier1 and tier5 svc just to be sure.
This pull request has now been integrated.
Changeset: ee0b8a72
Author: Chris Plummer <cjplummer at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/ee0b8a72c64f7ac5058dbe5b2062cb35b6195484
Stats: 18 lines in 2 files changed: 14 ins; 1 del; 3 mod
8373102: com/sun/jdi/MethodInvokeWithTraceOnTest.java can fail with ObjectCollectedException when run with a small heap
Reviewed-by: amenkov, sspitsyn
-------------
PR: https://git.openjdk.org/jdk/pull/28666
More information about the serviceability-dev
mailing list