[Bug 242274] lang/python??: adopt local closefrom(2) patches
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Nov 27 23:32:52 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274
Bug ID: 242274
Summary: lang/python??: adopt local closefrom(2) patches
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs at FreeBSD.org
Reporter: kevans at freebsd.org
Created attachment 209497
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=209497&action=edit
svn(1) diff against the ports tree
As described in great detail elsewhere, Python subprocess will currently loop
over every single invalid fd we can give it and attempt to close(2) it. This is
very bad for performance, and is absolutely excruciating when trying to debug
applications driven by Python.
Python has already stated that they will adopt close_range after Linux merges
it, and we will also have an implementation pending in
https://reviews.freebsd.org/D21627 for when this happens. We no longer need to
come up with an upstreamable solution, as they've chosen the ultimate one and
now it's just a waiting game.
In the meantime, everyone on FreeBSD will benefit by applying these patches.
They will become naturally invalidated as close_range support trickles in and
we can just remove them as it happens.
Default limits will likely be lowered in base soon to help alleviate the
problem, but we'll still be executing ~975+ syscalls that don't need to happen
(and make truss(1) sad).
Patches based on emaste/cem contributions in PR 221700.
Q/A:
- Looks good
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list