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 C72EACF22 for ; Mon, 3 Jun 2013 09:10:16 +0000 (UTC) Received: (qmail 93488 invoked by uid 500); 3 Jun 2013 09:10:15 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 93321 invoked by uid 500); 3 Jun 2013 09:10:15 -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 93312 invoked by uid 99); 3 Jun 2013 09:10:14 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 09:10:14 +0000 Received: from localhost (HELO [192.168.23.9]) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 09:10:14 +0000 Message-ID: <51AC5D72.3080405@apache.org> Date: Mon, 03 Jun 2013 10:10:10 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: APR/native errors with non-blocking I/O References: <51A8EE07.3000105@apache.org> <99C8B2929B39C24493377AC7A121E21FC4B0DB5B04@USEA-EXCH8.na.uis.unisys.com> <0348c161-7715-4a02-a98a-a176ca51b8d6@email.android.com> In-Reply-To: <0348c161-7715-4a02-a98a-a176ca51b8d6@email.android.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 31/05/2013 20:34, Mark Thomas wrote: > The other end does hang up but it wasn't clear if that was the root > cause or the result. The client reports invalid chunked encoding. > I'll look into the client code. I made some progress with this over the weekend. I'm still not sure where the problem is but I have a clearer idea of what is happening. I've modified the test to send a sequence of "0123456789ABCDEF0123..." rather than "XXX..." so it is easier to spot when / if the data is corrupted. I've also switched the client to a simple socket based client so I can examine the bytes directly. What this shows is that towards the end of the 5MB, the client receives a chunk that is long than it should be and the chunk shows corruption in that the expected sequence is broken. The total bytes the server thinks it sent (including headers, chunking overhead etc.) does not agree with the total bytes received by the client. My next step is to look more closely at the server code (the issue is sensitive to timing so it can be tricky to add debug code and still see the issue) to figure out if I am misusing the API or if there might be an APR/native bug at the root of this. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org