Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-21293

Session.requestDone(...) invoked outside of ControlPoint boundary

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 39.0.0.Final
    • 39.0.0.Beta1
    • Web (Undertow)
    • None

      Previous clean shutdown fixes expanded ControlPoint boundaries to start with the first HttpHandler in the initial handler chain, and end either via ServletRequestListener.requestDestroyed(...) or, if the exchange is not yet closed, via ExchangeCompletionListener.exchangeEvent(...).
      However, Undertow does not invoke Session.requestDone(...) until after the exchange complete listeners are notified. The consequence is that the server will be permitted to suspend/shutdown even though the session manager is not yet done with its request processing.
      This is the cause of the vast majority of the intermittent distributed web application test failures in the clustering testsuite.

      This snippet of TRACE logs demonstrates the problem:

      2025-12-17 10:52:23,497 TRACE [org.wildfly.extension.undertow.deployment.SuspendedServerHandlerWrapper] (default I/O-15) BEGIN request
      2025-12-17 10:52:23,498 TRACE [org.wildfly.clustering.session.infinispan.embedded.InfinispanSessionManager] (default task-3) Locating session OTMtFFYIJRNJXdFXlnDYxOkP6jLhMb1-39l3H9KD
      2025-12-17 10:52:23,537 TRACE [org.wildfly.extension.undertow.deployment.SuspendedServerHandlerWrapper] (default task-3) END request
      2025-12-17 10:52:23,537 TRACE [org.wildfly.clustering.session.cache.CompositeSession] (default task-3) Closing session OTMtFFYIJRNJXdFXlnDYxOkP6jLhMb1-39l3H9KD
      2025-12-17 10:52:23,539 TRACE [org.wildfly.extension.undertow.deployment.SuspendedServerHandlerWrapper] (default I/O-15) BEGIN request
      2025-12-17 10:52:23,539 TRACE [org.wildfly.clustering.session.infinispan.embedded.InfinispanSessionManager] (default task-2) Locating session OTMtFFYIJRNJXdFXlnDYxOkP6jLhMb1-39l3H9KD
      2025-12-17 10:52:23,549 TRACE [org.wildfly.extension.undertow.deployment.SuspendedServerHandlerWrapper] (default task-2) END request
      2025-12-17 10:52:23,550 TRACE [org.wildfly.clustering.session.cache.CompositeSession] (default task-2) Closing session OTMtFFYIJRNJXdFXlnDYxOkP6jLhMb1-39l3H9KD
      

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: