The weird part is that something wrong has happened after the application received the #0 response because although C* was sending responses, the application never received them. And vice versa - the application was sending requests but C* never received them (there were 24 in flight requests in the moment of #2 timeout). Basically, both sides think the connection is working and are writing to it but the other side doesn't receive anything. And there are no communication related exceptions in logs (or any other exceptions for that matter).
It could be one time network glitch or something but the problem is that this error is 100% reliable. Every time I start the application, the communication stops when the response to this particular request is received. And it behaves the same when I start the application in NetBeans debugger under Windows (and connect to C* on the Linux box).
Has anybody seen anything like that?
I'll try to make a small application that will hopefully be able to reproduce it.
Thanks.
Andrew
Bottom line: I would consider it VERY USEFUL if both the client and C* logged stream IDs of requests and responses.
--
Olivier Michallat
Driver & tools engineer, DataStax
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.
"New I/O worker #12" nid=23 state=WAITING - waiting on <0x381ba0c6> (a com.google.common.util.concurrent.AbstractFuture$Sync) - locked <0x381ba0c6> (a com.google.common.util.concurrent.AbstractFuture$Sync) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303) at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:292) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:135) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:177) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) at com.datastax.cassandra.examples.Test$1.apply(Test.java:136) at com.datastax.cassandra.examples.Test$1.apply(Test.java:130) at com.google.common.util.concurrent.Futures$1.apply(Futures.java:720) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:859) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:150) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:135) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185) at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:109) at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:283) at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:313) at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:715) at com.datastax.shaded.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at com.datastax.shaded.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at com.datastax.shaded.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at com.datastax.shaded.netty.channel.Channels.fireMessageReceived(Channels.java:296) at com.datastax.shaded.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) at com.datastax.shaded.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at com.datastax.shaded.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at com.datastax.shaded.netty.channel.Channels.fireMessageReceived(Channels.java:296) at com.datastax.shaded.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) at com.datastax.shaded.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) at com.datastax.shaded.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) at com.datastax.shaded.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at com.datastax.shaded.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at com.datastax.shaded.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) at com.datastax.shaded.netty.channel.Channels.fireMessageReceived(Channels.java:268) at com.datastax.shaded.netty.channel.Channels.fireMessageReceived(Channels.java:255) at com.datastax.shaded.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) at com.datastax.shaded.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) at com.datastax.shaded.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) at com.datastax.shaded.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at com.datastax.shaded.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at com.datastax.shaded.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at com.datastax.shaded.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) 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:745) - java.util.concurrent.ThreadPoolExecutor$Worker@e5297a7
I'll note that this is something that changed in 2.0.9.2. The code used to release the connection before, but I moved it to a finally block (there's one place in the middle of the method where we don't want to release the connection).
I'll note that this is something that changed in 2.0.9.2. The code used to release the connection before, but I moved it to a finally block (there's one place in the middle of the method where we don't want to release the connection).Good catch Olivier! I did not make the connection that the behavior changed in 2.0.9.2. It does seem like a good idea to release the connection earlier if it can be.
On Sunday, February 15, 2015 at 1:58:33 PM UTC-6, Olivier Michallat wrote:> the driver does not release the connection processing the request until the future.set() call completesI'll note that this is something that changed in 2.0.9.2. The code used to release the connection before, but I moved it to a finally block (there's one place in the middle of the method where we don't want to release the connection).Even though you should still follow Andy's recommendations, I think the code should have handled this better, so I'm going to revisit my changes (see JAVA-666).--
Olivier Michallat
Driver & tools engineer, DataStax