[jdk21u-dev] RFR: 8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync
Richard Reingruber
rrich at openjdk.org
Thu Jun 6 09:00:44 UTC 2024
On Thu, 6 Jun 2024 08:35:58 GMT, Andrew Haley <aph 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.
>
> 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`?
The comment is preexisting. Issuing notify doesn't need `WXWrite`. It needs a thread state transition `ThreadInVMfromNative` and that transition requires `WXWrite`.
-------------
PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/580#discussion_r1629072516
More information about the jdk-updates-dev
mailing list