[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763727#action_12763727
 ] 

Mahadev konar commented on ZOOKEEPER-547:
-----------------------------------------

stack trace with such rogue packets:

{code}
2009-10-08 19:47:35,063 - WARN  [NIOServerCxn.Factory:2281:nioserverc...@494] - 
Exception causing close of session 0x0 due to java.io.IOException: Len error 
-720899
2009-10-08 19:47:35,064 - INFO  [NIOServerCxn.Factory:2281:nioserverc...@833] - 
closing session:0x0 NIOServerCnxn: java.nio.channels.SocketChannel[connected 
local=/***********:2281 remote=/*******:33530]
2009-10-08 19:47:41,961 - ERROR 
[FollowerHandler-/*************:38326:followerhand...@415] - Unexpected 
exception causing shutdown while sock still open
java.io.IOException: Unreasonable length = -195059
        at 
org.apache.jute.BinaryInputArchive.readBuffer(BinaryInputArchive.java:100)
        at 
org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:68)
        at 
org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:108)
        at 
org.apache.zookeeper.server.quorum.FollowerHandler.run(FollowerHandler.java:215)
2009-10-08 19:47:41,962 - WARN  
[FollowerHandler-/***********:38326:followerhand...@421] - ******* GOODBYE 
/***********:38326 ********
2009-10-08 19:49:19,409 - WARN  [Thread-6:quorumcnxmanager$sendwor...@539] - 
Interrupted while waiting for message on queue
java.lang.InterruptedException
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1899)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1934)
        at 
java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:317)
        at 
org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:533)
2009-10-08 19:49:19,410 - WARN  [Thread-6:quorumcnxmanager$sendwor...@554] - 
Send worker leaving thread
2009-10-08 19:49:19,418 - WARN  [Thread-7:quorumcnxmanager$recvwor...@621] - 
Connection broken: 
java.nio.channels.AsynchronousCloseException
        at 
java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:185)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:263)
        at 
org.apache.zookeeper.server.quorum.QuorumCnxManager$RecvWorker.run(QuorumCnxManager.java:609)
Exception in thread "Thread-9" java.lang.OutOfMemoryError: Java heap 
space
        at 
org.apache.zookeeper.server.quorum.QuorumCnxManager$RecvWorker.run(QuorumCnxManager.java:605)
{code}

> Sanity check in QuorumCnxn Manager and quorum communication port.
> -----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-547
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-547
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: leaderElection, server
>    Affects Versions: 3.2.0, 3.2.1
>            Reporter: Mahadev konar
>            Assignee: Mahadev konar
>             Fix For: 3.3.0
>
>
> We need to put some sanity checks in QuorumCnxnManager and the other quorum 
> port for rogue clients. Sometimes a clients might get misconfigured and they 
> might send random characters on such ports. We need to make sure that such 
> rogue clients do not bring down the clients and need to put in some sanity 
> checks with respect to packet lengths and deserialization.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to