2 Replies Latest reply on Jun 15, 2009 1:25 PM by Tim Fox

    Deadlock on pinger (recent commit)

    Clebert Suconic Master

      The latest commit on Pinger introduced a deadlock. It looks like easy to fix though.


      Java stack information for the threads listed above:
      ===================================================
      "Thread-4 (group:JBM-scheduled-threads-331781542)":
       at org.jboss.messaging.integration.transports.netty.MessagingChannelHandler.exceptionCaught(MessagingChannelHandler.java:103)
       - waiting to lock <0x00007f7488dc0610> (a org.jboss.messaging.integration.transports.netty.NettyAcceptor$MessagingServerChannelHandler)
       at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:147)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:567)
       at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:803)
       at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:206)
       at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:129)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:567)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:562)
       at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:607)
       at org.jboss.netty.channel.socket.nio.NioWorker.cleanUpWriteBuffer(NioWorker.java:577)
       - locked <0x00007f7488dc0848> (a java.lang.Object)
       at org.jboss.netty.channel.socket.nio.NioWorker.write(NioWorker.java:326)
       at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:140)
       at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:79)
       at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:791)
       at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:309)
       at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:271)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:590)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:585)
       at org.jboss.netty.channel.Channels.write(Channels.java:878)
       at org.jboss.netty.channel.Channels.write(Channels.java:826)
       at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:236)
       at org.jboss.messaging.integration.transports.netty.NettyConnection.write(NettyConnection.java:128)
       at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.send(RemotingConnectionImpl.java:1056)
       - locked <0x00007f7488dc1ce0> (a java.lang.Object)
       at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.send(RemotingConnectionImpl.java:1006)
       at org.jboss.messaging.core.remoting.impl.Pinger.run(Pinger.java:122)
       - locked <0x00007f7487faaef8> (a org.jboss.messaging.core.remoting.impl.Pinger)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      "New I/O server worker #1-1":
       at org.jboss.messaging.core.remoting.impl.Pinger.close(Pinger.java:130)
       - waiting to lock <0x00007f7487faaef8> (a org.jboss.messaging.core.remoting.impl.Pinger)
       at org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl.closeConnection(RemotingServiceImpl.java:399)
       at org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl.connectionDestroyed(RemotingServiceImpl.java:319)
       at org.jboss.messaging.integration.transports.netty.NettyAcceptor$Listener.connectionDestroyed(NettyAcceptor.java:458)
       at org.jboss.messaging.integration.transports.netty.MessagingChannelHandler.channelDisconnected(MessagingChannelHandler.java:85)
       - locked <0x00007f7488dc0610> (a org.jboss.messaging.integration.transports.netty.NettyAcceptor$MessagingServerChannelHandler)
       at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:137)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:567)
       at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:803)
       at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:304)
       at org.jboss.netty.handler.codec.frame.FrameDecoder.channelDisconnected(FrameDecoder.java:194)
       at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:119)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:567)
       at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:562)
       at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:496)
       at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:520)
       at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:321)
       at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:307)
       at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:255)
       at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:176)
       at org.jboss.netty.util.internal.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:72)
       at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:49)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      
      Found 1 deadlock.
      
      



      I'm removing the synchronized on Pinger.close at my copy just to get the testsuite running. I will post the results here later today.