Skip to content

Conversation

tajila
Copy link
Contributor

@tajila tajila commented Oct 16, 2025

Currently, the monitor enter record pool is only free'd when the
continuation is removed from the continuation cache. This behaviour
causes memory leaks as a continuation may never be removed from the
cache.

Additionally, when allocate a new continuation each time
enterContinuation is called.

This PR takes the conservative approach of free the monitor records as
soon as the continuation is free'd. In future we should consider if the
monitor records can be persisted run to run. Currently, this has not
been tested yet.

Fixes: #22776

@tajila tajila force-pushed the user branch 2 times, most recently from 4e8b114 to be20f4a Compare October 16, 2025 20:53
@tajila
Copy link
Contributor Author

tajila commented Oct 16, 2025

jenkins test sanity xlinux64 jdk25

@tajila tajila requested a review from babsingh October 16, 2025 20:54
@tajila
Copy link
Contributor Author

tajila commented Oct 16, 2025

jenkins test sanity alinux64 jdk25

@tajila
Copy link
Contributor Author

tajila commented Oct 17, 2025

machine issues, Ill try the test again

@tajila
Copy link
Contributor Author

tajila commented Oct 17, 2025

jenkins test sanity alinux64 jdk25

@pshipton
Copy link
Member

jenkins compile xlinux jdk25

@tajila tajila added comp:vm project:loom Used to track Project Loom related work labels Oct 17, 2025
@tajila tajila marked this pull request as ready for review October 17, 2025 17:54
@pshipton
Copy link
Member

Lots of omrport.359 * ** ASSERTION FAILED ** at /home/jenkins/workspace/Build_JDK25_aarch64_linux_Personal/omr/port/common/omrmemtag.c:145: ((memoryCorruptionDetected))

Currently, the monitor enter record pool is only free'd when the
continuation is removed from the continuation cache. This behaviour
causes memory leaks as a continuation may never be removed from the
cache.

Additionally, when allocate a new continuation each time
enterContinuation is called.

This PR takes the conservative approach of free the monitor records as
soon as the continuation is free'd. In future we should consider if the
monitor records can be persisted run to run. Currently, this has not
been tested yet.

Fixes: eclipse-openj9#22776

Signed-off-by: tajila <[email protected]>
@tajila
Copy link
Contributor Author

tajila commented Oct 17, 2025

jenkins test sanity alinux64 jdk25

@pshipton
Copy link
Member

jenkins test sanity.openjdk amac jdk25

@pshipton
Copy link
Member

timeout in java/lang/Thread/virtual/Collectable.java which is #18463

@babsingh babsingh merged commit 911def1 into eclipse-openj9:master Oct 19, 2025
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:vm project:loom Used to track Project Loom related work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jdk25 memory leak at runtime/vm/ContinuationHelpers.cpp:132

3 participants