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

StackOverflowError upon AJP read timeout

XMLWordPrintable

    • Hide

      1. Configure an ajp listener with a low timeout for ease of reproducing:

                      <ajp-listener name="ajp" socket-binding="ajp" read-timeout="1000" write-timeout="1000" />
      

      2. Open an idle connection exceeding the timeout:

      telnet localhost 8009
      
      Show
      1. Configure an ajp listener with a low timeout for ease of reproducing: <ajp-listener name= "ajp" socket-binding= "ajp" read-timeout= "1000" write-timeout= "1000" /> 2. Open an idle connection exceeding the timeout: telnet localhost 8009

      After UNDERTOW-1824, a StackOverflowError now occurs upon an AJP read timeout:

      ERROR [org.xnio.listener] (default I/O-17) XNIO001007: A channel event listener threw an exception: java.lang.StackOverflowError
      	at org.jboss.logmanager.formatters.Formatters$7.renderRaw(Formatters.java:450)
      	at org.jboss.logmanager.formatters.Formatters$JustifyingFormatStep.render(Formatters.java:215)
      	at org.jboss.logmanager.formatters.MultistepFormatter.format(MultistepFormatter.java:89)
      	at org.jboss.logmanager.ExtFormatter.format(ExtFormatter.java:32)
      	at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:46)
      	at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:77)
      	at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:333)
      	at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
      	at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
      	at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
      	at org.jboss.logmanager.Logger.logRaw(Logger.java:852)
      	at org.jboss.logmanager.Logger.log(Logger.java:804)
      	at org.jboss.logging.JBossLogManagerLogger.doLogf(JBossLogManagerLogger.java:53)
      	at org.jboss.logging.Logger.logf(Logger.java:2445)
      	at io.undertow.UndertowLogger_$logger.exceptionProcessingRequest(UndertowLogger_$logger.java:57)
      	at io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:252)
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.sendMessages(AjpReadListener.java:316)
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.handleInternalServerError(AjpReadListener.java:261)
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:249)
      ...
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.sendMessages(AjpReadListener.java:316)
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.handleInternalServerError(AjpReadListener.java:261)
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:249)
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:56)
      	at org.jboss.xnio@3.8.4.Final-redhat-00001//org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.jboss.xnio@3.8.4.Final-redhat-00001//org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
      	at io.undertow.core@2.2.9.SP1-redhat-00001//io.undertow.conduits.ReadTimeoutStreamSourceConduit$2.readReady(ReadTimeoutStreamSourceConduit.java:99)
      	at org.jboss.xnio.nio@3.8.4.Final-redhat-00001//org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
      	at org.jboss.xnio.nio@3.8.4.Final-redhat-00001//org.xnio.nio.NioHandle$1.run(NioHandle.java:50)
      	at org.jboss.xnio.nio@3.8.4.Final-redhat-00001//org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
      	at org.jboss.xnio.nio@3.8.4.Final-redhat-00001//org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
      

      The following IOException is repeated rapidly until that overflow:

      DEBUG [io.undertow.request.io] (default I/O-14) UT005013: An IOException occurred: org.xnio.channels.ReadTimeoutException: UT000199: Read timed out after 1638571000771 milliseconds.
      	at io.undertow.conduits.ReadTimeoutStreamSourceConduit.checkExpired(ReadTimeoutStreamSourceConduit.java:238)
      	at io.undertow.conduits.ReadTimeoutStreamSourceConduit.read(ReadTimeoutStreamSourceConduit.java:169)
      	at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
      	at io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:125)
      	at io.undertow.server.protocol.ajp.AjpReadListener.sendMessages(AjpReadListener.java:316)
      	at io.undertow.server.protocol.ajp.AjpReadListener.handleInternalServerError(AjpReadListener.java:261)
      

      And the connection fills with the repeated SEND_HEADERS_INTERNAL_SERVER_ERROR_MSG bytes.

              ropalka Richard Opalka
              rhn-support-aogburn Aaron Ogburn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: