[foreign] RFR 8209151: StdLibTest fails intermittently

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Aug 8 18:07:58 UTC 2018


The logic for retrieving and clearing native code blobs is race-y - it 
is sometimes possible for the binder code to retrieve a stale code blob 
that has just been deleted by the cleaner thread. This causes Hotspot 
crashes (around NativeInvoker::free_upcall_stub) and, sometimes, Java 
NPEs too in that area.

The fix is to guard the code that accesses the CodeCache under the 
corresponding lock (this idiom is present elsewhere in the hotspot code, 
but I missed it the first time around).

With the locking logic in place, I've been able to run the test 60 
consecutive times w/o failures (w/o the patch I'd get a failure within 
10 attempts).

Webrev:

http://cr.openjdk.java.net/~mcimadamore/panama/codecache-lock/

Maurizio



More information about the panama-dev mailing list