Skip to content

Fix memory leaks in OMRCodeCacheManager.cpp - #7627

Merged
dsouzai merged 1 commit into
eclipse-omr:masterfrom
mstoodle:fix_leak
Feb 7, 2025
Merged

dsouzai merged 1 commit into
eclipse-omr:masterfrom
mstoodle:fix_leak

Conversation

@mstoodle

Copy link
Copy Markdown
Contributor

discovered with valgrind working on JB2, may be worth some openj9 tests before merging so I'll leave as WIP for now.

discovered with valgrind working on JB2

Signed-off-by: Mark Stoodley <mstoodle@ca.ibm.com>
@mstoodle
mstoodle requested a review from dsouzai as a code owner January 24, 2025 18:56
@mstoodle
mstoodle marked this pull request as draft January 24, 2025 18:57
@mstoodle

Copy link
Copy Markdown
Contributor Author

@mpirvu any thoughts on the safety of destroying the cache list mutex and repository monitor as part of destroying the CodeCacheManager? I seem to recall we've run into shutdown issues around cleaning up the code cache manager in the past. Do you recommend I find a way to isolate OpenJ9 from this change?

@mpirvu

mpirvu commented Jan 27, 2025

Copy link
Copy Markdown
Contributor

As far as I can tell we don't destroy the manager in OpenJ9, so this change should be safe.

@mstoodle mstoodle changed the title WIP: Fix memory leaks in OMRCodeCacheManager.cpp Fix memory leaks in OMRCodeCacheManager.cpp Jan 30, 2025
@mstoodle
mstoodle marked this pull request as ready for review January 30, 2025 16:14
@mstoodle

Copy link
Copy Markdown
Contributor Author

I don't believe this will break OpenJ9 either

@mstoodle

mstoodle commented Feb 5, 2025

Copy link
Copy Markdown
Contributor Author

@dsouzai could I get a review from you here, please, when you have a moment?

@dsouzai dsouzai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me both from an OMR pov and an OpenJ9 pov; for the latter, because the compilation and sampler threads are stopped before destroying the code cache manager, no one needs to acquire those monitors at this point.

@dsouzai

dsouzai commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

jenkins build all

1 similar comment
@dsouzai

dsouzai commented Feb 7, 2025

Copy link
Copy Markdown
Contributor

jenkins build all

@dsouzai

dsouzai commented Feb 7, 2025

Copy link
Copy Markdown
Contributor

ppcle failure due to #6571; zos nodes are offline; riscv build was aborted because the jenkins CI went down.

Don't see a point in restarting riscv as it takes a long time and this change is common code. Merging.

@dsouzai
dsouzai merged commit 6086f94 into eclipse-omr:master Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants