java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.

DataStax JIRA | Ahmet AKYOL | 4 years ago
  1. 0

    I guess, the problem is that I'm also using netty (3.6.x) in my project to build a basic web server. I use java driver inside this server. When I switch to 4.0.beta1 for my server implementation there is no problem. I'll create an issue for Netty too, but first I wanted to discuss the problem here. Any idea ? Here is the log: 21:51:37.719 ERROR c.d.driver.core.RetryingCallback - Unexpected error while querying /192.168.177.133 java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread. at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:342) ~[netty-3.6.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:256) ~[netty-3.6.2.Final.jar:na] at com.datastax.driver.core.Connection.write(Connection.java:259) ~[cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.RetryingCallback.query(RetryingCallback.java:108) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.RetryingCallback.sendRequest(RetryingCallback.java:91) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session$Manager.execute(Session.java:370) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session$Manager.executeQuery(Session.java:406) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session.executeAsync(Session.java:154) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session.execute(Session.java:106) [cassandra-driver-core-1.0.0-beta1.jar:na] ..... .....

    DataStax JIRA | 4 years ago | Ahmet AKYOL
    java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.
  2. 0

    I guess, the problem is that I'm also using netty (3.6.x) in my project to build a basic web server. I use java driver inside this server. When I switch to 4.0.beta1 for my server implementation there is no problem. I'll create an issue for Netty too, but first I wanted to discuss the problem here. Any idea ? Here is the log: 21:51:37.719 ERROR c.d.driver.core.RetryingCallback - Unexpected error while querying /192.168.177.133 java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread. at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:342) ~[netty-3.6.2.Final.jar:na] at org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:256) ~[netty-3.6.2.Final.jar:na] at com.datastax.driver.core.Connection.write(Connection.java:259) ~[cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.RetryingCallback.query(RetryingCallback.java:108) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.RetryingCallback.sendRequest(RetryingCallback.java:91) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session$Manager.execute(Session.java:370) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session$Manager.executeQuery(Session.java:406) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session.executeAsync(Session.java:154) [cassandra-driver-core-1.0.0-beta1.jar:na] at com.datastax.driver.core.Session.execute(Session.java:106) [cassandra-driver-core-1.0.0-beta1.jar:na] ..... .....

    DataStax JIRA | 4 years ago | Ahmet AKYOL
    java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.
  3. 0

    netty based project(dependency) seems to cause deadlock

    GitHub | 4 years ago | LiQusha
    java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Similar to JAVA-72, but different stacktrace: {CODE} WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0xf7b0f341, /10.210.195.192:41278 :> /10.46.203.57:9042] EXCEPTION: java.nio.channels.ClosedChannelException) java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread. at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:342) at org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:256) at com.datastax.driver.core.Connection.<init>(Connection.java:105) at com.datastax.driver.core.Connection.<init>(Connection.java:51) at com.datastax.driver.core.Connection$Factory.open(Connection.java:376) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:68) at com.datastax.driver.core.Session$Manager.addOrRenewPool(Session.java:306) at com.datastax.driver.core.Session$Manager.updateCreatedPools(Session.java:341) at com.datastax.driver.core.Session$Manager.onDown(Session.java:363) at com.datastax.driver.core.Cluster$Manager.onDown(Cluster.java:653) at com.datastax.driver.core.Host$HealthMonitor.setDown(Host.java:178) at com.datastax.driver.core.Host$HealthMonitor.signalConnectionFailure(Host.java:195) at com.datastax.driver.core.HostConnectionPool.returnConnection(HostConnectionPool.java:206) at com.datastax.driver.core.RequestHandler.onException(RequestHandler.java:392) at com.datastax.driver.core.Connection$Dispatcher.errorOutAllHandler(Connection.java:492) at com.datastax.driver.core.Connection.defunct(Connection.java:185) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:485) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.Channels$7.run(Channels.java:499) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:366) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {CODE}

    DataStax JIRA | 3 years ago | Joaquin Casares
    java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.
  6. 0

    honestly, i'm not sure what the *real* impact is here, but figured i'd share as it looks like the fix is included in the stack trace :) {code} Apr 11, 2013 10:53:53 PM org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0xa51fa41d, /10.138.12.28:37359 :> sac-cas05.cassandra.cudaops.com/10.138.12.14:9042] EXCEPTION: java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.) java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread. at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:342) at org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:256) at com.datastax.driver.core.Connection.<init>(Connection.java:104) at com.datastax.driver.core.Connection.<init>(Connection.java:50) at com.datastax.driver.core.Connection$Factory.open(Connection.java:361) at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:181) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:144) at com.datastax.driver.core.ControlConnection.reconnect(ControlConnection.java:98) at com.datastax.driver.core.ControlConnection.onDown(ControlConnection.java:402) at com.datastax.driver.core.Cluster$Manager.onDown(Cluster.java:582) at com.datastax.driver.core.Host$HealthMonitor.setDown(Host.java:178) at com.datastax.driver.core.Host$HealthMonitor.signalConnectionFailure(Host.java:195) at com.datastax.driver.core.HostConnectionPool.returnConnection(HostConnectionPool.java:206) at com.datastax.driver.core.RequestHandler.onException(RequestHandler.java:390) at com.datastax.driver.core.Connection$Dispatcher.errorOutAllHandler(Connection.java:468) at com.datastax.driver.core.Connection.defunct(Connection.java:182) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:461) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:351) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) {code}

    DataStax JIRA | 4 years ago | Michael Kjellman
    java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.

      at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock()
    2. Netty
      DefaultChannelFuture.awaitUninterruptibly
      1. org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:342)[netty-3.6.2.Final.jar:na]
      2. org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:256)[netty-3.6.2.Final.jar:na]
      2 frames
    3. DataStax Java Driver for Apache Cassandra - Core
      Session.execute
      1. com.datastax.driver.core.Connection.write(Connection.java:259)[cassandra-driver-core-1.0.0-beta1.jar:na]
      2. com.datastax.driver.core.RetryingCallback.query(RetryingCallback.java:108)[cassandra-driver-core-1.0.0-beta1.jar:na]
      3. com.datastax.driver.core.RetryingCallback.sendRequest(RetryingCallback.java:91)[cassandra-driver-core-1.0.0-beta1.jar:na]
      4. com.datastax.driver.core.Session$Manager.execute(Session.java:370)[cassandra-driver-core-1.0.0-beta1.jar:na]
      5. com.datastax.driver.core.Session$Manager.executeQuery(Session.java:406)[cassandra-driver-core-1.0.0-beta1.jar:na]
      6. com.datastax.driver.core.Session.executeAsync(Session.java:154)[cassandra-driver-core-1.0.0-beta1.jar:na]
      7. com.datastax.driver.core.Session.execute(Session.java:106)[cassandra-driver-core-1.0.0-beta1.jar:na]
      7 frames