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

List:       tomcat-user
Subject:    Re: HTTP/2 connection broken (RST_STREAM) when multiple timeouts waiting for data from client
From:       Gonzalo Fernandez <fygonzalo () gmail ! com>
Date:       2022-11-18 16:48:37
Message-ID: CAF+tgZyF-aVKKjQbV4o3hzR+ACpFuxA-5Lpm71_zi-uROvVJng () mail ! gmail ! com
[Download RAW message or body]

>
>
>
> On 18/11/2022 10:21, Mark Thomas wrote:
> > On 17/11/2022 20:01, Gonzalo Fernandez wrote:
> >
> > <snip/>
> >
> >>> The problem happens when a client with an open TCP / HTTP2 connection
> >>> sends multiple incomplete streams, which seems to block the connection
> >>> forever and not be able to accept new streams.
> >>>
> >>> In detail, using tcpdump, we are seeing that the Tomcat Server
> >>> receives the HEADER frame, but never receives the following DATA
> >>> frames for a stream. After 20 seconds (streamReadTimeout default
> >>> value), the Tomcat Server throws a "client timeout" exception
> >>> (stacktrace at the end of the mail), and returns "400 Bad Request"
> >>> followed by a RST_STREAM frame.
> >>> The problem is that when the amount of incomplete streams surpasses
> >>> the value of "maxConcurrentStreams", the connection starts to return
> >>> RST_STREAM to any new stream indefinitely, it never recovers. I
> >>> verified this by changing the value of that property and looking at
> >>> the number of streams in every connection. When the value wasn't
> >>> defined, it took 100 incomplete streams over the same connection to
> >>> break it, then I changed to 20 and it took 20 incomplete streams to
> >>> break it.
> >>>
> >>> This makes me suspicious that the concurrent streams counter isn't
> >>> being decreased when this happens, and could possibly be a bug. I
> >>> tried to identify this in the tomcat codebase but I am not familiar
> >>> enough with it.
> >
> > Thanks for the very detailed description.
> >
> > Your suspicion is correct. There is a Tomcat bug here. I have been able
> > to write a test case that demonstrates the bug and am working on a fix.
> >
> > I just wanted to say how much the effort you put into researching this
> > is appreciated. Your report has exactly the right amount of detail we
> > need. Enough to see exactly what the problem is and to recreate the
> > problem and no unnecessary extra information.
> >
> > I should have a patch for this shortly.
>
> Fixed in:
> - 10.1.x for 10.1.3  onwards
> -  9.0.x for  9.0.70 onwards
> -  8.5.x for  8.5.85 onwards
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Thanks for the quick response. I appreciate your work.
Have a great day.

---------------------------------------------------------------------
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