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

HTTP2 - java.lang.IllegalStateException: UT000091: Buffer has already been freed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 2.4.0.Final
    • 2.0.8.Final
    • Core
    • None
    • Hide
      1. clone and build wildfly
      2. start wildfly ./dist/target/wildfly-<version>/bin/standalone.sh
      3. configure wildfly-openssl via WF CLI: this step seems to be unnecessary
        /core-service=management/security-realm=ApplicationRealm/server-identity=ssl:write-attribute(name=protocol,value=openssl.TLS)
        
      4. grab h2spec tool (uses GO lang) and execute:
        while true; do ./h2spec -t -k -p 8443 -h 127.0.0.1; done
        

        NOTE: maybe you need to execute this command in more terminals in parallel to hit the issue

      5. wait for a while and see the errors occuring in the server log
      Show
      clone and build wildfly start wildfly ./dist/target/wildfly-<version>/bin/standalone.sh configure wildfly-openssl via WF CLI: this step seems to be unnecessary /core-service=management/security-realm=ApplicationRealm/server-identity=ssl:write-attribute(name=protocol,value=openssl.TLS) grab h2spec tool (uses GO lang) and execute: while true ; do ./h2spec -t -k -p 8443 -h 127.0.0.1; done NOTE: maybe you need to execute this command in more terminals in parallel to hit the issue wait for a while and see the errors occuring in the server log

    Description

      I can see following errors in server log during the HTTP2 in use when server is in stress when running HTTP2 testsuite - note that some tests have inappropriate behaviour but I think we should still be able to avoid such situations:

      15:14:15,732 ERROR [io.undertow.request.io] (default task-3) UT005090: Unexpected failure: java.lang.IllegalStateException: UT000091: Buffer has already been freed
              at io.undertow.core@2.0.8.Final//io.undertow.util.ReferenceCountedPooled$1.getBuffer(ReferenceCountedPooled.java:135)
              at io.undertow.core@2.0.8.Final//io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel.transferTo(AbstractFramedStreamSourceChannel.java:129)
              at io.undertow.core@2.0.8.Final//io.undertow.protocols.http2.Http2StreamSourceChannel.transferTo(Http2StreamSourceChannel.java:175)
              at org.jboss.xnio@3.6.3.Final//org.xnio.conduits.StreamSourceChannelWrappingConduit.transferTo(StreamSourceChannelWrappingConduit.java:35)
              at org.jboss.xnio@3.6.3.Final//org.xnio.conduits.ConduitStreamSourceChannel.transferTo(ConduitStreamSourceChannel.java:83)
              at io.undertow.core@2.0.8.Final//io.undertow.channels.DetachableStreamSourceChannel.transferTo(DetachableStreamSourceChannel.java:70)
              at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange$ReadDispatchChannel.transferTo(HttpServerExchange.java:2185)
              at org.jboss.xnio@3.6.3.Final//org.xnio.channels.Channels.drain(Channels.java:808)
              at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1646)
              at io.undertow.core@2.0.8.Final//io.undertow.io.DefaultIoCallback.onException(DefaultIoCallback.java:61)
              at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.invokeOnException(AsyncSenderImpl.java:464)
              at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:302)
              at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:295)
              at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:333)
              at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.error.SimpleErrorPageHandler$1.handleDefaultResponse(SimpleErrorPageHandler.java:68)
              at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1606)
              at io.undertow.core@2.0.8.Final//io.undertow.io.DefaultIoCallback.onException(DefaultIoCallback.java:61)
              at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource$1ServerTask.onException(PathResource.java:212)
              at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.invokeOnException(AsyncSenderImpl.java:464)
              at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:123)
              at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource$1ServerTask.run(PathResource.java:184)
              at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource.serveImpl(PathResource.java:253)
              at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource.serve(PathResource.java:111)
              at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:337)
              at io.undertow.core@2.0.8.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
              at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
              at org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
              at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
              at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
              at java.base/java.lang.Thread.run(Thread.java:844)
      
      15:36:57,349 ERROR [io.undertow.request.io] (default task-4) UT005090: Unexpected failure: java.lang.IllegalStateException: UT000091: Buffer has already been freed
      	at io.undertow.core@2.0.8.Final//io.undertow.util.ReferenceCountedPooled$1.getBuffer(ReferenceCountedPooled.java:135)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel.exitRead(AbstractFramedStreamSourceChannel.java:572)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel.transferTo(AbstractFramedStreamSourceChannel.java:142)
      	at io.undertow.core@2.0.8.Final//io.undertow.protocols.http2.Http2StreamSourceChannel.transferTo(Http2StreamSourceChannel.java:175)
      	at org.jboss.xnio@3.6.3.Final//org.xnio.conduits.StreamSourceChannelWrappingConduit.transferTo(StreamSourceChannelWrappingConduit.java:35)
      	at org.jboss.xnio@3.6.3.Final//org.xnio.conduits.ConduitStreamSourceChannel.transferTo(ConduitStreamSourceChannel.java:83)
      	at io.undertow.core@2.0.8.Final//io.undertow.channels.DetachableStreamSourceChannel.transferTo(DetachableStreamSourceChannel.java:70)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange$ReadDispatchChannel.transferTo(HttpServerExchange.java:2185)
      	at org.jboss.xnio@3.6.3.Final//org.xnio.channels.Channels.drain(Channels.java:808)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1646)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.DefaultIoCallback.onException(DefaultIoCallback.java:61)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.invokeOnException(AsyncSenderImpl.java:464)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:302)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:295)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:333)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.error.SimpleErrorPageHandler$1.handleDefaultResponse(SimpleErrorPageHandler.java:68)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1606)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.DefaultIoCallback.onException(DefaultIoCallback.java:61)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource$1ServerTask.onException(PathResource.java:212)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.invokeOnException(AsyncSenderImpl.java:464)
      	at io.undertow.core@2.0.8.Final//io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:123)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource$1ServerTask.run(PathResource.java:184)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource.serveImpl(PathResource.java:253)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.PathResource.serve(PathResource.java:111)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:337)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
      	at io.undertow.core@2.0.8.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
      	at org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      	at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      	at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
      	at java.base/java.lang.Thread.run(Thread.java:841)
      
      15:52:48,550 ERROR [io.undertow.request.io] (default task-4) UT005090: Unexpected failure: java.lang.IllegalStateException: UT000091: Buffer has already been freed
      	at io.undertow.util.ReferenceCountedPooled$1.getBuffer(ReferenceCountedPooled.java:135)
      	at io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel.transferTo(AbstractFramedStreamSourceChannel.java:136)
      	at io.undertow.protocols.http2.Http2StreamSourceChannel.transferTo(Http2StreamSourceChannel.java:175)
      	at org.xnio.conduits.StreamSourceChannelWrappingConduit.transferTo(StreamSourceChannelWrappingConduit.java:35)
      	at org.xnio.conduits.ConduitStreamSourceChannel.transferTo(ConduitStreamSourceChannel.java:83)
      	at io.undertow.channels.DetachableStreamSourceChannel.transferTo(DetachableStreamSourceChannel.java:70)
      	at io.undertow.server.HttpServerExchange$ReadDispatchChannel.transferTo(HttpServerExchange.java:2185)
      	at org.xnio.channels.Channels.drain(Channels.java:808)
      	at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1646)
      	at io.undertow.io.DefaultIoCallback.onException(DefaultIoCallback.java:61)
      	at io.undertow.io.AsyncSenderImpl.invokeOnException(AsyncSenderImpl.java:464)
      	at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:302)
      	at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:295)
      	at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:333)
      	at io.undertow.server.handlers.error.SimpleErrorPageHandler$1.handleDefaultResponse(SimpleErrorPageHandler.java:68)
      	at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1606)
      	at io.undertow.io.DefaultIoCallback.onException(DefaultIoCallback.java:61)
      	at io.undertow.server.handlers.resource.PathResource$1ServerTask.onException(PathResource.java:212)
      	at io.undertow.io.AsyncSenderImpl.invokeOnException(AsyncSenderImpl.java:464)
      	at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:123)
      	at io.undertow.server.handlers.resource.PathResource$1ServerTask.run(PathResource.java:184)
      	at io.undertow.server.handlers.resource.PathResource.serveImpl(PathResource.java:253)
      	at io.undertow.server.handlers.resource.PathResource.serve(PathResource.java:111)
      	at io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:337)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Activity

          People

            rhn-cservice-bbaranow Bartosz Baranowski
            jstourac@redhat.com Jan Stourac
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: