[jdk21u-dev] RFR: 8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync
Andrew Haley
aph at openjdk.org
Thu Jun 6 08:39:49 UTC 2024
On Thu, 16 May 2024 11:54:19 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
> I would like to backport https://github.com/openjdk/jdk22u/commit/0c572566963be7f941228deda2691ce2fc456c15 to jdk 21 to get clean testing with -XX:+AssertWXAtThreadSync and avoid crashes because the VM is entered with the wrong WXState. The latter is very unlikely nevertheless aiming for clean tests with -XX:+AssertWXAtThreadSync will help to reduce the probability that users are affected by regressions in this area.
>
> Testing:
>
> I've verified every added WXState change if it is actually required.
>
> The fix passed our CI testing with AssertWXAtThreadSync enabled: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. JCK, SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests.
OK. I hate the way this code works, but we need it now.
src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp line 293:
> 291: JavaThread* jt = JavaThread::cast(thread);
> 292: if (jt->thread_state() == _thread_in_native) {
> 293: // Transition java thread to vm so it can issue a notify.
I don't understand this comment. Why does issuing a notify need `WXWrite`?
-------------
Marked as reviewed by aph (Reviewer).
PR Review: https://git.openjdk.org/jdk21u-dev/pull/580#pullrequestreview-2101245796
PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/580#discussion_r1629025999
More information about the jdk-updates-dev
mailing list