SEGV occurs when ClassLoader and Metaspace is released in JDK 8

Osamu Sakamoto sakamoto.osamu at nttcom.co.jp
Tue Nov 5 09:50:42 UTC 2019


Hi all,

I have investigated the cause of SEGV occurring in CMS GC of OpenJDK 8, 
and I've not been able to clarify the cause.
Could you help me to solve the problem?

Our system uses OpenJDK 1.8.0.171 and crashed by SEGV when purging a 
ClassLoader at safepoint.
I found 2 strange points,

1. SEGV occrred when the metaspace destructor maneged by that 
Classloader is executed,
    because the metaspace has illegal chunk address(0x10).

2. That ClassLoader's oop address indicates a character array, not a 
ClassLoader.

I think memory corruption was occurred, but I've not understood the 
reason yet.

I also asked this problem to hotspot-gc-dev mailing list, and I received 
a comment that it might be a JDK bug.
Detailed Information is summarized in the following hotspot-gc-dev ML 
thread.
<https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2019-October/027583.html>

Does anyone know this problem?

Thanks,

Osamu






More information about the jdk8u-dev mailing list