Skip to content

8390874: MethodData::extra_data_lock memory leak - #769

Open
synecdoche wants to merge 1 commit into
openjdk:masterfrom
synecdoche:JDK-8390874
Open

8390874: MethodData::extra_data_lock memory leak#769
synecdoche wants to merge 1 commit into
openjdk:masterfrom
synecdoche:JDK-8390874

Conversation

@synecdoche

@synecdoche synecdoche commented Aug 27, 2026

Copy link
Copy Markdown

Description

This change deletes C heap allocated Mutex objects associated with MethodData instances, which fixes a slow leak when MethodData instances are deallocated.

This was not a clean backport due to the removal of JVMCI upstream. MethodData::release_C_heap_structures() was empty upstream but contains the line FailedSpeculation::free_failed_speculations(get_failed_speculations_address()); in this code base. I added the Mutex deletion after the JVMCI code.

Testing

No tier 1 regressions. Tested with:

  • Linux x86_64 fastdebug
  • Linux x86_64 release


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8390874 needs maintainer approval

Issue

  • JDK-8390874: MethodData::extra_data_lock memory leak (Bug - P2)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/769/head:pull/769
$ git checkout pull/769

Update a local copy of the PR:
$ git checkout pull/769
$ git pull https://git.openjdk.org/jdk25u-dev.git pull/769/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 769

View PR using the GUI difftool:
$ git pr show -t 769

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/769.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Aug 27, 2026

Copy link
Copy Markdown

👋 Welcome back synecdoche! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Aug 27, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@synecdoche synecdoche changed the title 8390874: MethodData::extra_data_lock memory leak Backport 42541685a975483557b643d7caa4e1254772fdaf Aug 27, 2026
@openjdk openjdk Bot changed the title Backport 42541685a975483557b643d7caa4e1254772fdaf 8390874: MethodData::extra_data_lock memory leak Aug 27, 2026
@openjdk

openjdk Bot commented Aug 27, 2026

Copy link
Copy Markdown

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk Bot added the backport Port of a pull request already in a different code base label Aug 27, 2026
@synecdoche
synecdoche marked this pull request as ready for review August 31, 2026 19:34
@openjdk openjdk Bot added the rfr Pull request is ready for review label Aug 31, 2026
@mlbridge

mlbridge Bot commented Aug 31, 2026

Copy link
Copy Markdown

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant