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

Coleen Phillimore coleenp at openjdk.org
Wed Oct 2 13:35:38 UTC 2024


On Tue, 1 Oct 2024 18:38:33 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.

>From what I get from this discussion is that historically, handshakes are depending on a sort of double check locking algorithm to get sequential consistency when reading the handshakee state.  That seems subtle and easy to break in this code.  Maybe @robehn remembers where the assumed fence should be (in all Mutexes?) or is there another place this should have a fence.

Also maybe he remembers if there was any performance benefit to doing so and what benchmarks would show this benefit.

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

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


More information about the hotspot-runtime-dev mailing list