From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nam Nguyen Subject: bug#33213: python-3/fixed and python-minimal test_socket.py Date: Tue, 30 Oct 2018 22:24:21 -0700 Message-ID: <20181031052336.GA9940@antelope> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHj06-0004FY-NM for bug-guix@gnu.org; Wed, 31 Oct 2018 01:25:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHj02-00048o-OU for bug-guix@gnu.org; Wed, 31 Oct 2018 01:25:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51887) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHj02-00048d-Ie for bug-guix@gnu.org; Wed, 31 Oct 2018 01:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHj02-0005Yt-AV for bug-guix@gnu.org; Wed, 31 Oct 2018 01:25:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHizl-0004F9-O4 for bug-guix@gnu.org; Wed, 31 Oct 2018 01:24:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHizh-0003y7-Pn for bug-guix@gnu.org; Wed, 31 Oct 2018 01:24:45 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:45773) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHizh-0003xV-IJ for bug-guix@gnu.org; Wed, 31 Oct 2018 01:24:41 -0400 Received: by mail-ed1-f51.google.com with SMTP id t10-v6so12510129eds.12 for ; Tue, 30 Oct 2018 22:24:41 -0700 (PDT) Content-Disposition: inline List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 33213@debbugs.gnu.org Hi, python has a memory leak in the test for test_socket.py, and it was fixed in commit 90aeaee861845142843a0f988fa4ff016c723cdb. https://git.savannah.gnu.org/cgit/guix.git/commit/?id=90aeaee861845142843a0f988fa4ff016c723cdb More information from IRC: ----8<------------------------------------------------------------ There is a bug in Python 3 which causes the test suite to run out of memory on recent kernels: https://bugs.python.org/issue34587 Unfortunately the only workaround I can think of is removing "/tmp/guix-build-python-3.6.5.drv-0/Lib/test/test_socket.py" some time during the build (but before the check phase). ----8<------------------------------------------------------------ However, python-minimal still runs test_socket, causing a memory leak. Is it possible to change python-minimal so it uses python-3/fixed? I was able to successfully build python-minimal by appending the fix to python-minimal, as below. I do not know how (replacement python-3/fixed) interacts with python-minimal. ----8<------------------------------------------------------------ (define-public python-minimal (package/inherit python (name "python-minimal") (outputs '("out")) ;; Build fails due to missing ctypes without libffi. ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib; ;; zlib is required by 'zipimport', used by pip. (inputs `(("libffi" ,libffi) ("openssl" ,openssl) ("zlib" ,zlib))) (arguments (substitute-keyword-arguments (package-arguments python-3) ((#:phases phases) `(modify-phases ,phases (add-after 'unpack 'delete-broken-test (lambda _ ;; Delete test which fails on recent kernels: ;; . (delete-file "Lib/test/test_socket.py") #t)))))))) ----8<------------------------------------------------------------