This bug is related to JDK-8001743. When 3rd party thread attaches JVM, but does not deattach JVM before it exits, that causes JVM to leak JavaThread object. NMT has the capability to capture the scenarios, it should report the problem when -Xcheck:jni is enabled.