-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised #123423
Conversation
…data than advertised
I'd say so. But I'm unsure about the robustness if we don't understand why the kernel buffers are larger than expected. If the kernel is dynamically allocating things (which previous iterations suggested it does with some delay), then the tests may give false positives. Given that this issue is blocking workflows, then it's probably best to merge this PR. But perhaps a note that this test is potentially unreliable and could use more investigation? |
!buildbot Fedora |
🤖 New build scheduled with the buildbot fleet by @encukou for commit 2e09851 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Thanks!
OK, if the buildbot tests pass I'll merge but keep the issue open for a while. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
- Without this change, test_abort_clients() fails on my Fedora 41 (Linux kernel 6.10.6-200.fc40.x86_64).
- With this change, the test pass successfully.
Python 3.13 is also affected. |
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…data than advertised (pythonGH-123423) (cherry picked from commit b379f1b) Co-authored-by: Petr Viktorin <encukou@gmail.com>
GH-123443 is a backport of this pull request to the 3.13 branch. |
|
Apparently, Linux kernel 6.10.6 can buffer much more data than advertised by
getsockopt({SO_RCVBUF,SO_SNDBUF})
-- see #122136 (comment)This breaks expectations of a test added in GH-116784.
This fix loops until the the asyncio buffer starts filling up, which should mean the kernel ones are full.
I capped the loop at 10 iterations to avoid looping forever if there's a bug.
This partially reverts the idea in one commit from GH-116784: 1158151
@CendioOssman, does this preserve the intent of the test?