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

[GSS](7.4.z) UNDERTOW-2425 - io.undertow.servlet.spec.ServletPrintWriter.close() high CPU when encoding characters on previously errored writer

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      1. Deploy jbeap-27599.war
      2. Attempt stalled request that is then killed with a command like below:

      $ curl -v --http2 --http2-prior-knowledge localhost:8080/jbeap-27599/ & sleep 1; killall -STOP curl; sleep 20; killall -9 curl
      

      3. Wait about 30 seconds for that to complete and note there is then indefinite CPU use

      Show
      1. Deploy jbeap-27599.war 2. Attempt stalled request that is then killed with a command like below: $ curl -v --http2 --http2-prior-knowledge localhost:8080/jbeap-27599/ & sleep 1; killall -STOP curl; sleep 20; killall -9 curl 3. Wait about 30 seconds for that to complete and note there is then indefinite CPU use

      io.undertow.servlet.spec.ServletPrintWriter.close can reach a high CPU state if encoding characters on a writer that experienced a previous error.

      Below is one of these threads' stack trace.

      "default task-308" #1852 prio=5 os_prio=0 tid=0x000055569338e000 nid=0x4243c runnable [0x00007fa229393000]
      java.lang.Thread.State: RUNNABLE
      at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:693)
      at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:579)
      at io.undertow.servlet.spec.ServletPrintWriter.close(ServletPrintWriter.java:104)
      at io.undertow.servlet.spec.ServletPrintWriterDelegate.close(ServletPrintWriterDelegate.java:81)
      at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:491)
      at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:586)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:339)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131)
      at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction$$Lambda$1615/584218055.call(Unknown Source)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$1616/1062105923.call(Unknown Source)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
      

              flaviarnn Flavia Rainone
              rhn-support-bmalviya Bharat Malviya
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: