Skip to content

8374490: Test jdk/jfr/event/runtime/TestSafepointEvents.java failed: Expected event 'jdk.SafepointStateSynchronization' to be present#30092

Open
mgronlun wants to merge 1 commit intoopenjdk:masterfrom
mgronlun:8374490
Open

Conversation

@mgronlun
Copy link

@mgronlun mgronlun commented Mar 5, 2026

Greetings,

fixing this test as it is racy in two sections:

  1. Initialization: Event enabling happens sequentially: 1. SafepointBegin, 2. SafepointStateSynchronization, 3. SafepointEnd.
  2. Teardown: The recording is stopped during a safepoint: This will only include 1 and 2 (but not 3).

The test tries to handle 2, but it fails to account for event enabling during initialization. Therefore, the test can end up with three (or more) sets, where only some set "in the middle" is complete. The test fails because it removes the last set, which is correct as it is incomplete, but then expects the first set to be complete, which it might not be because events are enabled serially.

Testing: jdk_jfr

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-8374490: Test jdk/jfr/event/runtime/TestSafepointEvents.java failed: Expected event 'jdk.SafepointStateSynchronization' to be present (Bug - P4)

Reviewers without OpenJDK IDs

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30092

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 5, 2026

👋 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 Mar 5, 2026

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

@openjdk openjdk bot added the hotspot-jfr hotspot-jfr-dev@openjdk.org label Mar 5, 2026
@openjdk
Copy link

openjdk bot commented Mar 5, 2026

@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 rfr Pull request is ready for review label Mar 5, 2026
@mlbridge
Copy link

mlbridge bot commented Mar 5, 2026

Webrevs

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 rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants