Bonjour à tous,
Je viens chercher de l'aide sur ce forum afin d'analyser un thread dump Java.
Concrètement, mon application sature son pool de 100 connexions assez régulièrement et à chaque fois que cela se produit je trouve dans le thread dump une quarantaine de thread dans le statut 'Waiting on monitor' généralement bloqué par le même thread.
Voici la stack trace obtenu lors du crash d'hier:
Runnable 59 39 (%)
Waiting on condition 45 30 (%)
Waiting on monitor 48 32 (%) - en temps normal ce nombre est a zéro
State Waiting on monitor
Monitor Waiting for Monitor Lock on com.ibm.ws.classloader.CompoundClassLoader@34945718/34945720
Java Stack
at fr.capeb.gestionfiches.hibernate.helper.SynComplGeoHelper.findMillesimeByCompteurSyndLight(Unknown Source) at fr.capeb.gestionfiches.hibernate.helper.ArtArtisanGeoHelper.findArtArtisanSigneLightByCode(Unknown Source) at fr.capeb.gestionfiches.service.ArtisanService.ArtArtisanGeoLightRemplirFicheIDArtisan(Unknown Source) at fr.capeb.gestionfiches.action.RechercheArtisanAction.execute(Unknown Source)(Compiled Code) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java(Inlined Compiled Code)) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code)) at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Inlined Compiled Code)) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code)) at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code)) at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code)) at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code)) at fr.capeb.utils.ConnectionManagerFilter.doFilter(Unknown Source)(Compiled Code) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code)) at fr.capeb.utils.SessionFilter.doFilter(Unknown Source)(Compiled Code) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code)) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code)) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code)) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code)) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code)) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code)) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Ceci pour le thread bloqué (au statut waiting on Monitor)
Et voici pour le thread bloquant:
State
Runnable
Monitor
Owns Monitor Lock on com.ibm.ws.classloader.CompoundClassLoader@34945718/34945720
Java Stack
at java.io.WinNTFileSystem.getBooleanAttributes(Native Method) at java.io.File.exists(File.java(Compiled Code)) at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java(Compiled Code)) at sun.misc.URLClassPath.getResource(URLClassPath.java(Compiled Code)) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled Code)) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at java.lang.Class.forName0(Native Method) at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java(Inlined Compiled Code)) at net.sf.hibernate.hql.QueryTranslator.getImportedClass(QueryTranslator.java(Inlined Compiled Code)) at net.sf.hibernate.hql.QueryTranslator.concreteQueries(QueryTranslator.java(Compiled Code)) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java(Inlined Compiled Code)) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java(Inlined Compiled Code)) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java(Compiled Code)) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java(Compiled Code)) at fr.capeb.gestionfiches.hibernate.helper.RechercheArtisanHelper.executeResearchArtisanQuery(Unknown Source)(Compiled Code) at fr.capeb.gestionfiches.action.RechercheArtisanAction.execute(Unknown Source)(Compiled Code) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java(Inlined Compiled Code)) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code)) at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Inlined Compiled Code)) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java(Inlined Compiled Code)) at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java(Compiled Code)) at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java(Compiled Code)) at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code)) at fr.capeb.utils.ConnectionManagerFilter.doFilter(Unknown Source)(Compiled Code) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code)) at fr.capeb.utils.SessionFilter.doFilter(Unknown Source)(Compiled Code) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code)) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code)) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code)) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code)) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code)) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code)) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
De ce que je comprends le thread est en attente d'une info sur un fichier du file system, mais est-ce vraiment ça ? et surtout comment résoudre ce problème ?
Merci d'avance a toute bonne volonté qui répondra.
Sébastien
Partager