RFR (XS) 8199012: JVM crash during LevelDB JNI access

Daniel D. Daugherty daniel.daugherty at oracle.com
Thu Mar 8 14:31:34 UTC 2018

On 3/6/18 6:31 PM, David Holmes wrote:
> webrev: http://cr.openjdk.java.net/~dholmes/8199012/webrev/

     No comments.

Thumbs up!

Since you're in that function would you mind fixing the indenting
on these two lines:

    Both need two more spaces... no webrev needed if you decide
    to fix this.


> bug: https://bugs.openjdk.java.net/browse/JDK-8199012
> JNI DetachCurrentThread is defined as a no-op if called by a thread 
> that is not attached. But the check for that was occurring after we 
> called VM_Exit::block_if_vm_exited(). If the thread was not in fact 
> attached then we have a NULL current thread and that can cause in 
> crash in VM_Exit::block_if_vm_exited() if we actually need to block - 
> which explains the scenario reported in the bug.
> Simple, obvious, fix is to do the "not attached" check first.
> Testing:
>   - Mach5 CI equivalent testing (tier1/2)
>   - internal JNI tests
> I marked this noreg-hard as a regression test is difficult to set up 
> due to the need to coordinate with a VM shutdown.
> Thanks,
> David

More information about the hotspot-runtime-dev mailing list