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

(7.2.z) response.responseDone() skipped after uncaught exception from AsyncContextImpl.onAsyncComplete()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 7.2.0.CD14
    • Undertow
    • None
    • Hide
      1. Either disable transactions on the infinispan cache or change the locking isolation to READ_COMMITTED
        /subsystem=infinispan/cache-container=web/local-cache=passivation/component=locking:write-attribute(name=isolation,value=READ_COMMITTED)
        reload
        
      2. start the server: ./bin/standalone.sh
      3. deploy servlet-async.war (download from UNDERTOW-1402)
      4. request /servet-async/hi.jsp to establish session
      5. request /servlet-async/ to start repeated long async requests
      6. In new tab, request /servlet-async/invalidate.jsp and wait for the exception to occur in the server log
      Show
      Either disable transactions on the infinispan cache or change the locking isolation to READ_COMMITTED /subsystem=infinispan/cache-container=web/local-cache=passivation/component=locking:write-attribute(name=isolation,value=READ_COMMITTED) reload start the server: ./bin/standalone.sh deploy servlet-async.war (download from UNDERTOW-1402 ) request /servet-async/hi.jsp to establish session request /servlet-async/ to start repeated long async requests In new tab, request /servlet-async/invalidate.jsp and wait for the exception to occur in the server log

    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:

      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
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tmiyargi Teresa Miyar Gil (Inactive)
              jstourac@redhat.com Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: