K
K
kidar22017-11-27 12:08:13
css
kidar2, 2017-11-27 12:08:13

How to treat Deadlock Tomcat in the openJarFile method?

Sometimes tomcat (Tomcat 8.5.23 on Ununtu server, java8) is in deadlock and nothing can be done about it. We managed to get a thread dump, which shows the following
Stack trace of blocked threads:

org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntries(AbstractSingleArchiveResourceSet.java:63)
org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:256)
org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281)
org.apache.catalina.webresources.CachedResource.validateResource(CachedResource.java:95)
org.apache.catalina.webresources.Cache.getResource(Cache.java:69)
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216)
org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225)
org.apache.catalina.loader.WebappClassLoaderBase.getResourceAsStream(WebappClassLoaderBase.java:1067)
org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
org.apache.xerces.parsers.DOMParser.(Unknown Source)
org.apache.xerces.parsers.DOMParser.(Unknown Source)
org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)

Stack trace of the problematic thread that blocked others:
java.util.zip.ZipFile.open(Native Method)
java.util.zip.ZipFile.(ZipFile.java:219)
java.util.zip.ZipFile.(ZipFile.java:149)
java.util.jar.JarFile.(JarFile.java:166)
java.util.jar.JarFile.(JarFile.java:103)
org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:308)
org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:93)
org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:260)
org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281)
org.apache.catalina.webresources.CachedResource.validateResource(CachedResource.java:95)
org.apache.catalina.webresources.Cache.getResource(Cache.java:69)
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216)
org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225)
org.apache.catalina.loader.WebappClassLoaderBase.getResourceAsStream(WebappClassLoaderBase.java:1067)
org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
org.apache.xerces.parsers.DOMParser.(Unknown Source)
org.apache.xerces.parsers.DOMParser.(Unknown Source)
org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)

At the same time, the number of open files in the OS is far from the maximum.
Has anyone experienced something similar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Kulikov, 2019-09-10
@anatoly_kulikov

Take Owl Carousel and finish with styles, it can be done.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question