-
Bug
-
Resolution: Unresolved
-
Major
-
6.1.2.GA
-
None
https://bz.apache.org/bugzilla/show_bug.cgi?id=69866
When using a truststore with the openssl provider, https://github.com/apache/tomcat/blob/10.1.36/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java#L362 creates a CertificateVerifier (OpenSSLContext$1) and stores it as a global JNI reference. The created CertificateVerifier inner class keeps a strong reference back to the OpenSSLContext itself so this JNI global becomes a leaked reference chain that persists the OpenSSLContext and prevents it from becoming unreachable to prompt execution of its cleanable. That reference chain in a heap dump:
Class Name | Ref. Objects | Shallow Heap | Ref. Shallow Heap | Retained Heap ---------------------------------------------------------------------------------------------------------------------------------------------- org.apache.tomcat.util.net.openssl.OpenSSLContext$1 @ 0x42b04b308 JNI Global| 1 | 16 | 48 | 16 '- this$0 org.apache.tomcat.util.net.openssl.OpenSSLContext @ 0x42b056c50 | 1 | 48 | 48 | 1,200 ----------------------------------------------------------------------------------------------------------------------------------------------
- links to