-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sometimes max_queued_control_frames
does not send a warning to dmesg
#2126
Comments
@RomanBelozerov @krizhanovsky @const-t The test script tries to fill rcvbuf by requesting a large file, but note that control frame acknowledgments and response chunks are interleaved in the downstream flow, so the control frame acks may be mostly transferred to the client before the response chunk transmission, that is, before sockbuf is full, so the blocking requirement of the test case may become false. Example:
You can see that just before sockbuf is full, the ping acks are mostly transmitted, so the limit is not triggered. Check the attachment for package captures for what happens in detail: don't forget to configure the wrieshark the pre-master-secret-log-file: |
@RomanBelozerov @krizhanovsky @const-t self.assertTrue(
self.oops.find(
"Warning: Too many control frames in send queue, closing connection",
cond=lambda matches: len(matches) >= 0,
),
"An unexpected number of dmesg warnings",
) |
@kingluo The main problem in these tests - deproxy thread does not have time to open connection and the main thread calls the Also we have the problem with warning. You should add I close issue because the problem was in tests and I fixed it. |
Sorry, I'm afraid this doesn't solve the problem. As I mentioned above, response chunks for large responses are interleaved with control frame ACKs, so you cannot guarantee that enough chunks will be delivered before the control frame ACK to fill the deproxy client's sockbuf and ensure that the latter will block due to the TCP window becoming 0.
Please look at my example above (the tcpdump file and log file) for a visual example of my clarification. So, the correct approach is to use |
Ok. I saw the tcpdump file and log file. But they is not correct because as I mentioned above, the tests did not work correctly. Please add |
I reworked the tests using
In this case we check that |
TempestaFW - 302ea8c from PR #2108
The
max_queued_control_frames
directive works correctly and client receive a connection block when it breaks the rule.But sometimes
Warning: Too many control frames in send queue, closing connection
warning may not be output to the dmesgVM does not have limit for
net_ratelimit
and I didn't see any message suppressionI just receive 1 warning for these tests
but expected
Testing
http2_general.test_max_queued_control_frames.TestH2ControlFramesFlood.test_reset_stream_10_limit
,http2_general.test_max_queued_control_frames.TestH2ControlFramesFlood.test_ping
,http2_general.test_max_queued_control_frames.TestH2ControlFramesFlood.test_settings
,there is 1 more test in this directory -
http2_general.test_max_queued_control_frames.TestH2ControlFramesFlood.test_reset_stream_default
, bit it does not reproduce this problem.Please change expected number of warning in tests from
cond=lambda matches: len(matches) >= 0
tocond=dmesg.amount_one
The text was updated successfully, but these errors were encountered: