1 Reply Latest reply on Nov 4, 2010 5:06 PM by Francis Drake

    Thread blocking others and freezing server finally

    Francis Drake Newbie

      hi,


      from few days I am facing problem of on thread blocking others, thread pool is growing and then server becames inaccessible. I have checked the logs, not much logged, like Concurrent call to conversation and I made a thread dump every minute to see how it grows. Here's stack of thread that is blocking others:


      Thread: ajp-0.0.0.0-8009-431 : priority:5, demon:true, threadId:15913, threadState:RUNNABLE

          org.jboss.seam.Component.getInstanceFromFactory(Component.java:2056)
          - locked <0x12fcb505> (a java.lang.Class)
          org.jboss.seam.Component.getInstance(Component.java:2011)
          org.jboss.seam.Component.getInstance(Component.java:2000)
          org.jboss.seam.Component.getInstance(Component.java:1994)
          org.jboss.seam.Component.getInstance(Component.java:1967)
          org.jboss.seam.Component.getInstance(Component.java:1962)
          org.jboss.seam.core.Events.instance(Events.java:157)
          org.jboss.seam.core.Events.exists(Events.java:152)
          org.jboss.seam.contexts.BasicContext.set(BasicContext.java:80)
          org.jboss.seam.Component.newInstance(Component.java:2138)
          org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
          org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
          org.jboss.seam.contexts.Lifecycle.beginSession(Lifecycle.java:233)
          org.jboss.seam.contexts.ServletLifecycle.beginSession(ServletLifecycle.java:182)
          org.jboss.seam.servlet.SeamListener.sessionCreated(SeamListener.java:46)
          org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:397)
          org.apache.catalina.session.StandardSession.setId(StandardSession.java:369)
          org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:829)
          org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291)
          org.apache.catalina.connector.Request.doGetSession(Request.java:2367)
          org.apache.catalina.connector.Request.getSession(Request.java:2094)
          org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
          org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
          org.jboss.seam.web.IdentityRequestWrapper.(IdentityRequestWrapper.java:23)
          org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
          org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:436)
          org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384)
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          java.lang.Thread.run(Thread.java:619)



      And one of dozens other threads waiting on resource released by above:


      Thread: ajp-0.0.0.0-8009-432 : priority:5, demon:true, threadId:15914, threadState:BLOCKED

          - waiting on <0x12fcb505> (a java.lang.Class)
          org.jboss.seam.Component.getInstanceFromFactory(Component.java:2056)
          org.jboss.seam.Component.getInstance(Component.java:2011)
          org.jboss.seam.Component.getInstance(Component.java:2000)
          org.jboss.seam.Component.getInstance(Component.java:1994)
          org.jboss.seam.Component.getInstance(Component.java:1967)
          org.jboss.seam.Component.getInstance(Component.java:1962)
          org.jboss.seam.core.Events.instance(Events.java:157)
          org.jboss.seam.core.Events.exists(Events.java:152)
          org.jboss.seam.contexts.BasicContext.set(BasicContext.java:80)
          org.jboss.seam.Component.newInstance(Component.java:2138)
          org.jboss.seam.Component.getInstance(Component.java:2021)
          org.jboss.seam.Component.getInstance(Component.java:2000)
          org.jboss.seam.Component.getInstance(Component.java:1994)
          org.jboss.seam.Component.getInstance(Component.java:1967)
          org.jboss.seam.Component.getInstance(Component.java:1962)
          org.jboss.seam.web.ServletContexts.instance(ServletContexts.java:42)
          org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:39)
          com.scandicbookmakers.betting.servlets.LiveBettingServlet.processRequest(LiveBettingServlet.java:291)
          com.scandicbookmakers.betting.servlets.LiveBettingServlet.doGet(LiveBettingServlet.java:454)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
          org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:436)
          org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384)
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          java.lang.Thread.run(Thread.java:619)


      Can anyone give a clue what it could be? I am running Seam 2.2.0 on JBoss 5.1