On 29/01/2011 18:48, Konstantin Kolinko wrote:
> Hi!
> 
> In r1063366 [1] there was a check added to Nttp11NioProtocol class that
> now causes 3 of 5 tests in TestFormAuthenticator to fail with Nio connector.

That'll be my fault. I'll revisit that patch.

Mark

> I do not know whether you will be able to reproduce them. It somehow depends
> on timing: I am not able to reproduce it when debugging, and out
> buildbot [2] is green:
> 
> Anyway, it fails for me reliably when running without debugger.
> 
> From TestFormAuthenticator  the following three tests are failing:
> testGet
> testPostNoContinue
> testPostWithContinue
> 
> The following two tests run successfully:
> testPostNoContinuePostRedirect
> testPostWithContinuePostRedirect
> 
> The failure happens when the first read in InternalNioInputBuffer
> returns headers with a single CRLF following them. The test sends the
> second CRLF with some delay.
> 
> I wonder why it is not reproducible on the build bot. Different OS? I
> am running with WinXP SP3.
> 
> To reproduce:
> 1. Add the following into build.properties:
> execute.test.bio=false
> execute.test.nio=true
> test.entry=org.apache.catalina.authenticator.TestFormAuthenticator
> 2. Add the following to logging.properties:
> org.apache.coyote.level = FINE
> 3. Run "ant test"
> 
> The following is in
> logs/TEST-org.apache.catalina.authenticator.TestFormAuthenticator.NIO.txt
> (...)
> 29.01.2011 21:13:46 org.apache.coyote.AbstractProtocolHandler start
> INFO: Starting ProtocolHandler ["http-nio-8001"]
> 29.01.2011 21:13:46
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler
> register
> FINE: Register [org.apache.coyote.http11.Http11NioProcessor@c09554] count=1
> 29.01.2011 21:13:46 org.apache.coyote.http11.InternalNioInputBuffer
> parseRequestLine
> FINE: Received [GET /examples/jsp/security/protected/index.jsp HTTP/1.1
> Host: localhost
> Connection: close
> ]
> 29.01.2011 21:13:46
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler
> process
> FINE: IOException reading request
> java.io.IOException: Error processing request. Socket is in the long
> poll state but neither Servlet 3.0+ async or Comet is being used
>       at 
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:379)
>       at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1569)
>       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:662)
> 
> 
> If I remove the check added in r1063366, the test runs successfully:
> 
> Index: java/org/apache/coyote/http11/Http11NioProtocol.java
> ===================================================================
> --- java/org/apache/coyote/http11/Http11NioProtocol.java      (revision 
> 1065026)
> +++ java/org/apache/coyote/http11/Http11NioProtocol.java      (working copy)
> @@ -374,10 +374,7 @@
>                          // complete or dispatch)
>                          state = processor.asyncPostProcess();
>                      } else {
> -                        // Error condition. A connection in this state should
> -                        // by using one of async or comet
> -                        throw new IOException(sm.getString(
> -                                "http11protocol.state.long.error"));
> +                        socket.getPoller().add(socket);
>                      }
>                  }
>                  if (state == SocketState.LONG || state ==
> SocketState.ASYNC_END) {
> 
> 
> [1] http://svn.apache.org/viewvc?view=revision&revision=1063366
> [2] http://ci.apache.org/builders/tserver-trunk
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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

Reply via email to