On 11/05/2014 07:37, Rémy Maucherat wrote:
> 2014-05-08 16:55 GMT+02:00 <ma...@apache.org>:
> 
>> Author: markt
>> Date: Thu May  8 14:55:08 2014
>> New Revision: 1593303
>>
>> URL: http://svn.apache.org/r1593303
>> Log:
>> Fix test failure with NIO2 where additional, unexpected access log entry
>> was being created during connector shutdown.
>>
> I didn't run into any problem with the testsuite, and I don't see a direct
> relation with the connector shutdown, can you give me the trace and details
> ? Maybe that catch is the best place to do it, but I'd like to be sure.

My understanding was that the ReadPendingException was thrown because
the kept alive connection was trying to read from an open client
connection when the connector was shut down.

This triggered a 400 entry in the access log since it was treated as a
failed request.

This is the exception that triggers it:
java.nio.channels.ReadPendingException
        at
sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:250)
        at
sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:296)
        at org.apache.tomcat.util.net.Nio2Channel.read(Nio2Channel.java:145)
        at
org.apache.coyote.http11.InternalNio2InputBuffer.fill(InternalNio2InputBuffer.java:271)
        at
org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:190)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:925)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
        at
org.apache.coyote.http11.Http11Nio2Protocol$Http11ConnectionHandler.process(Http11Nio2Protocol.java:175)
        at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1132)
        at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1091)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:744)

In terms of whether there is a better place, I didn't look lower down
the stack. We probably only want to swallow this if we haven't read any
part of the request line.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to