RFR: 8352066: JVM.commit() and JVM.flush() exhibit race conditions against JFR epochs
Markus Grönlund
mgronlun at openjdk.org
Fri Mar 14 17:56:02 UTC 2025
On Fri, 14 Mar 2025 14:55:40 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
> Greetings,
>
> This change set removes some race conditions involving JFR epochs. For details, please see the JIRA issue.
>
> Testing: jdk_jfr, TestChunkIntegrity testing
>
> Thanks
> Markus
> I noticed a boolean flag was added to the JfrCheckpointManager::on_rotation, but I couldn't see where it was used. Was this by design or a mistake?
Good, you noticed, and I forgot to describe this.
I am adding the notify_threads() call also for Safepoint::clear(), not only for Safepoint::write(), to ensure ongoing commits are also aborted when a new physical recording starts. Should a thread, for example, get severely unscheduled after, let's say, returning from, or get stuck in the VM for a more extended period during a commit.
It seems very unlikely to be necessary now that I am writing this, but it's another "clearing" activity when a physical recording begins.
I don't have tangible proof that is not necessary yet. If we find out it's not needed later, we can remove it.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24061#issuecomment-2725386494
More information about the hotspot-jfr-dev
mailing list