Title: `OSError: AF_UNIX path too long` regression in `forkserver` · Issue #149527 · python/cpython · GitHub
Open Graph Title: `OSError: AF_UNIX path too long` regression in `forkserver` · Issue #149527 · python/cpython
X Title: `OSError: AF_UNIX path too long` regression in `forkserver` · Issue #149527 · python/cpython
Description: Bug report Bug description: Since fd81246 (in 3.14 as e590f00), we're seeing Gentoo Portage randomly fail with: Traceback (most recent call last): File "/usr/lib/portage/python3.14/ebuild-ipc.py", line 303, in
Open Graph Description: Bug report Bug description: Since fd81246 (in 3.14 as e590f00), we're seeing Gentoo Portage randomly fail with: Traceback (most recent call last): File "/usr/lib/portage/python3.14/ebuild-ipc.py", ...
X Description: Bug report Bug description: Since fd81246 (in 3.14 as e590f00), we're seeing Gentoo Portage randomly fail with: Traceback (most recent call last): File "/usr/lib/portage/python3.14/ebuild-...
Opengraph URL: https://github.com/python/cpython/issues/149527
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`OSError: AF_UNIX path too long` regression in `forkserver`","articleBody":"# Bug report\n\n### Bug description:\n\nSince fd81246bd55e4fab1976a7cca3e5d42582dbdac0 (in 3.14 as e590f007ed8b0268c40bcae445d6b50e06b00960), we're seeing Gentoo Portage randomly fail with:\n\n```pytb\nTraceback (most recent call last):\n File \"/usr/lib/portage/python3.14/ebuild-ipc.py\", line 303, in \u003cmodule>\n sys.exit(ebuild_ipc_main(sys.argv[1:]))\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^\n File \"/usr/lib/portage/python3.14/ebuild-ipc.py\", line 299, in ebuild_ipc_main\n return ebuild_ipc.communicate(args)\n ~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"/usr/lib/portage/python3.14/ebuild-ipc.py\", line 151, in communicate\n lock_obj = portage.locks.lockfile(self.ipc_lock_file, unlinkfile=True)\n File \"/usr/lib/python3.14/site-packages/portage/locks.py\", line 184, in lockfile\n lock = _lockfile_iteration(\n mypath,\n ...\u003c3 lines>...\n flags=flags,\n )\n File \"/usr/lib/python3.14/site-packages/portage/locks.py\", line 314, in _lockfile_iteration\n locking_method = _get_lock_fn()\n File \"/usr/lib/python3.14/site-packages/portage/locks.py\", line 96, in _get_lock_fn\n if _test_lock_fn(_lockf_test_lock_fn):\n ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.14/site-packages/portage/locks.py\", line 128, in _test_lock_fn\n proc.start()\n ~~~~~~~~~~^^\n File \"/usr/lib/python3.14/multiprocessing/process.py\", line 121, in start\n self._popen = self._Popen(self)\n ~~~~~~~~~~~^^^^^^\n File \"/usr/lib/python3.14/multiprocessing/context.py\", line 230, in _Popen\n return _default_context.get_context().Process._Popen(process_obj)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^\n File \"/usr/lib/python3.14/multiprocessing/context.py\", line 306, in _Popen\n return Popen(process_obj)\n File \"/usr/lib/python3.14/multiprocessing/popen_forkserver.py\", line 35, in __init__\n super().__init__(process_obj)\n ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^\n File \"/usr/lib/python3.14/multiprocessing/popen_fork.py\", line 20, in __init__\n self._launch(process_obj)\n ~~~~~~~~~~~~^^^^^^^^^^^^^\n File \"/usr/lib/python3.14/multiprocessing/popen_forkserver.py\", line 51, in _launch\n self.sentinel, w = forkserver.connect_to_new_process(self._fds)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^\n File \"/usr/lib/python3.14/multiprocessing/forkserver.py\", line 89, in connect_to_new_process\n self.ensure_running()\n ~~~~~~~~~~~~~~~~~~~^^\n File \"/usr/lib/python3.14/multiprocessing/forkserver.py\", line 167, in ensure_running\n listener.bind(address)\n ~~~~~~~~~~~~~^^^^^^^^^\nOSError: AF_UNIX path too long\n```\n\nApparently in this case the resulting path was:\n\n```\n/tmp/mgorny-dev-scripts/portage/dev-python/trove-classifiers-2026.5.7.17/temp/pymp-o2g23iqr/sock-d559f6e62fa1\n```\n\nNote that `tempfile.mktemp()` used to append 8 ASCII characters, while this logic appends 12 hex digits, so the logic introduced in 1a07a01014bde23acd2684916ef38dc0cd73c2de would be off by 4 now.\n\n### CPython versions tested on:\n\n3.14, CPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-149597\n* gh-160269\n* gh-160270\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/mgorny","@type":"Person","name":"mgorny"},"datePublished":"2026-05-08T02:31:39Z","url":"https://github.com/python/cpython/issues/149527"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8f9daa36-3b7d-5b21-690a-973582d5c974 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA20:27CA4:3446C0:44CB99:6B023843 |
| html-safe-nonce | 7ca9600e1e8d34f4e608743bc301bfe200922c588be7bab559236eb33035325f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTIwOjI3Q0E0OjM0NDZDMDo0NENCOTk6NkIwMjM4NDMiLCJ2aXNpdG9yX2lkIjoiNDMzOTQzMDczMTk3ODc4Mjc4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ebe904a7de50aed69b3df3eb4b2053c118670e5002cdd7fc501a0639b3c25786 |
| hovercard-subject-tag | issue:4403358247 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/149527/issue_layout |
| twitter:image | https://opengraph.githubassets.com/21cb34fe286f2581d85fc5b1cbd52a30d051e3d89cb4961d1e1687f16865b65e/python/cpython/issues/149527 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/21cb34fe286f2581d85fc5b1cbd52a30d051e3d89cb4961d1e1687f16865b65e/python/cpython/issues/149527 |
| og:image:alt | Bug report Bug description: Since fd81246 (in 3.14 as e590f00), we're seeing Gentoo Portage randomly fail with: Traceback (most recent call last): File "/usr/lib/portage/python3.14/ebuild-ipc.py", ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mgorny |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width