From owner-freebsd-python@freebsd.org Sat Dec 22 00:22:22 2018 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4398613394D1 for ; Sat, 22 Dec 2018 00:22:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DCDC88B031 for ; Sat, 22 Dec 2018 00:22:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id A03AF13394CC; Sat, 22 Dec 2018 00:22:21 +0000 (UTC) Delivered-To: python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B30213394C9 for ; Sat, 22 Dec 2018 00:22:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07E278B027 for ; Sat, 22 Dec 2018 00:22:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 32D5F1A57A for ; Sat, 22 Dec 2018 00:22:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id wBM0MKNC089207 for ; Sat, 22 Dec 2018 00:22:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id wBM0MKge089197 for python@FreeBSD.org; Sat, 22 Dec 2018 00:22:20 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: [Bug 221700] lang/python??: subprocess does not use closefrom, calls close(2) hundreds of thousands of times Date: Sat, 22 Dec 2018 00:22:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: needs-patch, performance X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: koobs@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: koobs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2018 00:22:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221700 Kubilay Kocak changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|python@FreeBSD.org |koobs@FreeBSD.org --- Comment #16 from Kubilay Kocak --- For explicitness and reference to future readers, current state is: 1) Yep, we're now comfortable that our closefrom(2) is async-signal safe (thanks emaste, conrad, others) 2) Yep, we want to resolve this issue, it has high value. I'm happy to coordinate and usher code into ports/upstream. 3) We want to resolve this in a manner upstream will accept. I think this w= ill be in the form of something like a configure check for closefrom(2) and conditionals in code with HAVE_CLOSEFROM. If other platforms have closefrom= (2) but aren't signal safe (or there's no positive evidence they are), we could additionally if && defined(__FreeBSD__) to be conservative in the first instance. We need patches for each upstream supported Python version (curre= ntly 2.7, 3.6, 3.7, default (3.8)) 4) I have a python bugs account, and have a good relationship with some core devs, who I'd like to get input/direction from (both in general and for pat= ches we create). 5) At present we need a patch in a form similar to (3) that I can get upstr= eam feedback on. With a patch reasonably close to (3) we can also consider carr= ying it locally in ports until upstream merges and releases future versions with support. I need (C) help with this if the diffs in comments are only exampl= es and not 'complete/ready/finished'. Open Questions: Are there any places other than _posixsubprocess.c:_close_fds_by_brute_force and posix_closerange() that might benefit from this? --=20 You are receiving this mail because: You are the assignee for the bug.=