Skip to content

gh-134954: Hard-cap max file descriptors in subprocess test fd_status #134955

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

Merged
merged 2 commits into from
May 31, 2025

Conversation

itamaro
Copy link
Contributor

@itamaro itamaro commented May 30, 2025

On some systems, SC_OPEN_MAX may return a very large value (i.e. 2**30), leading to the subprocess test timing out (or run forever).

Prevent this situation by applying a hard cap on how many file descriptors are checked.

On some systems, `SC_OPEN_MAX` may return a very large value (i.e. 10**30), leading to the subprocess test timing out (or run forever).
Prevent this situation by applying a hard cap on how many file descriptors are checked.
s/fd_stats/fd_status/
@gpshead gpshead added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 31, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @gpshead for commit c534fe5 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134955%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 31, 2025
Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to see some systems finally actually go the "no limits, its not the 90s" route on that value. skim through buildbot results in a few hours - I expect they'll be fine. then feel free to merge.

@itamaro
Copy link
Contributor Author

itamaro commented May 31, 2025

skim through buildbot results in a few hours - I expect they'll be fine. then feel free to merge

thanks @gpshead !
I understand the wasm32-wasi Non-Debug PR builder is known to be failing, so should be ok to ignore.
Still waiting for the last 9 PPC64LE builders, but I will need a core dev to click the merge button for me :)

@gpshead gpshead merged commit f58873e into python:main May 31, 2025
118 of 121 checks passed
@miss-islington-app
Copy link

Thanks @itamaro for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2025
…status (pythonGH-134955)

* Hard-cap max file descriptors in subprocess test fd_status

On some systems, `SC_OPEN_MAX` may return a very large value (i.e. 10**30), leading to the subprocess test timing out (or run forever).
Prevent this situation by applying a hard cap on how many file descriptors are checked.

* Fix typo in usage docstring

s/fd_stats/fd_status/
(cherry picked from commit f58873e)

Co-authored-by: Itamar Oren <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented May 31, 2025

GH-134980 is a backport of this pull request to the 3.14 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2025
…status (pythonGH-134955)

* Hard-cap max file descriptors in subprocess test fd_status

On some systems, `SC_OPEN_MAX` may return a very large value (i.e. 10**30), leading to the subprocess test timing out (or run forever).
Prevent this situation by applying a hard cap on how many file descriptors are checked.

* Fix typo in usage docstring

s/fd_stats/fd_status/
(cherry picked from commit f58873e)

Co-authored-by: Itamar Oren <[email protected]>
@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 31, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 31, 2025

GH-134981 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 May 31, 2025
gpshead pushed a commit that referenced this pull request May 31, 2025
…_status (GH-134955) (#134981)

gh-134954: Hard-cap max file descriptors in subprocess test fd_status (GH-134955)

* Hard-cap max file descriptors in subprocess test fd_status

On some systems, `SC_OPEN_MAX` may return a very large value (i.e. 10**30), leading to the subprocess test timing out (or run forever).
Prevent this situation by applying a hard cap on how many file descriptors are checked.

* Fix typo in usage docstring

s/fd_stats/fd_status/
(cherry picked from commit f58873e)

Co-authored-by: Itamar Oren <[email protected]>
gpshead pushed a commit that referenced this pull request May 31, 2025
…_status (GH-134955) (#134980)

gh-134954: Hard-cap max file descriptors in subprocess test fd_status (GH-134955)

* Hard-cap max file descriptors in subprocess test fd_status

On some systems, `SC_OPEN_MAX` may return a very large value (i.e. 10**30), leading to the subprocess test timing out (or run forever).
Prevent this situation by applying a hard cap on how many file descriptors are checked.

* Fix typo in usage docstring

s/fd_stats/fd_status/
(cherry picked from commit f58873e)

Co-authored-by: Itamar Oren <[email protected]>
@itamaro itamaro deleted the fd-status-cap-maxfd branch May 31, 2025 15:47
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable Refleaks 3.13 (tier-3) has failed when building commit 379c4a2.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1662/builds/220) and take a look at the build logs.
  4. Check if the failure is related to this commit (379c4a2) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1662/builds/220

Failed tests:

  • test.test_asyncio.test_ssl

Failed subtests:

  • test_remote_shutdown_receives_trailing_data_on_slow_socket - test.test_asyncio.test_ssl.TestSSL.test_remote_shutdown_receives_trailing_data_on_slow_socket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_asyncio/test_ssl.py", line 1592, in test_remote_shutdown_receives_trailing_data_on_slow_socket
    self.loop.run_until_complete(client(srv.addr))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-s390x.refleak/build/Lib/asyncio/base_events.py", line 725, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_asyncio/test_ssl.py", line 1576, in client
    await future
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_asyncio/test_ssl.py", line 1584, in wrapper
    meth(sock)
    ~~~~^^^^^^
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_asyncio/test_ssl.py", line 1502, in server
    self.assertEqual(data_len, CHUNK * SIZE*2)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 0 != 8388608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants