[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: Malformed chunked stream
From:       Dave Thorn <davet () fysh ! org ! INVALID>
Date:       2019-08-31 7:31:12
Message-ID: 20190831073112.3ptr7twxt7ve4uto () fysh ! org
[Download RAW message or body]

On Sat, Aug 31, 2019 at 05:13:06AM +0000, Mark Thomas wrote:
> On August 30, 2019 8:34:02 PM UTC, Dave Thorn <davet@fysh.org.INVALID> wrote:
> > 
> > That looks, to me, like the stream is missing the [\r][\n] between the
> > B50 chunk and the 3FC0 count.
> > 
> > I'm not clear on where the responsibilities lie in producing that
> > chunked output - Spring in my webapp, or Tomcat as my container?

> I'd also recommend repeating your test with Wireshark to confirm
> that the server doesn't send it and that you aren't seeing a client
> side bug.

Thanks.  The only problem with that is the intermittency of the
problem.  The server processes a hundred thousand requests a day, or
so, and the problem only occurs a scant handful of times in that.
I'll talk to our admin and see how feasible it is to do that and still
be able to process the results.

There is also a haproxy between client and server.  You wouldn't think
it goes fiddling around in the middle of a response, thought.  I'm
running some tests today that go straight to the server, skipping the
proxy, but again with the intermittency...

> I took a quick look at Tomcat's ChunkedOutputFilter and I don't see
> any obvious way the \r\n could be skipped but a strange edge case
> isn't impossible.

Looking at my access log file for yesterday, the test scenario made
5375 requests, and if I look for those in the log, they all have the
same response size:

# cat /opt/apache-tomcat-8.5.8/logs/localhost_access_log.2019-08-30.txt | grep \
'various-identifiers' | awk '{print $10}' | sort | uniq -c  5375 970304

Could that suggest that Tomcat responded with the same response every
time?  If it dropped a "[\r][\n]" then that response size should be
different, shouldn't it?  Although I suppose if it could be being
corrupted by a bug then it might be possible that the response size is
calculated in a way that isn't affected by that hypothetical bug?

-- 
dave thorn

DBT; GBP.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic