Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19578

[GSS](7.2.z) UNDERTOW-1720 - NullPointerException at channel.write(buffer) due to a race condition in AsyncSenderImpl

    Details

      Description

      When serving static content through the file handler, there's a possibility that the following NullPointerException could happen at buffer during writing to the channel. Possibly, response data corruption might happen in this case. A root cause of this issue could be a race condition in Underotw's Sender implementation.

      ERROR [org.xnio.listener] (default I/O-3) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException
          at org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) [xnio-api-3.4.7.Final-redhat-1.jar:3.4.7.Final-redhat-1]
          at io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:187)
          at io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2011)
          at io.undertow.io.AsyncSenderImpl.invokeOnComplete(AsyncSenderImpl.java:398)
          at io.undertow.io.AsyncSenderImpl.access(AsyncSenderImpl.java:41)
          at io.undertow.io.AsyncSenderImpl.handleEvent(AsyncSenderImpl.java:454)
          at io.undertow.io.AsyncSenderImpl.handleEvent(AsyncSenderImpl.java:440)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.4.7.Final-redhat-1.jar:3.4.7.Final-redhat-1]
          at io.undertow.channels.DetachableStreamSinkChannel$SetterDelegatingListener.handleEvent(DetachableStreamSinkChannel.java:285)
          at io.undertow.channels.DetachableStreamSinkChannel$SetterDelegatingListener.handleEvent(DetachableStreamSinkChannel.java:272)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.4.7.Final-redhat-1.jar:3.4.7.Final-redhat-1]
          at org.xnio.conduits.WriteReadyHandler$ChannelListenerHandler.writeReady(WriteReadyHandler.java:65) [xnio-api-3.4.7.Final-redhat-1.jar:3.4.7.Final-redhat-1]
          at io.undertow.server.protocol.ajp.AjpServerResponseConduit$AjpServerWriteReadyHandler.writeReady(AjpServerResponseConduit.java:496)
          at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:94) [xnio-nio-3.4.7.Final-redhat-1.jar:3.4.7.Final-redhat-1]
          at org.xnio.nio.WorkerThread.run(WorkerThread.java:571) [xnio-nio-3.4.7.Final-redhat-1.jar:3.4.7.Final-redhat-1]
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  flavia.rainone Flavia Rainone
                  Reporter:
                  mmiura Masafumi Miura
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: