[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Junqueira reopened ZOOKEEPER-1179:
-----------------------------------------


It looks like this patch didn't completely solve the problem. I was checking 
the output of the last ZooKeeper-3.4-WinVS2008_java build, and I found the 
following in the output of testFourLetterWords:

{noformat}
[junit] 2013-12-29 20:21:43,920 [myid:] - WARN  [New I/O worker 
#258:NettyServerCnxnFactory$CnxnChannelHandler@111] - Exception caught [id: 
0x6e402644, /127.0.0.1:51003 => /127.0.0.1:11271] EXCEPTION: 
java.io.IOException: A non-blocking socket operation could not be completed 
immediately
    [junit] java.io.IOException: A non-blocking socket operation could not be 
completed immediately
    [junit]     at sun.nio.ch.SocketDispatcher.close0(Native Method)
    [junit]     at 
sun.nio.ch.SocketDispatcher.preClose(SocketDispatcher.java:62)
    [junit]     at 
sun.nio.ch.SocketChannelImpl.implCloseSelectableChannel(SocketChannelImpl.java:819)
    [junit]     at 
java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:228)
    [junit]     at 
java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
    [junit]     at 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:354)
    [junit]     at 
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:81)
    [junit]     at 
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:36)
    [junit]     at org.jboss.netty.channel.Channels.close(Channels.java:812)
    [junit]     at 
org.jboss.netty.channel.AbstractChannel.close(AbstractChannel.java:197)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxn.close(NettyServerCnxn.java:114)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxn.cleanupWriterSocket(NettyServerCnxn.java:242)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxn.access$000(NettyServerCnxn.java:57)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxn$CommandThread.run(NettyServerCnxn.java:315)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxn$CommandThread.start(NettyServerCnxn.java:306)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxn.checkFourLetterWord(NettyServerCnxn.java:658)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxn.receiveMessage(NettyServerCnxn.java:791)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.processMessage(NettyServerCnxnFactory.java:211)
    [junit]     at 
org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.messageReceived(NettyServerCnxnFactory.java:135)
    [junit]     at 
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    [junit]     at 
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    [junit]     at 
org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
    [junit]     at 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
    [junit]     at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
    [junit]     at 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
    [junit]     at 
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
    [junit]     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    [junit]     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    [junit]     at java.lang.Thread.run(Thread.java:722)
{noformat}

> NettyServerCnxn does not properly close socket on 4 letter word requests
> ------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1179
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1179
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.0
>            Reporter: Camille Fournier
>            Assignee: Rakesh R
>            Priority: Critical
>             Fix For: 3.4.6, 3.5.0
>
>         Attachments: ZOOKEEPER-1179.patch, ZOOKEEPER-1179.patch, 
> ZOOKEEPER-1179.patch
>
>
> When calling a 4-letter-word to a server configured to use 
> NettyServerCnxnFactory, the factory will not properly cancel all the keys and 
> close the socket after sending the response for the 4lw. The close request 
> will throw this exception, and the thread will not shut down:
> 2011-09-13 12:14:17,546 - WARN  [New I/O server worker 
> #1-1:NettyServerCnxnFactory$CnxnChannelHandler@117] - Exception caught [id: 
> 0x009300cc, /1.1.1.1:38542 => /139.172.114.138:2181] EXCEPTION: 
> java.io.IOException: A non-blocking socket operation could not be completed 
> immediately
> java.io.IOException: A non-blocking socket operation could not be completed 
> immediately
>       at sun.nio.ch.SocketDispatcher.close0(Native Method)
>       at sun.nio.ch.SocketDispatcher.preClose(SocketDispatcher.java:44)
>       at 
> sun.nio.ch.SocketChannelImpl.implCloseSelectableChannel(SocketChannelImpl.java:684)
>       at 
> java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:201)
>       at 
> java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:97)
>       at 
> org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:593)
>       at 
> org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:119)
>       at 
> org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:76)
>       at org.jboss.netty.channel.Channels.close(Channels.java:720)
>       at 
> org.jboss.netty.channel.AbstractChannel.close(AbstractChannel.java:208)
>       at 
> org.apache.zookeeper.server.NettyServerCnxn.close(NettyServerCnxn.java:116)
>       at 
> org.apache.zookeeper.server.NettyServerCnxn.cleanupWriterSocket(NettyServerCnxn.java:241)
>       at 
> org.apache.zookeeper.server.NettyServerCnxn.access$0(NettyServerCnxn.java:231)
>       at 
> org.apache.zookeeper.server.NettyServerCnxn$CommandThread.run(NettyServerCnxn.java:314)
>       at 
> org.apache.zookeeper.server.NettyServerCnxn$CommandThread.start(NettyServerCnxn.java:305)
>       at 
> org.apache.zookeeper.server.NettyServerCnxn.checkFourLetterWord(NettyServerCnxn.java:674)
>       at 
> org.apache.zookeeper.server.NettyServerCnxn.receiveMessage(NettyServerCnxn.java:791)
>       at 
> org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.processMessage(NettyServerCnxnFactory.java:217)
>       at 
> org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.messageReceived(NettyServerCnxnFactory.java:141)
>       at 
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
>       at 
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
>       at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:350)
>       at 
> org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281)
>       at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201)
>       at 
> org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
>       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:619)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to