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:
07:59:48,029 ERROR [org.jboss.threads.errors] (default task-1) Thread Thread[default task-1,5,main] threw an uncaught exception: java.lang.RuntimeException: java.lang.IllegalStateException: WFLYCLWEBUT0001: Session pVffTlpa-qn_sG4BLiMUqLau3Kh_VH-srGIh-3F2 is invalid at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:1029) at io.undertow.servlet.spec.AsyncContextImpl.onAsyncComplete(AsyncContextImpl.java:611) at io.undertow.servlet.spec.AsyncContextImpl.access$100(AsyncContextImpl.java:73) at io.undertow.servlet.spec.AsyncContextImpl$3.run(AsyncContextImpl.java:316) at io.undertow.servlet.spec.AsyncContextImpl$6.run(AsyncContextImpl.java:482) at io.undertow.servlet.spec.AsyncContextImpl$TaskDispatchRunnable.run(AsyncContextImpl.java:601) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: WFLYCLWEBUT0001: Session pVffTlpa-qn_sG4BLiMUqLau3Kh_VH-srGIh-3F2 is invalid at org.wildfly.clustering.web.undertow.session.DistributableSession.validate(DistributableSession.java:258) at org.wildfly.clustering.web.undertow.session.DistributableSession.validate(DistributableSession.java:250) at org.wildfly.clustering.web.undertow.session.DistributableSession.getAttribute(DistributableSession.java:151) at io.undertow.servlet.spec.HttpSessionImpl.getAttribute(HttpSessionImpl.java:122) at org.jboss.weld.module.web.context.http.HttpSessionContextImpl.checkBeanIdentifierIndexConsistency(HttpSessionContextImpl.java:100) at org.jboss.weld.module.web.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:49) at org.jboss.weld.module.web.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:25) at org.jboss.weld.module.web.servlet.HttpContextLifecycle.requestInitialized(HttpContextLifecycle.java:244) at org.jboss.weld.module.web.servlet.WeldInitialListener.requestInitialized(WeldInitialListener.java:152) at io.undertow.servlet.core.ApplicationListeners.requestInitialized(ApplicationListeners.java:246) at io.undertow.servlet.spec.AsyncContextImpl.setupRequestContext(AsyncContextImpl.java:703) at io.undertow.servlet.spec.AsyncContextImpl.access$700(AsyncContextImpl.java:73) at io.undertow.servlet.spec.AsyncContextImpl$7.run(AsyncContextImpl.java:616) at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:181) at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:178) at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:1027) ... 10 more
- duplicates
-
JBEAP-15802 [GSS](7.2.z) UNDERTOW-1402 - response.responseDone() skipped after uncaught exception from AsyncContextImpl.onAsyncComplete()
- Closed
- is caused by
-
UNDERTOW-1402 response.responseDone() skipped after uncaught exception from AsyncContextImpl.onAsyncComplete()
- Resolved