Skip to content

8376185: NoSuchFieldError thrown after a record with type annotation retransformed#2900

Open
jpbempel wants to merge 2 commits into
openjdk:masterfrom
openjdk-bots:backport-jpbempel-0c60c9ca-master
Open

8376185: NoSuchFieldError thrown after a record with type annotation retransformed#2900
jpbempel wants to merge 2 commits into
openjdk:masterfrom
openjdk-bots:backport-jpbempel-0c60c9ca-master

Conversation

@jpbempel

@jpbempel jpbempel commented May 14, 2026

Copy link
Copy Markdown
Member

Hi all,

This pull request contains a backport of commit 0c60c9ca from the openjdk/jdk repository.

The commit being backported was authored by Jean-Philippe Bempel on 25 Mar 2026 and was reviewed by Serguei Spitsyn and David Holmes.

Thanks!



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-8376185 needs maintainer approval

Issue

  • JDK-8376185: NoSuchFieldError thrown after a record with type annotation retransformed (Bug - P4 - Requested)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2900

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented May 14, 2026

Copy link
Copy Markdown

👋 Welcome back jpbempel! 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 May 14, 2026

Copy link
Copy Markdown

❗ 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 0c60c9ca1477a114a9c7095226d3a1e5d31600fb 8376185: NoSuchFieldError thrown after a record with type annotation retransformed May 14, 2026
@openjdk

openjdk Bot commented May 14, 2026

Copy link
Copy Markdown

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

@openjdk openjdk Bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels May 14, 2026
@openjdk

openjdk Bot commented May 14, 2026

Copy link
Copy Markdown

⚠️ @jpbempel 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 openjdk Bot added the rfr Pull request is ready for review label May 14, 2026
@jpbempel

Copy link
Copy Markdown
Member Author

/approval request retransformation on a record with type annotation on a record component leads to a corrupted state in the JVM memory. Best cases we have an exception, worst cases a JVM crash. It is common to use type annotation like @NotNull on the record components.

@openjdk

openjdk Bot commented May 14, 2026

Copy link
Copy Markdown

@jpbempel
8376185: The approval request has been created successfully.

@openjdk openjdk Bot added the approval Requires approval; will be removed when approval is received label May 14, 2026
@mlbridge

mlbridge Bot commented May 14, 2026

Copy link
Copy Markdown

Webrevs

@GoeLin

GoeLin commented May 17, 2026

Copy link
Copy Markdown
Member

We see java/lang/instrument/RetransformRecordTypeAnn/TestRetransformRecord.java failing in 25 now.

There is a bug open for this, please do a ProblemList change for this and backport that change.

By the way, how did you test this if the test is failing? I.e. without noticeing?

@jpbempel

Copy link
Copy Markdown
Member Author

We see java/lang/instrument/RetransformRecordTypeAnn/TestRetransformRecord.java failing in 25 now.

There is a bug open for this, please do a ProblemList change for this and backport that change.

By the way, how did you test this if the test is failing? I.e. without noticeing?

I was using latest jtreg, even for old JDK.
How I know which version of jtreg I need to use for a specific openjdk version/repo?

@GoeLin

GoeLin commented May 22, 2026

Copy link
Copy Markdown
Member

First, there was a bug open in JBS. Before you backport, you should check all bugs that are linked to the JBS issue.
If needed, you should backport them with your change. If not yet fixed, you should not backport the change.

https://bugs.openjdk.org/browse/JDK-8369488 is one of the changes that determines the jtreg to be used.
You find the previous and next jtreg bump linked, along with the information where it was pushed or backported.
Also you can look at the TEST.ROOT files in your repo which tell the minimum version.
Most tests work with any jtreg version, but some have problems either with older or younger. I usually use the minimum jtreg version, as does GHA. But GHA only runs tier1.

fix class case
fix classfile version
@openjdk openjdk Bot removed the clean Identical backport; no merge resolution required label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received 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.

2 participants