From owner-freebsd-python@FreeBSD.ORG Fri Feb 13 04:13:14 2015 Return-Path: Delivered-To: python@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2804FDD9 for ; Fri, 13 Feb 2015 04:13:14 +0000 (UTC) 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 mx1.freebsd.org (Postfix) with ESMTPS id 0B017E70 for ; Fri, 13 Feb 2015 04:13:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D4DDpu024446 for ; Fri, 13 Feb 2015 04:13:13 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: [Bug 197376] lang/python27: random module leaks file descriptor into child process Date: Fri, 13 Feb 2015 04:13:14 +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, needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: python@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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.18-1 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 04:13:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197376 --- Comment #3 from Ed Maste --- It is fixed in python 3.4.2 - see test result below. Looks like the fix[1] is not in 2.x though. The fix is PEP 446 - issue 18571[2] [1] https://github.com/python/cpython/commit/621f57c094e7572bb4aa2734fe7264856921fc27 [2] http://bugs.python.org/issue18571 LLDB people do not see this issue on Linux; I do not yet know if they're using Python 3 or if there's some other difference. Also os.urandom() is sufficient to demonstrate the problem: Python 2.7.9 (default, Jan 8 2015, 21:47:19) [GCC 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502)] on freebsd10 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.urandom(1) '8' >>> os.system("./a.out") File descriptor 3 is open. 512 >>> feynman% python3 Python 3.4.2 (default, Jan 28 2015, 05:38:04) [GCC 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502)] on freebsd10 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.urandom(1) b'\x00' >>> os.system("./a.out") 0 -- You are receiving this mail because: You are the assignee for the bug.