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

[GSS](7.2.z) UNDERTOW-1402 - response.responseDone() skipped after uncaught exception from AsyncContextImpl.onAsyncComplete()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.2.3.CR1, 7.2.3.GA
    • 7.1.4.GA
    • Undertow
    • None
    • +
    • Hide

      1. deploy servlet-async.war
      2. request /servet-async/hi.jsp to establish session
      3. request /servlet-async/ to start repeated long async requests
      4. In new tab, request /servlet-async/invalidate.jsp
      5. Close out /servlet-async/ tab, note exception upon last async request completion, attempt shutdown, and note hang

      Show
      1. deploy servlet-async.war 2. request /servet-async/hi.jsp to establish session 3. request /servlet-async/ to start repeated long async requests 4. In new tab, request /servlet-async/invalidate.jsp 5. Close out /servlet-async/ tab, note exception upon last async request completion, attempt shutdown, and note hang

    Description

      If AsyncContextImpl.onAsyncComplete() hits an exception, that can cause following response.responseDone() calls to be missed.

      For instance:

      1. async request a starts
      2. sync request b invalidates session
      3. async request a completes

      Upon completion, the async request does not unlock and throws following exception:

      16:04:58,260 ERROR [stderr] (default task-18) Exception in thread "default task-18" java.lang.RuntimeException: java.lang.IllegalStateException: WFLYCLWEBUT0001: Session 8adSKXK1li8Qo15QnaIGrd31DrB6B83jEL4blzq1 is invalid
      16:04:58,260 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:944)
      16:04:58,260 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl.onAsyncComplete(AsyncContextImpl.java:594)
      16:04:58,260 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl.access$100(AsyncContextImpl.java:71)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl$3.run(AsyncContextImpl.java:315)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl$6.run(AsyncContextImpl.java:473)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl$TaskDispatchRunnable.run(AsyncContextImpl.java:584)
      16:04:58,261 ERROR [stderr] (default task-18) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      16:04:58,261 ERROR [stderr] (default task-18) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      16:04:58,261 ERROR [stderr] (default task-18) 	at java.lang.Thread.run(Thread.java:748)
      16:04:58,261 ERROR [stderr] (default task-18) Caused by: java.lang.IllegalStateException: WFLYCLWEBUT0001: Session 8adSKXK1li8Qo15QnaIGrd31DrB6B83jEL4blzq1 is invalid
      16:04:58,261 ERROR [stderr] (default task-18) 	at org.wildfly.clustering.web.undertow.session.DistributableSession.validate(DistributableSession.java:57)
      16:04:58,261 ERROR [stderr] (default task-18) 	at org.wildfly.clustering.web.undertow.session.DistributableSession.getAttribute(DistributableSession.java:157)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.HttpSessionImpl.getAttribute(HttpSessionImpl.java:122)
      16:04:58,261 ERROR [stderr] (default task-18) 	at org.jboss.weld.context.http.HttpSessionContextImpl.checkBeanIdentifierIndexConsistency(HttpSessionContextImpl.java:98)
      16:04:58,261 ERROR [stderr] (default task-18) 	at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:47)
      16:04:58,261 ERROR [stderr] (default task-18) 	at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:23)
      16:04:58,261 ERROR [stderr] (default task-18) 	at org.jboss.weld.servlet.HttpContextLifecycle.requestInitialized(HttpContextLifecycle.java:237)
      16:04:58,261 ERROR [stderr] (default task-18) 	at org.jboss.weld.servlet.WeldInitialListener.requestInitialized(WeldInitialListener.java:152)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.core.ApplicationListeners.requestInitialized(ApplicationListeners.java:246)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl.setupRequestContext(AsyncContextImpl.java:678)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl.access$700(AsyncContextImpl.java:71)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.AsyncContextImpl$7.run(AsyncContextImpl.java:599)
      16:04:58,261 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:177)
      16:04:58,262 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:174)
      16:04:58,262 ERROR [stderr] (default task-18) 	at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:942)
      16:04:58,262 ERROR [stderr] (default task-18) 	... 8 more
      

      The skipped response.responseDone() call then causes hangs reported in WFLY-10923.

      Attachments

        Issue Links

          Activity

            People

              flaviarnn Flavia Rainone
              rhn-support-ivassile Ilia Vassilev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: