[Bug 64467] New: Http2 tomact server taking time in responding when 1st StreamId is a large integer value like 2147483641

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 64467] New: Http2 tomact server taking time in responding when 1st StreamId is a large integer value like 2147483641

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64467

            Bug ID: 64467
           Summary: Http2 tomact server taking time in responding when 1st
                    StreamId is a large integer value like 2147483641
           Product: Tomcat 9
           Version: 9.0.29
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: -----

Java version - jdk1.8.0_201

We are running a Tomcat Http2 Server and a Jetty http2 client.

When we send the 1st request from jetty client to tomcat server with streamId
as 2147483641, the 1st response from tomcat comes after almost 5 seconds.

After further debugging we got to know that the problem seems to be because of
the below code in Http2UpgradeHandler class:

private void closeIdleStreams(int newMaxActiveRemoteStreamId) throws
Http2Exception
{
         for (int i = maxActiveRemoteStreamId + 2; i <
                                newMaxActiveRemoteStreamId; i += 2)
            {

             Stream stream = getStream(i, false);
             if (stream != null) {
                 stream.closeIfIdle();
             }
         }
         maxActiveRemoteStreamId = newMaxActiveRemoteStreamId;
     }

When we take 1st StreamId as 2147483641, the above loop takes around 4~5
seconds to execute and hence, the response is delayed.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64467] Http2 tomact server taking time in responding when 1st StreamId is a large integer value like 2147483641

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64467

Mark Thomas <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 OS|                            |All

--- Comment #1 from Mark Thomas <[hidden email]> ---
Thanks for the report and the research into the root cause.

Fixed in:
- master for 10.0.0-M6 onwards
- 9.0.x for 9.0.36 onwards
- 8.5.x for 8.5.56 onwards

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]