Jetty
  1. Jetty
  2. JETTY-524

A dead lock between threads was found when visit http

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.8
    • Fix Version/s: 7.0.0pre0
    • Component/s: HTTP
    • Labels:
      None
    • Environment:
      Windows XP, Jetty 6.1.8
    • Number of attachments :
      0

      Description

      Found one Java-level deadlock:
      =============================
      "btpool0-1":
      waiting to lock monitor 0x00bb6458 (object 0xbaeb9850, a org.jboss.seam.interceptors.SynchronizationInterceptor),
      which is held by "btpool0-2"
      "btpool0-2":
      waiting to lock monitor 0x00bb64a0 (object 0xba6c2998, a com.sybase.djc.web.util.SessionManager$Session),
      which is held by "btpool0-1"

      Java stack information for the threads listed above:
      ===================================================
      "btpool0-1":
      at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:27)

      • waiting to lock <0xbaeb9850> (a org.jboss.seam.interceptors.SynchronizationInterceptor)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
        at com.sybase.it.class2.jsf.beans.CaseBean_$$javassist_1.equals(CaseBean$$_javassist_1.java)
        at org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:1048)
      • locked <0xba6c2998> (a com.sybase.djc.web.util.SessionManager$Session)
        at org.jboss.seam.servlet.ServletSessionImpl.setAttribute(ServletSessionImpl.java:50)
        at org.jboss.seam.contexts.WebSessionContext.flush(WebSessionContext.java:101)
        at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:430)
        at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:315)
        at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:256)
        at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:115)
        at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:92)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:134)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
        at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:77)
        at web.components.s2t2.MyFacesServlet.service(MyFacesServlet.java:28)
        at web.components.s2t2.MyFacesServlet_DJC.access$201(MyFacesServlet_DJC.java:4)
        at web.components.s2t2.MyFacesServlet_DJC$3.invoke(MyFacesServlet_DJC.java:310)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.MyFacesServlet_DJC.service(MyFacesServlet_DJC.java:339)
        at web.components.s2t2.MyFacesServlet$WC.service(MyFacesServlet$WC.java:24)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:190)
        at web.components.s2t2.MyFacesExtensionsFilter.doFilter(MyFacesExtensionsFilter.java:28)
        at web.components.s2t2.MyFacesExtensionsFilter_DJC.access$101(MyFacesExtensionsFilter_DJC.java:4)
        at web.components.s2t2.MyFacesExtensionsFilter_DJC$2.invoke(MyFacesExtensionsFilter_DJC.java:180)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.MyFacesExtensionsFilter_DJC.doFilter(MyFacesExtensionsFilter_DJC.java:209)
        at web.components.s2t2.MyFacesExtensionsFilter$WC.doFilter(MyFacesExtensionsFilter$WC.java:24)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
        at web.components.s2t2.ajax4jsf.doFilter(ajax4jsf.java:28)
        at web.components.s2t2.ajax4jsf_DJC.access$101(ajax4jsf_DJC.java:4)
        at web.components.s2t2.ajax4jsf_DJC$2.invoke(ajax4jsf_DJC.java:180)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.ajax4jsf_DJC.doFilter(ajax4jsf_DJC.java:209)
        at web.components.s2t2.ajax4jsf$WC.doFilter(ajax4jsf$WC.java:24)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
        at web.components.s2t2.Seam_0020Redirect_0020Filter.doFilter(Seam_0020Redirect_0020Filter.java:28)
        at web.components.s2t2.Seam_0020Redirect_0020Filter_DJC.access$101(Seam_0020Redirect_0020Filter_DJC.java:4)
        at web.components.s2t2.Seam_0020Redirect_0020Filter_DJC$2.invoke(Seam_0020Redirect_0020Filter_DJC.java:180)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.Seam_0020Redirect_0020Filter_DJC.doFilter(Seam_0020Redirect_0020Filter_DJC.java:209)
        at web.components.s2t2.Seam_0020Redirect_0020Filter$WC.doFilter(Seam_0020Redirect_0020Filter$WC.java:24)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at com.sybase.djc.server.jetty.SybSessionHandler.handle(SybSessionHandler.java:147)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at com.sybase.djc.server.jetty.SybWebAppContext.handle(SybWebAppContext.java:157)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:223)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at com.sybase.djc.server.jetty.JettyServer.handle(JettyServer.java:168)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at org.mortbay.jetty.nio.BlockingChannelConnector$Connection.run(BlockingChannelConnector.java:164)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
        "btpool0-2":
        at org.mortbay.jetty.servlet.AbstractSessionManager$Session.getAttribute(AbstractSessionManager.java:779)
      • waiting to lock <0xba6c2998> (a com.sybase.djc.web.util.SessionManager$Session)
        at org.jboss.seam.servlet.ServletSessionImpl.getAttribute(ServletSessionImpl.java:32)
        at org.jboss.seam.contexts.ServerConversationContext.get(ServerConversationContext.java:110)
        at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:171)
        at org.jboss.seam.Component.getInstance(Component.java:1609)
        at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
        at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:108)
        at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:570)
        at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
        at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:386)
        at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:69)
        at org.jboss.seam.Component.getValueToInject(Component.java:1877)
        at org.jboss.seam.Component.injectAttributes(Component.java:1368)
        at org.jboss.seam.Component.inject(Component.java:1195)
        at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
        at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
        at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
      • locked <0xbaeb9850> (a org.jboss.seam.interceptors.SynchronizationInterceptor)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
        at com.sybase.it.class2.jsf.beans.CaseBean_$$javassist_1.getSelectPanelBarItem(CaseBean$$_javassist_1.java)
        at sun.reflect.GeneratedMethodAccessor223.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:457)
        at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:85)
        at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
        at com.sun.el.parser.AstEqual.getValue(AstEqual.java:20)
        at com.sun.el.parser.AstAnd.getValue(AstAnd.java:20)
        at com.sun.el.parser.AstChoice.getValue(AstChoice.java:26)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
        at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
        at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
        at javax.faces.component.html._ComponentUtils.getStringValue(_ComponentUtils.java:36)
        at javax.faces.component.html.HtmlPanelGrid.getStyleClass(HtmlPanelGrid.java:376)
        at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at javax.faces.component._ComponentAttributesMap.getComponentProperty(_ComponentAttributesMap.java:387)
        at javax.faces.component._ComponentAttributesMap.get(_ComponentAttributesMap.java:235)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderHTMLAttribute(HtmlRendererUtils.java:535)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderHTMLAttributes(HtmlRendererUtils.java:549)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:93)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
        at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
        at org.ajax4jsf.renderkit.html.RepeatRenderer$1.process(RepeatRenderer.java:53)
        at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:101)
        at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:994)
        at org.ajax4jsf.renderkit.html.RepeatRenderer.encodeChildren(RepeatRenderer.java:59)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
        at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
        at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
        at org.richfaces.renderkit.html.PanelBarItemRenderer.doEncodeChildren(PanelBarItemRenderer.java:165)
        at org.richfaces.renderkit.html.PanelBarItemRenderer.doEncodeChildren(PanelBarItemRenderer.java:160)
        at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
        at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
        at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
        at org.richfaces.renderkit.html.PanelBarRenderer.doEncodeChildren(PanelBarRenderer.java:148)
        at org.richfaces.renderkit.html.PanelBarRenderer.doEncodeChildren(PanelBarRenderer.java:143)
        at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
        at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
        at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
        at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
        at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
        at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:414)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:78)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:78)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:78)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
        at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
        at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
        at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
        at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
        at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
        at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
        at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:77)
        at web.components.s2t2.MyFacesServlet.service(MyFacesServlet.java:28)
        at web.components.s2t2.MyFacesServlet_DJC.access$201(MyFacesServlet_DJC.java:4)
        at web.components.s2t2.MyFacesServlet_DJC$3.invoke(MyFacesServlet_DJC.java:310)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.MyFacesServlet_DJC.service(MyFacesServlet_DJC.java:339)
        at web.components.s2t2.MyFacesServlet$WC.service(MyFacesServlet$WC.java:24)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:190)
        at web.components.s2t2.MyFacesExtensionsFilter.doFilter(MyFacesExtensionsFilter.java:28)
        at web.components.s2t2.MyFacesExtensionsFilter_DJC.access$101(MyFacesExtensionsFilter_DJC.java:4)
        at web.components.s2t2.MyFacesExtensionsFilter_DJC$2.invoke(MyFacesExtensionsFilter_DJC.java:180)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.MyFacesExtensionsFilter_DJC.doFilter(MyFacesExtensionsFilter_DJC.java:209)
        at web.components.s2t2.MyFacesExtensionsFilter$WC.doFilter(MyFacesExtensionsFilter$WC.java:24)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
        at web.components.s2t2.ajax4jsf.doFilter(ajax4jsf.java:28)
        at web.components.s2t2.ajax4jsf_DJC.access$101(ajax4jsf_DJC.java:4)
        at web.components.s2t2.ajax4jsf_DJC$2.invoke(ajax4jsf_DJC.java:180)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.ajax4jsf_DJC.doFilter(ajax4jsf_DJC.java:209)
        at web.components.s2t2.ajax4jsf$WC.doFilter(ajax4jsf$WC.java:24)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
        at web.components.s2t2.Seam_0020Redirect_0020Filter.doFilter(Seam_0020Redirect_0020Filter.java:28)
        at web.components.s2t2.Seam_0020Redirect_0020Filter_DJC.access$101(Seam_0020Redirect_0020Filter_DJC.java:4)
        at web.components.s2t2.Seam_0020Redirect_0020Filter_DJC$2.invoke(Seam_0020Redirect_0020Filter_DJC.java:180)
        at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:675)
        at com.sybase.djc.transaction.TransactionManager.invokeBeanManaged(TransactionManager.java:610)
        at web.components.s2t2.Seam_0020Redirect_0020Filter_DJC.doFilter(Seam_0020Redirect_0020Filter_DJC.java:209)
        at web.components.s2t2.Seam_0020Redirect_0020Filter$WC.doFilter(Seam_0020Redirect_0020Filter$WC.java:24)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at com.sybase.djc.server.jetty.SybSessionHandler.handle(SybSessionHandler.java:147)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at com.sybase.djc.server.jetty.SybWebAppContext.handle(SybWebAppContext.java:157)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:223)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at com.sybase.djc.server.jetty.JettyServer.handle(JettyServer.java:168)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at org.mortbay.jetty.nio.BlockingChannelConnector$Connection.run(BlockingChannelConnector.java:164)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

      Found 1 deadlock.

      I think that in org.mortbay.jetty.servlet.AbstractSessionManager.java ,the funciton getAttribute(String name) should not be synchronized. After I removed the key word "synchronized", the issue didn't exist.

        Activity

        Hide
        Jan Bartel added a comment -

        Hi Fang,

        The servlet spec actually says that access to the Session object should be synchronized:

        SRV 7.7.1:
        "Multiple servlets executing request threads may have active access to a single
        session object at the same time. Access to the session object should be
        synchronized, however, the Developer has the responsibility for synchronizing
        access to session resources as appropriate."

        regards
        Jan

        Show
        Jan Bartel added a comment - Hi Fang, The servlet spec actually says that access to the Session object should be synchronized: SRV 7.7.1: "Multiple servlets executing request threads may have active access to a single session object at the same time. Access to the session object should be synchronized, however, the Developer has the responsibility for synchronizing access to session resources as appropriate." regards Jan
        Hide
        Fang Bing added a comment -

        Hi Jan,

        But I think the getAttribute function should not be synchronized. My web application can work well in Tomcat, but dead lock in Jetty. I download the Tomcat's source code and find that it didn't synchronized this function.

        Thanks.

        regards
        Bing Fang

        Show
        Fang Bing added a comment - Hi Jan, But I think the getAttribute function should not be synchronized. My web application can work well in Tomcat, but dead lock in Jetty. I download the Tomcat's source code and find that it didn't synchronized this function. Thanks. regards Bing Fang
        Hide
        Jan Bartel added a comment -

        Fang,

        Which version of tomcat did you test with? Note that a bug with session synchronisation was only fix in tomcat 5.0.25. Here's the link to it:
        https://issues.apache.org/bugzilla/show_bug.cgi?id=36541

        regards
        Jan

        Show
        Jan Bartel added a comment - Fang, Which version of tomcat did you test with? Note that a bug with session synchronisation was only fix in tomcat 5.0.25. Here's the link to it: https://issues.apache.org/bugzilla/show_bug.cgi?id=36541 regards Jan
        Hide
        Fang Bing added a comment -

        Hi Jan,

        I tested it on tomcat5.5.26 and tomcat6.0.16.

        Show
        Fang Bing added a comment - Hi Jan, I tested it on tomcat5.5.26 and tomcat6.0.16.
        Hide
        Greg Wilkins added a comment -

        Fang,

        I have just committed some changes to jetty trunk that reduce the time we hold the synchronization to just the map manipulations.
        I think it may assist you avoiding your deadlock. We cannot reduce the synchronization anymore, as our terracotta clustering
        requires that synchronization - and it is good java practise not to make dirty reads.

        If you can checkout and build jetty trunk and verify the solution works, then we will consider including this in the next
        jetty release.

        Show
        Greg Wilkins added a comment - Fang, I have just committed some changes to jetty trunk that reduce the time we hold the synchronization to just the map manipulations. I think it may assist you avoiding your deadlock. We cannot reduce the synchronization anymore, as our terracotta clustering requires that synchronization - and it is good java practise not to make dirty reads. If you can checkout and build jetty trunk and verify the solution works, then we will consider including this in the next jetty release.
        Hide
        Greg Wilkins added a comment -

        Note that this is neither a bug nor a blocker.
        Changed to a normal priority improvement request

        Show
        Greg Wilkins added a comment - Note that this is neither a bug nor a blocker. Changed to a normal priority improvement request
        Hide
        Jan Bartel added a comment -

        The changes work with Terracotta.

        Jan

        Show
        Jan Bartel added a comment - The changes work with Terracotta. Jan
        Hide
        Fang Bing added a comment -

        Jan,

        I will test it and tell you the result later. Thanks.

        Show
        Fang Bing added a comment - Jan, I will test it and tell you the result later. Thanks.
        Hide
        Fang Bing added a comment -

        Jan,

        I tested it and my application also worked! thanks.

        Show
        Fang Bing added a comment - Jan, I tested it and my application also worked! thanks.

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Fang Bing
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: