Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-02 Thread Erik Nilsson
Perfect, glad to see a release after the vacation :)
Thanks again and happy vacationing.
/Erik

Den fre 2 juli 2021 kl 14:06 skrev Mark Thomas :

> On 02/07/2021 12:46, Erik Nilsson wrote:
> > Great!! With tomcat-9.0-20210701.191821-3270 in our environment it seems
> to
> > be stable without any RST_STREAMs.
>
> Excellent. Thanks for confirming the fix.
>
> > When will you release this version?
>
> Releases happen ~monthly. We aim for early in the month and typically
> have the release available some time in the second week.
>
> There is a set of releases in progress at the moment but they do not
> include these fixes. The next set of releases is scheduled for August.
> It isn't unusual for us to skip the August release as folks are often on
> holiday but given the severity of this issue, my current intention is to
> try and do an August release.
>
> Mark
>
>
> > /Erik
> >
> >
> > Den fre 2 juli 2021 kl 10:28 skrev Mark Thomas :
> >
> >> On 01/07/2021 08:57, Mark Thomas wrote:
> >>> On 01/07/2021 08:41, Erik Nilsson wrote:
>    protocol="org.apache.coyote.http11.Http11NioProtocol"
>   connectionTimeout="2" compression="on"
> >> useAsyncIO="false"
> 
> 
> >>
> compressibleMimeType="text/html,text/xml,text/css,text/javascript,text/plain,application/xml,application/javascript,application/json,image/svg+xml"
> >>
> 
>   SSLEnabled="true" scheme="https" secure="true"
>  URIEncoding="UTF-8" >
>     className="org.apache.coyote.http2.Http2Protocol" />
>  
> >>>
> >>> Tx.
> >>>
> >>> It looks like there are multiple issues going on here then - in
> >>> additional to the sendfile issue I already fixed. I'll fix the issue
> I'm
> >>> currently seeing and then try again to recreate the issue you are
> >>> seeing. I'll keep the thread updated with how I get on.
> >>
> >> I've found and fixed a couple of issues with the management of the
> >> connection flow control window. The fixes are consistent with the
> >> workarounds you described (reduce the size of the stream flow control
> >> window, reduce concurrent streams).
> >>
> >> The fixes are included in the latest snapshot from:
> >>
> >>
> >>
> https://repository.apache.org/content/groups/snapshots/org/apache/tomcat/tomcat/9.0-SNAPSHOT/
> >>
> >> (tomcat-9.0-20210701.191821-3270 or later)
> >>
> >> If you are able to test the snapshot in your dev environment, it would
> >> be very helpful to know if the issue has been resolved.
> >>
> >> Mark
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-02 Thread Mark Thomas

On 02/07/2021 12:46, Erik Nilsson wrote:

Great!! With tomcat-9.0-20210701.191821-3270 in our environment it seems to
be stable without any RST_STREAMs.


Excellent. Thanks for confirming the fix.


When will you release this version?


Releases happen ~monthly. We aim for early in the month and typically 
have the release available some time in the second week.


There is a set of releases in progress at the moment but they do not 
include these fixes. The next set of releases is scheduled for August. 
It isn't unusual for us to skip the August release as folks are often on 
holiday but given the severity of this issue, my current intention is to 
try and do an August release.


Mark



/Erik


Den fre 2 juli 2021 kl 10:28 skrev Mark Thomas :


On 01/07/2021 08:57, Mark Thomas wrote:

On 01/07/2021 08:41, Erik Nilsson wrote:


useAsyncIO="false"




compressibleMimeType="text/html,text/xml,text/css,text/javascript,text/plain,application/xml,application/javascript,application/json,image/svg+xml"



 SSLEnabled="true" scheme="https" secure="true"
URIEncoding="UTF-8" >
 



Tx.

It looks like there are multiple issues going on here then - in
additional to the sendfile issue I already fixed. I'll fix the issue I'm
currently seeing and then try again to recreate the issue you are
seeing. I'll keep the thread updated with how I get on.


I've found and fixed a couple of issues with the management of the
connection flow control window. The fixes are consistent with the
workarounds you described (reduce the size of the stream flow control
window, reduce concurrent streams).

The fixes are included in the latest snapshot from:


https://repository.apache.org/content/groups/snapshots/org/apache/tomcat/tomcat/9.0-SNAPSHOT/

(tomcat-9.0-20210701.191821-3270 or later)

If you are able to test the snapshot in your dev environment, it would
be very helpful to know if the issue has been resolved.

Mark

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







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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-02 Thread Erik Nilsson
Great!! With tomcat-9.0-20210701.191821-3270 in our environment it seems to
be stable without any RST_STREAMs.
When will you release this version?
/Erik


Den fre 2 juli 2021 kl 10:28 skrev Mark Thomas :

> On 01/07/2021 08:57, Mark Thomas wrote:
> > On 01/07/2021 08:41, Erik Nilsson wrote:
> >>  >> protocol="org.apache.coyote.http11.Http11NioProtocol"
> >> connectionTimeout="2" compression="on"
> useAsyncIO="false"
> >>
> >>
> compressibleMimeType="text/html,text/xml,text/css,text/javascript,text/plain,application/xml,application/javascript,application/json,image/svg+xml"
>
> >>
> >> SSLEnabled="true" scheme="https" secure="true"
> >> URIEncoding="UTF-8" >
> >>  >> className="org.apache.coyote.http2.Http2Protocol" />
> >> 
> >
> > Tx.
> >
> > It looks like there are multiple issues going on here then - in
> > additional to the sendfile issue I already fixed. I'll fix the issue I'm
> > currently seeing and then try again to recreate the issue you are
> > seeing. I'll keep the thread updated with how I get on.
>
> I've found and fixed a couple of issues with the management of the
> connection flow control window. The fixes are consistent with the
> workarounds you described (reduce the size of the stream flow control
> window, reduce concurrent streams).
>
> The fixes are included in the latest snapshot from:
>
>
> https://repository.apache.org/content/groups/snapshots/org/apache/tomcat/tomcat/9.0-SNAPSHOT/
>
> (tomcat-9.0-20210701.191821-3270 or later)
>
> If you are able to test the snapshot in your dev environment, it would
> be very helpful to know if the issue has been resolved.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-02 Thread Mark Thomas

On 01/07/2021 08:57, Mark Thomas wrote:

On 01/07/2021 08:41, Erik Nilsson wrote:
protocol="org.apache.coyote.http11.Http11NioProtocol"

    connectionTimeout="2" compression="on" useAsyncIO="false"

compressibleMimeType="text/html,text/xml,text/css,text/javascript,text/plain,application/xml,application/javascript,application/json,image/svg+xml" 

    SSLEnabled="true" scheme="https" secure="true" 
URIEncoding="UTF-8" >
    className="org.apache.coyote.http2.Http2Protocol" />




Tx.

It looks like there are multiple issues going on here then - in 
additional to the sendfile issue I already fixed. I'll fix the issue I'm 
currently seeing and then try again to recreate the issue you are 
seeing. I'll keep the thread updated with how I get on.


I've found and fixed a couple of issues with the management of the 
connection flow control window. The fixes are consistent with the 
workarounds you described (reduce the size of the stream flow control 
window, reduce concurrent streams).


The fixes are included in the latest snapshot from:

https://repository.apache.org/content/groups/snapshots/org/apache/tomcat/tomcat/9.0-SNAPSHOT/

(tomcat-9.0-20210701.191821-3270 or later)

If you are able to test the snapshot in your dev environment, it would 
be very helpful to know if the issue has been resolved.


Mark

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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-01 Thread Mark Thomas

On 01/07/2021 08:41, Erik Nilsson wrote:






Tx.

It looks like there are multiple issues going on here then - in 
additional to the sendfile issue I already fixed. I'll fix the issue I'm 
currently seeing and then try again to recreate the issue you are 
seeing. I'll keep the thread updated with how I get on.


Mark




Den tors 1 juli 2021 kl 09:32 skrev Mark Thomas :


On 01/07/2021 07:16, Erik Nilsson wrote:

Hmm I can still get the same exceptions even if I set useAsyncIO="false",
but with maxConcurrentStreamExecution="1" it's stable.


Can you provide your entire Connector configuration that includes
useAsyncIO="false" please?

Thanks,

Mark



/Erik

Den ons 30 juni 2021 kl 18:41 skrev Mark Thomas :


On 30/06/2021 16:49, Erik Nilsson wrote:

Perfect that u can reproduce this with another webapp. Thankful for

your

quick response. As I pointed out in the beginning of the conversation

we

also got this problem behind our f5 loadbalancer. But not with if we
connect to Tomcat directly without a loadbalancer.


Yes, this is a Tomcat bug. You should be able to work-around it with:

useAsyncIO="false" on the Connector.

I know where the problem is. I "just" need to figure out the fix.

Mark

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







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







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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-01 Thread Erik Nilsson

   



Den tors 1 juli 2021 kl 09:32 skrev Mark Thomas :

> On 01/07/2021 07:16, Erik Nilsson wrote:
> > Hmm I can still get the same exceptions even if I set useAsyncIO="false",
> > but with maxConcurrentStreamExecution="1" it's stable.
>
> Can you provide your entire Connector configuration that includes
> useAsyncIO="false" please?
>
> Thanks,
>
> Mark
>
>
> > /Erik
> >
> > Den ons 30 juni 2021 kl 18:41 skrev Mark Thomas :
> >
> >> On 30/06/2021 16:49, Erik Nilsson wrote:
> >>> Perfect that u can reproduce this with another webapp. Thankful for
> your
> >>> quick response. As I pointed out in the beginning of the conversation
> we
> >>> also got this problem behind our f5 loadbalancer. But not with if we
> >>> connect to Tomcat directly without a loadbalancer.
> >>
> >> Yes, this is a Tomcat bug. You should be able to work-around it with:
> >>
> >> useAsyncIO="false" on the Connector.
> >>
> >> I know where the problem is. I "just" need to figure out the fix.
> >>
> >> Mark
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-01 Thread Mark Thomas

On 01/07/2021 07:16, Erik Nilsson wrote:

Hmm I can still get the same exceptions even if I set useAsyncIO="false",
but with maxConcurrentStreamExecution="1" it's stable.


Can you provide your entire Connector configuration that includes 
useAsyncIO="false" please?


Thanks,

Mark



/Erik

Den ons 30 juni 2021 kl 18:41 skrev Mark Thomas :


On 30/06/2021 16:49, Erik Nilsson wrote:

Perfect that u can reproduce this with another webapp. Thankful for your
quick response. As I pointed out in the beginning of the conversation we
also got this problem behind our f5 loadbalancer. But not with if we
connect to Tomcat directly without a loadbalancer.


Yes, this is a Tomcat bug. You should be able to work-around it with:

useAsyncIO="false" on the Connector.

I know where the problem is. I "just" need to figure out the fix.

Mark

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







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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-07-01 Thread Erik Nilsson
Hmm I can still get the same exceptions even if I set useAsyncIO="false",
but with maxConcurrentStreamExecution="1" it's stable.
/Erik

Den ons 30 juni 2021 kl 18:41 skrev Mark Thomas :

> On 30/06/2021 16:49, Erik Nilsson wrote:
> > Perfect that u can reproduce this with another webapp. Thankful for your
> > quick response. As I pointed out in the beginning of the conversation we
> > also got this problem behind our f5 loadbalancer. But not with if we
> > connect to Tomcat directly without a loadbalancer.
>
> Yes, this is a Tomcat bug. You should be able to work-around it with:
>
> useAsyncIO="false" on the Connector.
>
> I know where the problem is. I "just" need to figure out the fix.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-30 Thread Mark Thomas

On 30/06/2021 16:49, Erik Nilsson wrote:

Perfect that u can reproduce this with another webapp. Thankful for your
quick response. As I pointed out in the beginning of the conversation we
also got this problem behind our f5 loadbalancer. But not with if we
connect to Tomcat directly without a loadbalancer.


Yes, this is a Tomcat bug. You should be able to work-around it with:

useAsyncIO="false" on the Connector.

I know where the problem is. I "just" need to figure out the fix.

Mark

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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-30 Thread Erik Nilsson
Perfect that u can reproduce this with another webapp. Thankful for your
quick response. As I pointed out in the beginning of the conversation we
also got this problem behind our f5 loadbalancer. But not with if we
connect to Tomcat directly without a loadbalancer.

/Erik

ons 30 juni 2021 kl. 17:31 skrev Mark Thomas :

> On 29/06/2021 09:43, Mark Thomas wrote:
> > On 29/06/2021 09:26, Erik Nilsson wrote:
> >> Sorry but there seems to be no difference in the behaviour..
> >> /Erik
> >
> > OK. Thanks for testing. I'm going to need those debug logs then to
> > figure out what is going on.
>
> Debug logs received off-list. Tx.
>
> I'm able to recreate this now. I have a simple html page with 9 embedded
> images, each 1.5MB in size. A request to that page using:
>
> nghttp -vnsay https://localhost/test/index.html
>
> retrieves the page but then hangs on the images. The logs indicate there
> is an issue with the connection's flow control window.
>
> I need to look at things more closely to figure out if the bug is with
> Tomcat (seems more likely) or with nghttp.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-30 Thread Mark Thomas

On 29/06/2021 09:43, Mark Thomas wrote:

On 29/06/2021 09:26, Erik Nilsson wrote:

Sorry but there seems to be no difference in the behaviour..
/Erik


OK. Thanks for testing. I'm going to need those debug logs then to 
figure out what is going on.


Debug logs received off-list. Tx.

I'm able to recreate this now. I have a simple html page with 9 embedded 
images, each 1.5MB in size. A request to that page using:


nghttp -vnsay https://localhost/test/index.html

retrieves the page but then hangs on the images. The logs indicate there 
is an issue with the connection's flow control window.


I need to look at things more closely to figure out if the bug is with 
Tomcat (seems more likely) or with nghttp.


Mark

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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-29 Thread Mark Thomas

On 29/06/2021 09:26, Erik Nilsson wrote:

Sorry but there seems to be no difference in the behaviour..
/Erik


OK. Thanks for testing. I'm going to need those debug logs then to 
figure out what is going on.


Mark




Den mån 28 juni 2021 kl 20:44 skrev Mark Thomas :


On 28/06/2021 15:11, Mark Thomas wrote:

On 28/06/2021 10:53, Erik Nilsson wrote:

Yep, something seems to go wrong with the waitingFor field in
WindowAllocationManager.

We are developing a quite complex embedded cms application, don't know
if I
will be able to share this application. Hopefully you can reproduce this
anyway by using the nghttp client and another large webapp? One thing to
notice is that we can't reproduce this by accessing the
webapplication directly with any browser, but with a f5-proxy in
production
and nghttp it occurs almost every time.


I'll see what I can do to reproduce this.

Any chance you could run Tomcat with http2 debug logging enabled,
trigger the issue and then post the debug logs (or send them to me
privately if you prefer?).


I've found a bug in the sendfile handling. Can you add
useSendfile="false" to the associated  element and see
if that works around the issue.

Thanks,

Mark

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







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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-29 Thread Erik Nilsson
Sorry but there seems to be no difference in the behaviour..
/Erik

Den mån 28 juni 2021 kl 20:44 skrev Mark Thomas :

> On 28/06/2021 15:11, Mark Thomas wrote:
> > On 28/06/2021 10:53, Erik Nilsson wrote:
> >> Yep, something seems to go wrong with the waitingFor field in
> >> WindowAllocationManager.
> >>
> >> We are developing a quite complex embedded cms application, don't know
> >> if I
> >> will be able to share this application. Hopefully you can reproduce this
> >> anyway by using the nghttp client and another large webapp? One thing to
> >> notice is that we can't reproduce this by accessing the
> >> webapplication directly with any browser, but with a f5-proxy in
> >> production
> >> and nghttp it occurs almost every time.
> >
> > I'll see what I can do to reproduce this.
> >
> > Any chance you could run Tomcat with http2 debug logging enabled,
> > trigger the issue and then post the debug logs (or send them to me
> > privately if you prefer?).
>
> I've found a bug in the sendfile handling. Can you add
> useSendfile="false" to the associated  element and see
> if that works around the issue.
>
> Thanks,
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-28 Thread Mark Thomas

On 28/06/2021 15:11, Mark Thomas wrote:

On 28/06/2021 10:53, Erik Nilsson wrote:

Yep, something seems to go wrong with the waitingFor field in
WindowAllocationManager.

We are developing a quite complex embedded cms application, don't know 
if I

will be able to share this application. Hopefully you can reproduce this
anyway by using the nghttp client and another large webapp? One thing to
notice is that we can't reproduce this by accessing the
webapplication directly with any browser, but with a f5-proxy in 
production

and nghttp it occurs almost every time.


I'll see what I can do to reproduce this.

Any chance you could run Tomcat with http2 debug logging enabled, 
trigger the issue and then post the debug logs (or send them to me 
privately if you prefer?).


I've found a bug in the sendfile handling. Can you add 
useSendfile="false" to the associated  element and see 
if that works around the issue.


Thanks,

Mark

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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-28 Thread Mark Thomas

On 28/06/2021 10:53, Erik Nilsson wrote:

Yep, something seems to go wrong with the waitingFor field in
WindowAllocationManager.

We are developing a quite complex embedded cms application, don't know if I
will be able to share this application. Hopefully you can reproduce this
anyway by using the nghttp client and another large webapp? One thing to
notice is that we can't reproduce this by accessing the
webapplication directly with any browser, but with a f5-proxy in production
and nghttp it occurs almost every time.


I'll see what I can do to reproduce this.

Any chance you could run Tomcat with http2 debug logging enabled, 
trigger the issue and then post the debug logs (or send them to me 
privately if you prefer?).


Mark

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



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-28 Thread Erik Nilsson
Yep, something seems to go wrong with the waitingFor field in
WindowAllocationManager.

We are developing a quite complex embedded cms application, don't know if I
will be able to share this application. Hopefully you can reproduce this
anyway by using the nghttp client and another large webapp? One thing to
notice is that we can't reproduce this by accessing the
webapplication directly with any browser, but with a f5-proxy in production
and nghttp it occurs almost every time.

/Erik

Den mån 28 juni 2021 kl 10:52 skrev Mark Thomas :

> On 27/06/2021 12:05, Erik Nilsson wrote:
> > We might have found an issue with the window size in http2 in Tomcat
> 9.0.45.
>
> Thanks for the heads up.
>
> 9.0.45 has fixes for all the known issues with window size management so
> this looks like a potential new bug.
>
> > java.lang.IllegalStateException: Connection [483], Stream [21], Already
> waiting
> >  at
> org.apache.coyote.http2.WindowAllocationManager.waitFor(WindowAllocationManager.java:143)
> >  at
> org.apache.coyote.http2.WindowAllocationManager.waitForConnection(WindowAllocationManager.java:84)
> >  at
> org.apache.coyote.http2.Stream.waitForConnectionAllocation(Stream.java:257)
> >  at
> org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:903)
> >  at
> org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:904)
> >  at
> org.apache.coyote.http2.Stream$StreamOutputBuffer.doWrite(Stream.java:823)
> >  at
> org.apache.coyote.http2.Http2OutputBuffer.doWrite(Http2OutputBuffer.java:59)
> >  at org.apache.coyote.Response.doWrite(Response.java:606)
> >  at
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:340)
> >  at
> org.apache.catalina.connector.OutputBuffer.appendByteArray(OutputBuffer.java:753)
> >  at
> org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:682)
> >  at
> org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:388)
> >  at
> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:366)
> >  at
> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96)
> >  at
> org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
> >
> >
> > This problem occurs when we are using the nghttp client to receive
> > data from our root page (nghttp -vnsay https://localhost). By
> > decreasing the initial window size to 8 kb in nghttp (flag -w 13), the
> > problem disappears. Another solution is to set the http2-connector
> > attribute maxConcurrentStreamExecution="1".
>
> Hmm. That suggests some sort of concurrency issue.
>
> How easy is this to reproduce? I'll see if I can reproduce this locally
> but it may well depend on the structure of the page you are testing with.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



Re: Possible bug in http2 window size handling in tomcat 9.0.45

2021-06-28 Thread Mark Thomas

On 27/06/2021 12:05, Erik Nilsson wrote:

We might have found an issue with the window size in http2 in Tomcat 9.0.45.


Thanks for the heads up.

9.0.45 has fixes for all the known issues with window size management so 
this looks like a potential new bug.



java.lang.IllegalStateException: Connection [483], Stream [21], Already waiting
 at 
org.apache.coyote.http2.WindowAllocationManager.waitFor(WindowAllocationManager.java:143)
 at 
org.apache.coyote.http2.WindowAllocationManager.waitForConnection(WindowAllocationManager.java:84)
 at 
org.apache.coyote.http2.Stream.waitForConnectionAllocation(Stream.java:257)
 at 
org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:903)
 at 
org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:904)
 at 
org.apache.coyote.http2.Stream$StreamOutputBuffer.doWrite(Stream.java:823)
 at 
org.apache.coyote.http2.Http2OutputBuffer.doWrite(Http2OutputBuffer.java:59)
 at org.apache.coyote.Response.doWrite(Response.java:606)
 at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:340)
 at 
org.apache.catalina.connector.OutputBuffer.appendByteArray(OutputBuffer.java:753)
 at 
org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:682)
 at 
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:388)
 at 
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:366)
 at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96)
 at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)


This problem occurs when we are using the nghttp client to receive
data from our root page (nghttp -vnsay https://localhost). By
decreasing the initial window size to 8 kb in nghttp (flag -w 13), the
problem disappears. Another solution is to set the http2-connector
attribute maxConcurrentStreamExecution="1".


Hmm. That suggests some sort of concurrency issue.

How easy is this to reproduce? I'll see if I can reproduce this locally 
but it may well depend on the structure of the page you are testing with.


Mark

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