Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7BCD9668E for ; Sun, 10 Jul 2011 11:20:33 +0000 (UTC) Received: (qmail 47487 invoked by uid 500); 10 Jul 2011 11:20:32 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 47061 invoked by uid 500); 10 Jul 2011 11:20:29 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 46645 invoked by uid 99); 10 Jul 2011 11:20:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jul 2011 11:20:27 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rainer.jung@kippdata.de designates 195.227.30.149 as permitted sender) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jul 2011 11:20:20 +0000 Received: from [192.168.2.101] ([192.168.2.101]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id p6ABJvDr001193 for ; Sun, 10 Jul 2011 13:19:58 +0200 (CEST) Message-ID: <4E198ADD.1040109@kippdata.de> Date: Sun, 10 Jul 2011 13:19:57 +0200 From: Rainer Jung User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: Sporadic failures in TestCometProcessor References: <4E1970B1.9050201@kippdata.de> <4E197B44.3060200@apache.org> In-Reply-To: <4E197B44.3060200@apache.org> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit On 10.07.2011 12:13, Mark Thomas wrote: > On 10/07/2011 10:28, Rainer Jung wrote: >> I get sporadic failures in TestCometProcessor for NIO. They are due to >> the Servlet reading two or more of the PING tokens during a single read >> event call. The loop >> >> while (is.available() > 0) { >> is.read(); >> count ++; >> } >> >> then e.g. consumes PINGPING instead of PING and writes back "READ: 8 bytes". >> >> Is this an error in the test case, e.g. if the chunks come in quickly >> enough is it OK, that they might get combined into a single read event? >> If so, we might want to add a little sleep in between sending the PING >> lines. > > There is already a 1000ms sleep between sending the PINGs. That should > be enough to keep them separate. Sorry I was so convinced it's a timing issue, that I didn't check that. > Have you always seen these since that test was introduced or is this > something new? I added the test to 7.0.16 and ran it there and again it fails with the same symptom every now and then. > As an aside, I have noticed that running the unit tests on a heavily > loaded box can trigger various timing related failures. The system is mainly idle. It has two CPUs, so it should be able to handle the sending and the servlet in parallel. *Important*: One more observation, that always happens: the test doesn't write anything to the access log. None of the two public log messages of the AccessLogValve are called. I thought you added access log messages for comet and async not to far in the past, but I might be wrong about comet. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org