1 2 Previous Next 17 Replies Latest reply on Mar 5, 2009 9:55 AM by ataylor Go to original post
      • 15. Re: Another DeadLock, something around InVM
        timfox

        Don't trust external sites. I very much doubt it will be around in 5 years if someone is looking through the archives of this forum.

        • 16. Re: Another DeadLock, something around InVM
          ataylor

          Ive added some debug to log the packet, as follows

          [junit] main 13:57:13,878 INFO [SecurityTest] ####################################################### Start IN-VM test: testLoginInvalidUserInvalidPassword
           [junit] New I/O server worker #6-1 13:57:13,888 ERROR [MessagingServerPacketHandler] Failed to create session
           [junit] MessagingException[errorCode=105 message=Unable to validate user: osama]
           [junit] at org.jboss.messaging.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:119)
           [junit] at org.jboss.messaging.core.server.impl.MessagingServerImpl.doCreateSession(MessagingServerImpl.java:975)
           [junit] MessagingException[errorCode=105 message=Unable to validate user: osama]
           [junit] at org.jboss.messaging.core.server.impl.MessagingServerImpl.createSession(MessagingServerImpl.java:693)
           [junit] at org.jboss.messaging.core.server.impl.MessagingServerPacketHandler.doHandleCreateSession(MessagingServerPacketHandler.java:103)
           [junit] at org.jboss.messaging.core.server.impl.MessagingServerPacketHandler.handleCreateSession(MessagingServerPacketHandler.java:140)
           [junit] at org.jboss.messaging.core.server.impl.MessagingServerPacketHandler.handlePacket(MessagingServerPacketHandler.java:71)
           [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.handlePacket(RemotingConnectionImpl.java:1472)
           [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.access$400(RemotingConnectionImpl.java:845)
           [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:492)
           [junit] at org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:361)
           [junit] at org.jboss.messaging.integration.transports.netty.MessagingChannelHandler.messageReceived(MessagingChannelHandler.java:62)
           [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:804)
           [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:385)
           [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:279)
           [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:202)
           [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
           [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.handleUpstream(FrameDecoder.java:162)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:572)
           [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:342)
           [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:329)
           [junit] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:302)
           [junit] at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:254)
           [junit] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:171)
           [junit] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:72)
           [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           [junit] at java.lang.Thread.run(Thread.java:619)
           [junit] packet = PACKET[type=20, channelID=1], exception= MessagingException[errorCode=105 message=Unable to validate user: osama]]
           [junit] lock = java.util.concurrent.locks.ReentrantLock@18177ca[Locked by thread main]
           [junit] at org.jboss.messaging.core.remoting.impl.wireformat.MessagingExceptionMessage.decodeBody(MessagingExceptionMessage.java:81)
           [junit] at org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.decode(PacketImpl.java:198)
           [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl.decode(RemotingConnectionImpl.java:836)
           [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:482)
           [junit] at org.jboss.messaging.core.client.impl.ConnectionManagerImpl$DelegatingBufferHandler.bufferReceived(ConnectionManagerImpl.java:944)
           [junit] at org.jboss.messaging.integration.transports.netty.MessagingChannelHandler.messageReceived(MessagingChannelHandler.java:62)
           [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:804)
           [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:385)
           [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:279)
           [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:202)
           [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
           [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.handleUpstream(FrameDecoder.java:162)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
           [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:572)
           [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:342)
           [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:329)
           [junit] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:302)
           [junit] at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:254)
           [junit] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:171)
           [junit] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:72)
           [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           [junit] at java.lang.Thread.run(Thread.java:619)
          


          you see the stacktrace on the server.
          The packet exception being received
          the lock being obtained unsuccessfully because the main thread has it. The weird thing is how can th emain thread have it if only 1 packet has been received but not processes yet becausse of th elock

          • 17. Re: Another DeadLock, something around InVM
            ataylor

            Ive checked the logging, i log the packet being received, the lock before the response thread tries to lock it and just after it has obtained the lock (which doesn't appear) and the stacktrace from the createsession method prefixed with lots of *'s.

            [junit] main 14:51:49,532 INFO [SecurityTest] ####################################################### Start IN-VM test: testLoginValidUserInvalidPassword
             [junit] New I/O server worker #6-2 14:51:49,537 ERROR [MessagingServerPacketHandler] Failed to create session
             [junit] MessagingException[errorCode=105 message=Unable to validate user: john]
             [junit] at org.jboss.messaging.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:119)
             [junit] at org.jboss.messaging.core.server.impl.MessagingServerImpl.doCreateSession(MessagingServerImpl.java:975)
             [junit] at org.jboss.messaging.core.server.impl.MessagingServerImpl.createSession(MessagingServerImpl.java:693)
             [junit] at org.jboss.messaging.core.server.impl.MessagingServerPacketHandler.doHandleCreateSession(MessagingServerPacketHandler.java:103)
             [junit] at org.jboss.messaging.core.server.impl.MessagingServerPacketHandler.handleCreateSession(MessagingServerPacketHandler.java:140)
             [junit] at org.jboss.messaging.core.server.impl.MessagingServerPacketHandler.handlePacket(MessagingServerPacketHandler.java:71)
             [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.handlePacket(RemotingConnectionImpl.java:1472)
             [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl$ChannelImpl.access$400(RemotingConnectionImpl.java:845)
             [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:492)
             [junit] at org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:361)
             [junit] at org.jboss.messaging.integration.transports.netty.MessagingChannelHandler.messageReceived(MessagingChannelHandler.java:62)
             [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:804)
             [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:385)
             [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:279)
             [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:202)
             [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
             [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.handleUpstream(FrameDecoder.java:162)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:572)
             [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:342)
             [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:329)
             [junit] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:302)
             [junit] at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:254)
             [junit] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:171)
             [junit] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:72)
             [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
             [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
             [junit] at java.lang.Thread.run(Thread.java:619)
             [junit] New I/O client worker #317-1 14:51:49,538 INFO [RemotingConnectionImpl] packet = PACKET[type=20, channelID=1], exception= MessagingException[errorCode=105 message=Unable to validate user: john]]
             [junit] New I/O client worker #317-1 14:51:49,538 INFO [RemotingConnectionImpl] lock = java.util.concurrent.locks.ReentrantLock@12b71a3[Locked by thread main]
             [junit] main 14:51:49,538 INFO [ConnectionManagerImpl] ************************************************
             [junit] MessagingException[errorCode=105 message=Unable to validate user: john]
             [junit] at org.jboss.messaging.core.remoting.impl.wireformat.MessagingExceptionMessage.decodeBody(MessagingExceptionMessage.java:81)
             [junit] at org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.decode(PacketImpl.java:198)
             [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl.decode(RemotingConnectionImpl.java:836)
             [junit] at org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:482)
             [junit] at org.jboss.messaging.core.client.impl.ConnectionManagerImpl$DelegatingBufferHandler.bufferReceived(ConnectionManagerImpl.java:944)
             [junit] at org.jboss.messaging.integration.transports.netty.MessagingChannelHandler.messageReceived(MessagingChannelHandler.java:62)
             [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:804)
             [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:385)
             [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:279)
             [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:202)
             [junit] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:105)
             [junit] at org.jboss.netty.handler.codec.frame.FrameDecoder.handleUpstream(FrameDecoder.java:162)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:577)
             [junit] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:572)
             [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:342)
             [junit] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:329)
             [junit] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:302)
             [junit] at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:254)
             [junit] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:171)
             [junit] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:72)
             [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
             [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
             [junit] at java.lang.Thread.run(Thread.java:619)
            
            
            


            1 2 Previous Next