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.
- clones
-
JBEAP-15802 [GSS](7.2.z) UNDERTOW-1402 - response.responseDone() skipped after uncaught exception from AsyncContextImpl.onAsyncComplete()
- Closed
- is caused by
-
UNDERTOW-1174 Exceptions thrown from async listeners may not be handled properly
- Resolved
-
UNDERTOW-1402 response.responseDone() skipped after uncaught exception from AsyncContextImpl.onAsyncComplete()
- Resolved
- is incorporated by
-
JBEAP-15308 [GSS](7.1.z) Server stop blocked by DistributableSessionManager after invalidation during async request
- Closed
- links to