RFR: 8327647: Occasional SIGSEGV in markWord::displaced_mark_helper() for SPECjvm2008 sunflow [v4]

Dean Long dlong at openjdk.org
Tue Apr 23 02:57:27 UTC 2024


On Mon, 22 Apr 2024 17:37:48 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> There are two threads though:
> t1: 1. write resolved fields
> 2. release_store get_code/put_code
> 3. patch bytecode to fastpath (should this be a release_store?)

Yes, I think you need a release_store for 3, because 2 happened in the same thread.  If 2 and 3 happened in different threads, then maybe it could be avoid, but that seems risky.

> but t2: 1. reads patched_bytecode
> 2. goes fastpath
> 3. loads pointer to cpCache entry for Resolved fields assuming they've been written in order
> 4. gets a resolved field
> 
> So the patch puts the LoadLoad membar between 2 and 3 because t2 is the thread that's loading the information. Would a LoadLoad barrier executed by t1 help?

I don't see how t1 doing a LoadLoad helps.  The LoadLoad needs to go anywhere between 1 and 4.

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

PR Comment: https://git.openjdk.org/jdk/pull/18477#issuecomment-2071313420


More information about the hotspot-compiler-dev mailing list