gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised - #123423
Conversation
…data than advertised
|
!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. |
vstinner
left a comment
There was a problem hiding this comment.
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?