Skip to content

Conversation

@fandreuz
Copy link
Contributor

@fandreuz fandreuz commented Jul 8, 2025

I've been working on a backport to fix JDK-8339725. The fix attached to the ticket is not enough to fix the problem on jdk11.

The missing backport is JDK-8214972, which I apply in this PR. JDK-8210321 is also needed to provide ClassLoaderData::holder_no_keepalive.

Tier1 tests completed successfully.


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-8210321 needs maintainer approval
  • JDK-8214972 needs maintainer approval

Issues

  • JDK-8214972: Uses of klass_holder() except GC need to apply GC barriers (Bug - P3 - Rejected)
  • JDK-8210321: Create NO_KEEPALIVE CLD holder accessor (Enhancement - P4 - Rejected)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3059

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 8, 2025

👋 Welcome back fandreuz! 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
Copy link

openjdk bot commented Jul 8, 2025

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

@openjdk openjdk bot changed the title Backport 3d0faa649cc9095d21e40e0644cc9a0fc56f907f 8214972: Uses of klass_holder() except GC need to apply GC barriers Jul 8, 2025
@openjdk
Copy link

openjdk bot commented Jul 8, 2025

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

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Jul 8, 2025
@fandreuz
Copy link
Contributor Author

fandreuz commented Jul 8, 2025

/issue add JDK-8210321

@openjdk
Copy link

openjdk bot commented Jul 8, 2025

@fandreuz
Adding additional issue to issue list: 8210321: Create NO_KEEPALIVE CLD holder accessor.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 8, 2025
@fandreuz fandreuz marked this pull request as draft July 8, 2025 15:08
@openjdk openjdk bot removed the rfr Pull request is ready for review label Jul 8, 2025
Fix klass_holder() and make all callers use it, remove holder_phantom().

Reviewed-by: eosterlund, dlong
@fandreuz fandreuz force-pushed the JDK-8210321-JDK-8214972 branch from 119f75c to d7b5998 Compare July 8, 2025 15:16
@fandreuz fandreuz marked this pull request as ready for review July 8, 2025 15:28
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 8, 2025
@mlbridge
Copy link

mlbridge bot commented Jul 8, 2025

Webrevs

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

This looks ok, but why is it needed as a prereq for JDK-8339725?

Given that 11u is old, why do you want to backport it? Do you have production use issues? I recommend running both tier1 and tier2, with both fastdebug and release JDKs.

@fandreuz
Copy link
Contributor Author

fandreuz commented Jul 9, 2025

@phohensee

This looks ok, but why is it needed as a prereq for JDK-8339725?

It's difficult to pinpoint the specific issue as the problem manifests as a segfault in an unrelated location. I determined JDK-8214972 is needed by bisecting the history and cherry-picking JDK-8339725 into each commit. The commit related to JDK-8214972 is the first where the reproducer attached to JDK-8339725 runs successfully. Applying both JDK-8339725 and JDK-8214972 to jdk11 solves the problem indeed.

Given that 11u is old, why do you want to backport it? Do you have production use issues?

We had an occurrence of this issue in async-profiler/async-profiler#974. As reported by the user, the problem affects jdk11 too. JDK-8339725 was already backported to jdk17: openjdk/jdk17u-dev#3646.

I recommend running both tier1 and tier2, with both fastdebug and release JDKs.

I ran tier1 with release already, I'll start a tier2 run with fastdebug.

@fandreuz
Copy link
Contributor Author

fandreuz commented Jul 9, 2025

@phohensee I ran the following test suites:

  • release
    • tier1: all tests pass
    • tier2: all tests pass except for:
      • ConnectionReuseTest::testConnReuse
      • DirectIOTest
  • fastdebug
    • tier1: all tests pass
    • tier2: all tests pass except for:
      • ConnectionReuseTest::testConnReuse
      • DirectIOTest

The failures don't seem to be related to my changes, possibly flaky tests? I found tickets related to them (e.g. JDK-8305900) which haven't been backported to jdk11.

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

Thanks for the explanation and additional testing.

@openjdk
Copy link

openjdk bot commented Jul 11, 2025

⚠️ @fandreuz This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk
Copy link

openjdk bot commented Jul 11, 2025

@fandreuz
8214972: The approval request has been created successfully.
8210321: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Jul 11, 2025
@fandreuz
Copy link
Contributor Author

/approval request Backporting as a prerequisite to backport and fix JDK-8339725. We had an occurrence of that crash, reported by an Async-Profiler user: async-profiler/async-profiler#974

The two backports in this PR apply almost cleanly, except for some trivial conflicts due to the fact that JDK-8209301 has not been backported to jdk11.

Ran tier1 and tier2 test suites with release and fastdebug, I didn't notice any regression.

@openjdk
Copy link

openjdk bot commented Jul 11, 2025

@fandreuz
8214972: The approval request has been updated successfully.
8210321: The approval request has been updated successfully.

@jerboaa
Copy link
Contributor

jerboaa commented Jul 14, 2025

/approve no

The risk of introducing this change doesn't outweigh the benefit of fixing an async profiler issue at this point in time of JDK 11 life-cycle. Users need to either a) run without async-profiler b) upgrade to JDK 17.

@openjdk
Copy link

openjdk bot commented Jul 14, 2025

@jerboaa
8214972: The approval request has been rejected.
8210321: The approval request has been rejected.

@openjdk openjdk bot removed the approval Requires approval; will be removed when approval is received label Jul 14, 2025
@fandreuz fandreuz closed this Jul 16, 2025
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.

3 participants