-
Bug
-
Resolution: Unresolved
-
Major
-
39.0.0.Beta1
-
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