FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-159603: Use pthread_attr_get_np() on FreeBSD (#159604) by vstinner · Pull Request #159928 · python/cpython · GitHub

Repository navigation

[3.15] gh-159603: Use pthread_attr_get_np() on FreeBSD (#159604) - #159928

Merged
vstinner merged 1 commit into
python:3.15from
vstinner:freebsd_stack15
Oct 20, 2026
Merged

vstinner merged 1 commit into
python:3.15from
vstinner:freebsd_stack15

Conversation

vstinner commented Oct 20, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Use pthread_attr_get_np() on FreeBSD to get the stack size (and guard size) of the current thread.

Check if pthread_attr_get_np() function and <pthread_np.h> header are available in configure.

Update test_json.test_recursion. On FreeBSD 16 with a default stack size of 512 MB, the json C implementation no longer raises RecursionError in test_highly_nested_objects_encoding(). Reduce also max_depth from 5,000 to 2,000 so test_highly_nested_objects_encoding() of the Python implementation only takes 1.6 seconds, instead of 12 seconds.

(cherry picked from commit 71ba39d)

Use pthread_attr_get_np() on FreeBSD to get the stack size (and guard
size) of the current thread.

Check if pthread_attr_get_np() function and <pthread_np.h> header are
available in configure.

Update test_json.test_recursion. On FreeBSD 16 with a default stack size of
512 MB, the json C implementation no longer raises RecursionError in
test_highly_nested_objects_encoding(). Reduce also max_depth from 5,000 to
2,000 so test_highly_nested_objects_encoding() of the Python implementation
only takes 1.6 seconds, instead of 12 seconds.

(cherry picked from commit 71ba39d)

Copy link
Copy Markdown
Member Author

!buildbot FreeBSD

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @vstinner for commit d036bad 🤖

Results will be shown at:

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

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

The builders matched are:

  • AMD64 FreeBSD16 PR
  • AMD64 FreeBSD16 Non-Debug PR
  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD15 NoGIL PR
  • AMD64 FreeBSD Refleaks PR
  • AMD64 FreeBSD15 PR

Copy link
Copy Markdown
Member Author

The 3.15 branch is also affected by issue #159535 and so we need to backport the change to 3.15. For example, test_lazy_import fails on AMD64 FreeBSD14 3.15: https://buildbot.python.org/#/builders/2024/builds/495.

Copy link
Copy Markdown
Member Author

buildbot/AMD64 FreeBSD15 NoGIL PR
buildbot/AMD64 FreeBSD16 Non-Debug PR

Ok good, the test suite passed on these two FreeBSD buildbots.

vstinner merged commit b62f612 into python:3.15 Oct 20, 2026
65 of 68 checks passed
vstinner deleted the freebsd_stack15 branch October 20, 2026 19:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL