gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised by encukou · Pull Request #123423 · python/cpython · GitHub
Skip to content

gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised - #123423

Merged
encukou merged 1 commit into
python:mainfrom
encukou:gh-122136-aio-test
Aug 28, 2024
Merged

gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised#123423
encukou merged 1 commit into
python:mainfrom
encukou:gh-122136-aio-test

Conversation

@encukou

@encukou encukou commented Aug 28, 2024

Copy link
Copy Markdown
Member

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?

@CendioOssman

Copy link
Copy Markdown
Contributor

@encukou

encukou commented Aug 28, 2024

Copy link
Copy Markdown
Member Author

!buildbot Fedora

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @encukou for commit 2e09851 🤖

The command will test the builders whose names match following regular expression: Fedora

The builders matched are:

  • s390x Fedora Rawhide LTO PR
  • AMD64 Fedora Rawhide Refleaks PR
  • AMD64 Fedora Rawhide LTO PR
  • PPC64LE Fedora Rawhide NoGIL refleaks PR
  • s390x Fedora Clang PR
  • PPC64LE Fedora Rawhide PR
  • aarch64 Fedora Rawhide NoGIL PR
  • AMD64 Fedora Rawhide NoGIL refleaks PR
  • PPC64LE Fedora Rawhide Clang Installed PR
  • aarch64 Fedora Rawhide NoGIL refleaks PR
  • aarch64 Fedora Rawhide PR
  • aarch64 Fedora Stable Clang Installed PR
  • s390x Fedora Rawhide PR
  • PPC64LE Fedora Stable LTO + PGO PR
  • AMD64 Fedora Rawhide Clang Installed PR
  • PPC64LE Fedora Stable Clang PR
  • aarch64 Fedora Stable Clang PR
  • PPC64LE Fedora Stable Clang Installed PR
  • s390x Fedora Rawhide LTO + PGO PR
  • s390x Fedora PR
  • PPC64LE Fedora Stable PR
  • AMD64 Fedora Stable Clang PR
  • AMD64 Fedora Stable PR
  • AMD64 Fedora Rawhide PR
  • s390x Fedora Rawhide Refleaks PR
  • aarch64 Fedora Rawhide Refleaks PR
  • PPC64LE Fedora Rawhide LTO PR
  • PPC64LE Fedora Stable Refleaks PR
  • aarch64 Fedora Stable PR
  • PPC64LE Fedora Rawhide Refleaks PR
  • aarch64 Fedora Stable LTO + PGO PR
  • aarch64 Fedora Stable Refleaks PR
  • s390x Fedora LTO + PGO PR
  • AMD64 Fedora Stable LTO PR
  • PPC64LE Fedora Stable LTO PR
  • s390x Fedora Rawhide Clang PR
  • aarch64 Fedora Rawhide LTO PR
  • s390x Fedora LTO PR
  • PPC64LE Fedora Rawhide NoGIL PR
  • s390x Fedora Clang Installed PR
  • aarch64 Fedora Rawhide Clang PR
  • AMD64 Fedora Rawhide NoGIL PR
  • AMD64 Fedora Stable Clang Installed PR
  • aarch64 Fedora Rawhide LTO + PGO PR
  • AMD64 Fedora Stable Refleaks PR
  • AMD64 Fedora Rawhide LTO + PGO PR
  • aarch64 Fedora Stable LTO PR
  • AMD64 Fedora Rawhide Clang PR
  • PPC64 Fedora PR
  • PPC64LE Fedora Rawhide LTO + PGO PR
  • aarch64 Fedora Rawhide Clang Installed PR
  • AMD64 Fedora Stable LTO + PGO PR
  • s390x Fedora Refleaks PR
  • PPC64LE Fedora Rawhide Clang PR
  • s390x Fedora Rawhide Clang Installed PR

@encukou

encukou commented Aug 28, 2024

Copy link
Copy Markdown
Member Author

Thanks!

Given that this issue is blocking workflows, then it's probably best to merge this PR.

OK, if the buildbot tests pass I'll merge but keep the issue open for a while.
The comment already mentions gh-122136, so if the test fails again people should find it :)

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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.

@vstinner vstinner added the needs backport to 3.13 bugs and security fixes label Aug 28, 2024
@vstinner

Copy link
Copy Markdown
Member

Python 3.13 is also affected.

@encukou
encukou merged commit b379f1b into python:main Aug 28, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@encukou
encukou deleted the gh-122136-aio-test branch August 28, 2024 20:36
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 28, 2024
…data than advertised (pythonGH-123423)

(cherry picked from commit b379f1b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-app

bedevere-app Bot commented Aug 28, 2024

Copy link
Copy Markdown

GH-123443 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 28, 2024
@bedevere-bot

Copy link
Copy Markdown

vstinner pushed a commit that referenced this pull request Aug 29, 2024
… data than advertised (GH-123423) (#123443)

gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised (GH-123423)
(cherry picked from commit b379f1b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants