RFR: 8325937: runtime/handshake/HandshakeDirectTest.java causes "monitor end should be strictly below the frame pointer" assertion failure on AArch64 [v2]

Robbin Ehn rehn at openjdk.org
Thu Oct 3 17:36:38 UTC 2024


On Thu, 3 Oct 2024 11:54:53 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Add missing StoreLoad fences in handshaking code to match safepoint code.  Thanks to @pchilano for finding this bug.
>> 
>> Tested with tier1-4 and tier8 which has Kitchensink in it.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove comment about state.

The old implementation cleary had this as it specification (before we switched to pthread):

// See orderAccess.hpp.  We assume throughout the VM that mutex lock and
// try_lock do fence-lock-acquire, and that unlock does a release-unlock,
// *in that order*.  If their implementations change such that these
// assumptions are violated, a whole lot of code will break.

This code is written for that documented behavior.
Hence I instead suggest to create a stricter mutex which follows the old semantics.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21295#issuecomment-2391960282


More information about the hotspot-runtime-dev mailing list