Skip to content
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

8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION #16379

Closed
wants to merge 2 commits into from

Conversation

mgronlun
Copy link

@mgronlun mgronlun commented Oct 26, 2023

Greetings,

sometimes when running JFR with -Xverify:all, the bytecode retransform would fail with an JVMTI_ERROR_FAILS_VERIFICATION.

I say sometimes because it depends on whether event classes located in java.base are loaded before JFR is started.

If so, for those event classes, the type of the static field eventConfiguration is untyped, i.e. java.lang.Object, because the java.base module cannot use types in module jdk.jfr.

As part of the instrumentation of commit(), when issuing invokevirtual instructions for this receiver, a proper downcast must be performed using checkcast.

Testing: jdk_jfr

Thanks
Markus


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-8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16379

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 26, 2023

👋 Welcome back mgronlun! 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 Oct 26, 2023

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

  • hotspot-jfr

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 hotspot-jfr hotspot-jfr-dev@openjdk.org label Oct 26, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 26, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 26, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Oct 27, 2023

@mgronlun 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:

8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION

Reviewed-by: egahlin

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 20 new commits pushed to the master branch:

  • ddd0716: 8317661: [REDO] store/load order not preserved when handling memory pool due to weakly ordered memory architecture of aarch64
  • 141dae8: 8318811: Compiler directives parser swallows a character after line comments
  • 667cca9: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted"
  • b9dcd4b: 8318964: Fix build failures caused by 8315097
  • d52a995: 8315097: Rename createJavaProcessBuilder
  • 957703b: 8307168: Inconsistent validation and handling of --system flag arguments
  • 5b5fd36: 8316632: Shenandoah: Raise OOME when gc threshold is exceeded
  • abad040: 8313781: Add regression tests for large page logging and user-facing error messages
  • 9123961: 8318096: Introduce AsymmetricKey interface with a getParams method
  • 4a142c3: 8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11
  • ... and 10 more: https://git.openjdk.org/jdk/compare/970cd202049f592946f9c1004ea92dbd58abf6fb...master

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 added the ready Pull request is ready to be integrated label Oct 27, 2023
@mgronlun
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 30, 2023

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

  • 88b9cda: 8318981: compiler/compilercontrol/TestConflictInlineCommands.java fails intermittent with 'disallowed by CompileCommand' missing from stdout/stderr
  • c9d23c3: 8315532: Compiler Implementation for Unnamed Variables & Patterns
  • 3934127: 8318709: Improve System.nanoTime performance on Windows
  • 83eb206: 8318889: C2: add bailout after assert Bad graph detected in build_loop_late
  • 1183b22: 8310978: JFR events SocketReadEvent/SocketWriteEvent for Socket adaptor ops
  • 988e1df: 8318953: RISC-V: Small refactoring for MacroAssembler::test_bit
  • ce0ca47: 8319067: ProblemList serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java on linux-aarch64 in Xcomp mode
  • db34025: 8318827: RISC-V: Improve readability of fclass result testing
  • 1ec0d02: 8318225: RISC-V: C2 UModI
  • 96bec35: 8316996: Catalog API Enhancement: add a factory method
  • ... and 24 more: https://git.openjdk.org/jdk/compare/970cd202049f592946f9c1004ea92dbd58abf6fb...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 30, 2023

@mgronlun Pushed as commit c4c66ab.

💡 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
hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
2 participants