Skip to content

8348800: Many serviceability/sa tests failing after JDK-8348239 #23339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Jan 28, 2025

DeoptimizeObjectsALotThread was being unconditionally added to the mapping table:

   virtualConstructor.addMapping("DeoptimizeObjectsALotThread", DeoptimizeObjectsALotThread.class);

But is conditionally included in VMStructs:

     DEBUG_ONLY(COMPILER2_OR_JVMCI_PRESENT( \
      declare_type(DeoptimizeObjectsALotThread, JavaThread))) \ 

There is code that iterates over all the mapping table entries and calls db.lookupType() on each. This results in a RuntimeException if the type is not present in the type database:

Caused by: java.lang.RuntimeException: No type named "DeoptimizeObjectsALotThread" in database

The fix is to not add it to the mapping table if it is not present in the database.

Testing is in progresses. I did test locally with a debug build using TEST_VM_OPTS=-XX:+DeoptimizeObjectsALot to make sure the original DeoptimizeObjectsALotThread issue is still fixed, and then tested a release build without TEST_VM_OPTS=-XX:+DeoptimizeObjectsALot to make sure this new issue did not reproduce.


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

Issue

  • JDK-8348800: Many serviceability/sa tests failing after JDK-8348239 (Bug - P2)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23339/head:pull/23339
$ git checkout pull/23339

Update a local copy of the PR:
$ git checkout pull/23339
$ git pull https://git.openjdk.org/jdk.git pull/23339/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23339

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23339.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 28, 2025

👋 Welcome back cjplummer! 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 Jan 28, 2025

@plummercj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8348800: Many serviceability/sa tests failing after JDK-8348239

Reviewed-by: shade, kevinw, lmesnik

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 5 new commits pushed to the master branch:

  • 1efae9a: 8348888: tier1 closed build failure on Windows after JDK-8348348
  • c018a60: 8344637: Fix Page8 of manual test java/awt/print/PrinterJob/PrintTextTest.java on Linux and Windows
  • c3c3888: 8336760: [JVMCI] -XX:+PrintCompilation should also print "hosted" JVMCI compilations
  • 9f4d3de: 8347718: Unexpected NullPointerException in C2 compiled code due to ReduceAllocationMerges
  • a224f12: 8348205: Improve cutover time selection when building available currencies set

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title 8348800 8348800: Many serviceability/sa tests failing after JDK-8348239 Jan 28, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 28, 2025
@openjdk
Copy link

openjdk bot commented Jan 28, 2025

@plummercj The following label will be automatically applied to this pull request:

  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Jan 28, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 28, 2025

Webrevs

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Looks fine, but I have a minor suggestion:


/* Only add DeoptimizeObjectsALotThread if it is actually present in the type database. */
try {
db.lookupType("DeoptimizeObjectsALotThread");
Copy link
Member

Choose a reason for hiding this comment

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

I see there is public Type lookupType(String cTypeName, boolean throwException);, so this might be more accurately, without over-catching the exceptions:

  if (db.lookupType("DeoptimizeObjectsALotThread", false) != null) {
     virtualConstructor.addMapping("DeoptimizeObjectsALotThread", DeoptimizeObjectsALotThread.class);
  }

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I've updated to do that.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 28, 2025
Copy link
Contributor

@kevinjwalls kevinjwalls left a comment

Choose a reason for hiding this comment

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

Yes looks good.

@plummercj
Copy link
Contributor Author

Thanks Aleksey, Kevin, and Leonid.

/integrate

@openjdk
Copy link

openjdk bot commented Jan 28, 2025

Going to push as commit 98a93e1.
Since your change was applied there have been 7 commits pushed to the master branch:

  • 5e81fa6: 8348892: Properly fix compilation error for zip_util.c on Windows
  • 3a564ed: 8347955: TimeZone methods to stream the available timezone IDs
  • 1efae9a: 8348888: tier1 closed build failure on Windows after JDK-8348348
  • c018a60: 8344637: Fix Page8 of manual test java/awt/print/PrinterJob/PrintTextTest.java on Linux and Windows
  • c3c3888: 8336760: [JVMCI] -XX:+PrintCompilation should also print "hosted" JVMCI compilations
  • 9f4d3de: 8347718: Unexpected NullPointerException in C2 compiled code due to ReduceAllocationMerges
  • a224f12: 8348205: Improve cutover time selection when building available currencies set

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 28, 2025
@openjdk openjdk bot closed this Jan 28, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 28, 2025
@openjdk
Copy link

openjdk bot commented Jan 28, 2025

@plummercj Pushed as commit 98a93e1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

4 participants