You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/05/16 10:07:52 UTC
[Bug 66602] New: TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
Bug ID: 66602
Summary: TCP abnormal shutdown during pressure testing based on
HTTP2 (h2c)
Product: Tomcat 9
Version: 9.0.75
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Connectors
Assignee: dev@tomcat.apache.org
Reporter: 517893673@qq.com
Target Milestone: -----
Created attachment 38559
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38559&action=edit
normal request log comparison
**Perform a simple GET request pressure test on the HTTP2 (h2c) service, and
the TCP link will shutdown abnormally.**
1.By simulating 50 concurrent requests with 500 each, perform pressure testing
and packet capture on a simple GET request.
2.The process found that the TCP link would be disconnected.
3.The reason is that tomcat sent a WINDOW_UPDATE Frame with window size value
is zero.
call Http2UpgradeHandler.endRequestBodyFrame method the dataLength is zero? Is
this reasonable?
Http2UpgradeHandler:
public void endRequestBodyFrame(int streamId, int dataLength) throws
Http2Exception, IOException {
AbstractNonZeroStream abstractNonZeroStream =
getAbstractNonZeroStream(streamId, true);
if (abstractNonZeroStream instanceof Stream) {
((Stream)
abstractNonZeroStream).getInputBuffer().onDataAvailable();
} else {
// The Stream was recycled between the call in Http2Parser to
// startRequestBodyFrame() and the synchronized block that contains
// the call to this method. This means the bytes read will have
been
// written to the original stream and, effectively, swallowed.
// Therefore, need to notify that those bytes were swallowed here.
onSwallowedDataFramePayload(streamId, dataLength);
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
Han Li <li...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Han Li <li...@apache.org> ---
Thanks for the report and PR.
Fixed in:
- 11.0.x for 11.0.0-M7 onwards
- 10.1.x for 10.1.10 onwards
- 9.0.x for 9.0.76 onwards
- 8.5.x for 8.5.90 onwards
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
--- Comment #2 from ledefe <51...@qq.com> ---
Didn't anyone reply?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
--- Comment #4 from Mark Thomas <ma...@apache.org> ---
As per RFC 9113, section 6.9 it is not legal to send a WINDOW_UPDATE frame of
length zero.
I've had a quick look at the code it should be a simple fix to skip sending the
WINDOW_UPDATE frame if the increment is zero.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
--- Comment #6 from ledefe <51...@qq.com> ---
A PR has been submitted based on the 9.0.x branch
PR: https://github.com/apache/tomcat/pull/619
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
--- Comment #1 from ledefe <51...@qq.com> ---
Comment on attachment 38559
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38559
normal request log comparison
The overall process is as follows:
1. http-nio-9988-exec-4 thread: Read data from the stream. After reading the
header frame, asynchronously start the request distribution processing for data
(http-nio-9988-exec-13) and continue reading the data frame data.
2. http-nio-9988-exec-13 thread: Process data requests. If the request is
completed, the status changes to CLOSE and replaces the current stream with the
recycling stream(RecycledStream)
3. http-nio-9988-exec-4 thread: Process data frame data. If it is processed,
execute endRequestBodyFrame. is RecycledStream will send WINDOW_UPDATE notify.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
--- Comment #5 from Mark Thomas <ma...@apache.org> ---
Could you be tempted into submitting a patch or PR for this? (Don't forget the
change log.)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
If you want a guaranteed SLA, you'll have to pay for it.
I can't speak for the other committers but I have been preparing for a
conference this week. I was planning on looking at this next week unless
someone else gets there first.
This will get looked at (and fixed if necessary) between now and the June
releases.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66602] TCP abnormal shutdown during pressure testing based on HTTP2 (h2c)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
ledefe <51...@qq.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
Priority|P2 |P1
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org