Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1312

HTTP/2 Deadlock in AbstractFramedChannel

XMLWordPrintable

    • Hide

      I've only seen this occur once.

      Show
      I've only seen this occur once.

      Found one Java-level deadlock:
      =============================
      "undertow-worker task-129":
        waiting to lock monitor 0x00007f1e64096aa8 (object 0x00000006d7b200e8, a io.undertow.protocols.http2.Http2Channel),
        which is held by "undertow-worker I/O-7"
      "undertow-worker I/O-7":
        waiting to lock monitor 0x00007f1e20039e38 (object 0x00000006d7b21670, a java.lang.Object),
        which is held by "undertow-worker task-129"
      
      Java stack information for the threads listed above:
      ===================================================
      "undertow-worker task-129":
              at io.undertow.server.protocol.framed.AbstractFramedChannel$1.freed(AbstractFramedChannel.java:146)
              - waiting to lock <0x00000006d7b200e8> (a io.undertow.protocols.http2.Http2Channel)
              at io.undertow.util.ReferenceCountedPooled.freeInternal(ReferenceCountedPooled.java:96)
              at io.undertow.util.ReferenceCountedPooled.access$000(ReferenceCountedPooled.java:37)
              at io.undertow.util.ReferenceCountedPooled$1.close(ReferenceCountedPooled.java:123)
              at io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel.beforeRead(AbstractFramedStreamSourceChannel.java:548)
              - locked <0x00000006d7b21670> (a java.lang.Object)
              at io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel.read(AbstractFramedStreamSourceChannel.java:502)
              at io.undertow.protocols.http2.Http2StreamSourceChannel.read(Http2StreamSourceChannel.java:147)
              at org.xnio.conduits.StreamSourceChannelWrappingConduit.read(StreamSourceChannelWrappingConduit.java:43)
              at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
              at io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:209)
              at io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2337)
              at org.xnio.channels.Channels.readBlocking(Channels.java:294)
              at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:192)
              at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:168)
              at java.io.FilterInputStream.read(FilterInputStream.java:133)
              at java.io.PushbackInputStream.read(PushbackInputStream.java:186)
              at java.io.DataInputStream.read(DataInputStream.java:149)
              at com.google.common.io.ByteStreams$LimitedInputStream.read(ByteStreams.java:677)
              at com.google.protobuf.CodedInputStream$StreamDecoder.tryRefillBuffer(CodedInputStream.java:2814)
              at com.google.protobuf.CodedInputStream$StreamDecoder.isAtEnd(CodedInputStream.java:2737)
              at com.google.protobuf.CodedInputStream$StreamDecoder.readTag(CodedInputStream.java:2088)
      
      ...etc...
      
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:881)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:706)
              at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
              at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
              at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
              at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:67)
              at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
              at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
              at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
              at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
              at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
              at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
              at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
              at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
              at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72)
              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
              at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
              at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
              at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
              at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
              at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
              at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
              at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
              at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
              at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      "undertow-worker I/O-7":
              at io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel.dataReady(AbstractFramedStreamSourceChannel.java:379)
              - waiting to lock <0x00000006d7b21670> (a java.lang.Object)
              at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:393)
              - locked <0x00000006d7b200e8> (a io.undertow.protocols.http2.Http2Channel)
              at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:111)
              at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:60)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:942)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:923)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
              at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1161)
              at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
              at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
      
      Found 1 deadlock.
      

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              carterkozak Carter Kozak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: