JBoss Remoting deadlocks in OutboundMessage.cancel and RemoteWriteListener.send
Environment
- JBoss Enterprise Application Platform (EAP) 6.4.2+
Issue
- JBoss becomes unresponsive with a deadlock like the following:
"Remoting read-1":
at org.jboss.remoting3.remote.OutboundMessage.cancel(OutboundMessage.java:288)
- waiting to lock <0xdd0ae4c0> (a org.xnio.streams.BufferPipeOutputStream)
at org.jboss.remoting3.remote.RemoteConnectionChannel.closeMessages(RemoteConnectionChannel.java:560)
at org.jboss.remoting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.java:542)
at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:372)
at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAllChannels(RemoteConnectionHandler.java:429)
at org.jboss.remoting3.remote.RemoteConnectionHandler.sendCloseRequest(RemoteConnectionHandler.java:233)
at org.jboss.remoting3.remote.RemoteConnectionHandler.handleConnectionClose(RemoteConnectionHandler.java:113)
at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:81)
- locked <0xdd29f670> (a java.util.ArrayDeque)
at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
at org.xnio.ssl.JsseConnectedSslStreamChannel.handleReadable(JsseConnectedSslStreamChannel.java:183)
at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
at org.xnio.nio.NioHandle.run(NioHandle.java:90)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:198)
"Remoting task-2":
at org.jboss.remoting3.remote.RemoteConnection$RemoteWriteListener.send(RemoteConnection.java:294)
- waiting to lock <0xdd29f670> (a java.util.ArrayDeque)
at org.jboss.remoting3.remote.RemoteConnection.send(RemoteConnection.java:122)
at org.jboss.remoting3.remote.OutboundMessage$1.accept(OutboundMessage.java:154)
at org.xnio.streams.BufferPipeOutputStream.send(BufferPipeOutputStream.java:126)
at org.xnio.streams.BufferPipeOutputStream.send(BufferPipeOutputStream.java:114)
at org.xnio.streams.BufferPipeOutputStream.flush(BufferPipeOutputStream.java:143)
- locked <0xdd0ae4c0> (a org.xnio.streams.BufferPipeOutputStream)
at org.xnio.streams.BufferPipeOutputStream.close(BufferPipeOutputStream.java:161)
- locked <0xdd0ae4c0> (a org.xnio.streams.BufferPipeOutputStream)
at org.jboss.remoting3.remote.OutboundMessage.close(OutboundMessage.java:283)
- locked <0xdd0ae4c0> (a org.xnio.streams.BufferPipeOutputStream)
at org.jboss.as.ejb3.remote.protocol.versionone.ChannelAssociation.releaseChannelMessageOutputStream(ChannelAssociation.java:85)
at org.jboss.as.ejb3.remote.EJBRemoteConnectorService.sendVersionMessage(EJBRemoteConnectorService.java:184)
at org.jboss.as.ejb3.remote.EJBRemoteConnectorService.access$000(EJBRemoteConnectorService.java:73)
at org.jboss.as.ejb3.remote.EJBRemoteConnectorService$ChannelOpenListener.channelOpened(EJBRemoteConnectorService.java:211)
at org.jboss.remoting3.spi.SpiUtils$ServiceOpenTask.run(SpiUtils.java:126)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Resolution
- Downgrade to EAP 6.4.1. RejectedExecutionExceptions may occur here, but they have shown no side effect other than their log message.
- Upgrade to EAP 6.4.5+
Root Cause
- Content from issues.jboss.org is not included.WFLY-4113
- This content is not included.BZ-1215714
- Content from issues.jboss.org is not included.REM3-204
- This content is not included.BZ-1262114
- This is a regression introduced in 6.4.2 by This content is not included.BZ-1238420, which removed an executor that previously handled OutboundMessage.cancels asynchronously, avoiding the deadlock
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.