Skip to content

gh-149527: fix creation of temporary socket files post GH-148578#149597

Open
picnixz wants to merge 2 commits into
python:mainfrom
picnixz:fix/forkserver/path-too-long-149527
Open

gh-149527: fix creation of temporary socket files post GH-148578#149597
picnixz wants to merge 2 commits into
python:mainfrom
picnixz:fix/forkserver/path-too-long-149527

Conversation

@picnixz

@picnixz picnixz commented May 9, 2026

Copy link
Copy Markdown
Member

@picnixz picnixz requested a review from gpshead as a code owner May 9, 2026 11:00
@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 9, 2026
Comment thread Lib/multiprocessing/util.py Outdated
@picnixz

picnixz commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

@gpshead friendly ping

Comment on lines +154 to +155
# contains the socket file. Update _TMPPYMP_SUFFIXLEN accordingly
# if the random suffix length chosen by tempfile.mkdtemp() changes.

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.

is that controlled by us or the platform? would we remember to update this? a unittest that fails if tempfile.mkdtemp() uses a longer suffix length with an error message pointing here with instructions at least would flag it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

By us. I will add a test when I have time!

@gpshead gpshead 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.

I think this looks overall correct, but it would be good if we could have a meaningful regression test around the max path length boundary cases to validate that the paths used remain short enough.

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

Labels

awaiting merge needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants