Skip to content

Conversation

lmesnik
Copy link
Member

@lmesnik lmesnik commented Sep 30, 2025

The problem happens when jni access fields while the last java frame is still compiled. The field access/modification events require interp only mode and compiled frame is not expected. However, It might happens if thread switched to interponly mode while it is in JNI code. The deoptimization is triggered but each frame is really changed only execution returns to it. So last java frame was not executed and thus is still compiled.

The original example doesn't reproduce issue because of JDK changes but the problem exists in JVMTI. So I implemented reliable regression test.

The location should be zero for JNI access.


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-8224852: JVM crash on watched field access from native code (Bug - P3)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27584

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 30, 2025

👋 Welcome back lmesnik! 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 Sep 30, 2025

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

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Sep 30, 2025
@openjdk
Copy link

openjdk bot commented Sep 30, 2025

@lmesnik The following labels will be automatically applied to this pull request:

  • hotspot
  • serviceability

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

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

Successfully merging this pull request may close these issues.

1 participant