[
https://issues.jboss.org/browse/WFLY-11036?page=com.atlassian.jira.plugin...
]
Rich DiCroce commented on WFLY-11036:
-------------------------------------
Here's a reproducer. Grab [^wfly-11036-0.0.1-SNAPSHOT.war] and drop it into your
deployments directory. Start WildFly using the standalone-ha configuration.
* If you do nothing and just stop the server, it will shut down fine.
* If you open
http://localhost:8080/wfly-11036-0.0.1-SNAPSHOT/ in a browser and then
attempt to shut down the server, shut down will hang.
* If you open that page and then refresh the page, the request will hang for 15 seconds
and then spam the log with lock timeout exceptions.
I can provide the source code for the reproducer (Eclipse/Maven project) if you want it.
Shutdown hangs if WAR is distributable and uses SSE
---------------------------------------------------
Key: WFLY-11036
URL:
https://issues.jboss.org/browse/WFLY-11036
Project: WildFly
Issue Type: Bug
Components: Clustering, Web (Undertow)
Affects Versions: 14.0.0.Final
Reporter: Rich DiCroce
Assignee: Paul Ferraro
Priority: Major
Attachments: wfly-11036-0.0.1-SNAPSHOT.war
I have an application (WAR) that uses server-sent events (as standardized in JAX-RS 2.1).
The application is also marked as <distributable/> in web.xml. If anything actually
opens a SSE channel, WildFly hangs during shutdown.
The culprit appears to be DistributableSessionManager. See the below thread dump, taken
during a hung shutdown. DSM is coded to wait up to getDefaultMaxInactiveInterval() seconds
in its stop() method, and the default is 30 minutes unless configured otherwise.
That's why shutdown hangs, although I don't know what it's waiting for.
If I remove <distributable/> from web.xml, shutdown happens normally.
{code}
"ServerService Thread Pool -- 45" #154 prio=5 os_prio=0 tid=0x000000002bc1a800
nid=0x115e8 waiting on condition [0x0000000035c5e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000fb4bcc98> (a
java.util.concurrent.locks.StampedLock)
at java.util.concurrent.locks.StampedLock.acquireWrite(StampedLock.java:1119)
at java.util.concurrent.locks.StampedLock.tryWriteLock(StampedLock.java:394)
at
org.wildfly.clustering.web.undertow.session.DistributableSessionManager.stop(DistributableSessionManager.java:98)
- locked <0x00000000fb446c70> (a
org.wildfly.clustering.web.undertow.session.DistributableSessionManager)
at
io.undertow.servlet.core.DeploymentManagerImpl$3.call(DeploymentManagerImpl.java:617)
at
io.undertow.servlet.core.DeploymentManagerImpl$3.call(DeploymentManagerImpl.java:607)
at
io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at
io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$920/1245185678.call(Unknown
Source)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$920/1245185678.call(Unknown
Source)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$920/1245185678.call(Unknown
Source)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$920/1245185678.call(Unknown
Source)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$920/1245185678.call(Unknown
Source)
at
io.undertow.servlet.core.DeploymentManagerImpl.stop(DeploymentManagerImpl.java:621)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stopContext(UndertowDeploymentService.java:135)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$2.run(UndertowDeploymentService.java:117)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Locked ownable synchronizers:
- None
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)