The EAP 6 CLI deadlocks while closing

Solution Verified - Updated -

Issue

  • We have a bash CLI script, and the script randomly fails to complete.
  • After CLI completes our commands and it is closing, it appears that the CLI hits the following deadlock, preventing it from terminating properly:
"Remoting "cli-client" read-1" prio=10 tid=0x0000000006929800 nid=0x1047 waiting for monitor entry [0x00000000422b2000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at org.jboss.as.cli.impl.CLIModelControllerClient$ChannelCloseHandler.handleClose(CLIModelControllerClient.java:275)
    - waiting to lock <0x00000000e5a66040> (a java.lang.String)
    at org.jboss.as.cli.impl.CLIModelControllerClient$ChannelCloseHandler.handleClose(CLIModelControllerClient.java:261)
    at org.jboss.remoting3.spi.SpiUtils.safeHandleClose(SpiUtils.java:54)
    at org.jboss.remoting3.spi.AbstractHandleableCloseable$CloseHandlerTask.run(AbstractHandleableCloseable.java:501)
    at org.jboss.remoting3.spi.AbstractHandleableCloseable.runCloseTask(AbstractHandleableCloseable.java:406)
    at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeComplete(AbstractHandleableCloseable.java:277)
    at org.jboss.remoting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.java:515)
    at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
    at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAllChannels(RemoteConnectionHandler.java:390)
    - locked <0x00000000e5e5b050> (a org.jboss.remoting3.remote.RemoteConnection)
    at org.jboss.remoting3.remote.RemoteConnectionHandler.handleConnectionClose(RemoteConnectionHandler.java:108)
    at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:78)
    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:180)
    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:187)

"main" prio=10 tid=0x0000000005af1800 nid=0x103b waiting for monitor entry [0x00000000413ab000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAllChannels(RemoteConnectionHandler.java:389)
    - waiting to lock <0x00000000e5e5b050> (a org.jboss.remoting3.remote.RemoteConnection)
    at org.jboss.remoting3.remote.RemoteConnectionHandler.sendCloseRequest(RemoteConnectionHandler.java:231)
    at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAction(RemoteConnectionHandler.java:376)
    at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
    at org.jboss.remoting3.ConnectionImpl.closeAction(ConnectionImpl.java:52)
    at org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:153)
    at org.jboss.as.protocol.StreamUtils.safeClose(StreamUtils.java:66)
    at org.jboss.as.protocol.ProtocolConnectionManager.shutdown(ProtocolConnectionManager.java:110)
    at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.close(FutureManagementChannel.java:193)
    at org.jboss.as.protocol.StreamUtils.safeClose(StreamUtils.java:66)
    at org.jboss.as.cli.impl.CLIModelControllerClient.close(CLIModelControllerClient.java:174)
    - locked <0x00000000e5a66040> (a java.lang.String)
    at org.jboss.as.protocol.StreamUtils.safeClose(StreamUtils.java:66)
    at org.jboss.as.cli.impl.CommandContextImpl.disconnectController(CommandContextImpl.java:901)
    at org.jboss.as.cli.impl.CommandContextImpl.terminateSession(CommandContextImpl.java:581)
    at org.jboss.as.cli.impl.CliLauncher.processCommands(CliLauncher.java:286)
    at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:231)
    at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.modules.Module.run(Module.java:270)
    at org.jboss.modules.Main.main(Main.java:294)

Environment

  • JBoss Enterprise Application Platform (EAP) 6.0.1 with the BZ910122 one-off installed

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.