From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sCiKGlo0AGFOlgAAgWs5BA (envelope-from ) for ; Tue, 27 Jul 2021 18:29:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id II4YFlo0AGGkKgAAbx9fmQ (envelope-from ) for ; Tue, 27 Jul 2021 16:29:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 191C618F95 for ; Tue, 27 Jul 2021 18:29:13 +0200 (CEST) Received: from localhost ([::1]:53984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8Px9-0001HT-7f for larch@yhetil.org; Tue, 27 Jul 2021 12:29:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8Px0-0001H0-TD for bug-guix@gnu.org; Tue, 27 Jul 2021 12:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8Px0-00072W-Lv for bug-guix@gnu.org; Tue, 27 Jul 2021 12:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m8Px0-0005oA-BW for bug-guix@gnu.org; Tue, 27 Jul 2021 12:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49439: grafts cause =?UTF-8?Q?=E2=80=9Cguix_?= =?UTF-8?Q?environment=E2=80=9D?= to get killed with OOM Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 27 Jul 2021 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49439 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Sarah Morgensen Received: via spool by 49439-submit@debbugs.gnu.org id=B49439.162740330122279 (code B ref 49439); Tue, 27 Jul 2021 16:29:02 +0000 Received: (at 49439) by debbugs.gnu.org; 27 Jul 2021 16:28:21 +0000 Received: from localhost ([127.0.0.1]:53707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8PwL-0005nF-3R for submit@debbugs.gnu.org; Tue, 27 Jul 2021 12:28:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8PwI-0005n1-D6 for 49439@debbugs.gnu.org; Tue, 27 Jul 2021 12:28:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54430) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8PwC-0006Rw-5m; Tue, 27 Jul 2021 12:28:12 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=42974 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8PwB-0007c8-U8; Tue, 27 Jul 2021 12:28:12 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sg0rse1n.fsf@elephly.net> <86tuklr5g6.fsf@mgsn.dev> Date: Tue, 27 Jul 2021 18:28:08 +0200 In-Reply-To: <86tuklr5g6.fsf@mgsn.dev> (Sarah Morgensen's message of "Thu, 22 Jul 2021 21:59:21 -0700") Message-ID: <87y29r3enb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ricardo Wurmus , 49439@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627403354; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=VfSa9iL8wHKiwT2QpiUktSsqKmHCq/u8x/6T2tMUvaA=; b=KI/o1LNWwO9WJ/AZqzwpIwAiGnkUkHTWhaDm2FtNhbSEjnpJ1NxFbLLVjBUrnv1HGlZ6Ax QKAUFeZN74RhreiQ3CGMAiSEYsVvckue2xG/vLpS7wsnpb64raPKqJrCJLBeHw5+VNr/Id 2lBctfbHVxj/lRHV8nbo0rgeC24cg9gcR5CJ+jPAk64lKKXaddGOtuGAkfLnKdanOcO8EJ H3C/EUlA/hj4U1iYALRU8TwKMFgGu5UDlVrvA0HMFpVLdQERvpCODYQ4FunsFXekKSE6Lw BQm4pCweZNOND+hfQ/dK2SgYUnDGupu4E3e7UWOLl+mJqMscR4PtWYmbP6zDBA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627403354; a=rsa-sha256; cv=none; b=R4/mBuAHZF9sP6WXtiZAROtaqtcVzajO2VY9DHsYgGrqCvReQI/iEu/+rHP04QmttKa/4O Idxv4n4Q9dQznYQkotKJsApPenT8RBtyrRfUJEDLrL4TyEB6IsU62oofWm1u9wFhULM+qu /EG6VCFDJ6iwg1TgYJiZj7+5ws27i8iqgqmJYAxk8PC5fG+UZLo7tA27UOQ2TLaQrBU6au oRYl4UMz4anmdWcY0KnpEbtuvszduV67QG1qTR2l+DsX2bE37SYLztl742Sz9igqRx5Tyy qz0G5d8Wo3jLIolc8KfWkdxtIsigHvy06VFTmk2yG5pEvZnbhrr95ewUoJBFMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 191C618F95 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: 48JEh6zvAez8 Hi, Sarah Morgensen skribis: > Ricardo Wurmus writes: > >> With a recent version of Guix, =E2=80=9Cguix environment=E2=80=9D will n= ot=20 >> terminate on its own, keeps the CPU busy, and gets killed when the=20 >> system eventually runs out of memory. >> >> $ guix describe -f channels >> >> (list (channel >> (name 'guix) >> (url "/home/rekado/dev/gx/branches/master") >> (commit >> "685cfdec94e5e48c4ad28de53466a28dfc258edb"))) >> >> >> $ guix environment pigx-scrnaseq >> [wait until it gets killed] > > I can reproduce this with pigx-scrnaseq as well a number of other > packages (listed below). > > $ ./pre-inst-env guix describe -f channels > (list (channel > (name 'guix) > (url "/home/sarah/guix") > (commit > "3217a04b0352c2dd13323257b369604eeabfccc3"))) > > Does not complete within 5 minutes: What hardware are you using? Here=E2=80=99s what I observe (with everything already in store and on a hot cache, with an i7 CPU): --8<---------------cut here---------------start------------->8--- $ guix describe Generacio 188 Jul 25 2021 12:47:29 (nuna) guix a92dfbc repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: a92dfbce30777de6ca05031e275410cf9f56c84c $ time GUIX_PROFILING=3Dgc guix environment pigx-scrnaseq --search-paths --= no-grafts >/dev/null Garbage collection statistics: heap size: 160.31 MiB allocated: 1440.70 MiB GC times: 39 time spent in GC: 4.51 seconds (46% of user time) real 0m7.534s user 0m9.747s sys 0m0.167s $ time GUIX_PROFILING=3Dgc guix environment pigx-scrnaseq --search-paths >= /dev/null Garbage collection statistics: heap size: 168.31 MiB allocated: 2111.71 MiB GC times: 53 time spent in GC: 6.92 seconds (45% of user time) real 0m12.100s user 0m15.517s sys 0m0.198s --8<---------------cut here---------------end--------------->8--- Commit 78daf9e02e5bc51f91488d8237cab2050cc060cf optimizes =E2=80=98coalesce-duplicate-inputs=E2=80=99, which was quadratic in the num= ber of inputs (!). After that change, I get: --8<---------------cut here---------------start------------->8--- $ time GUIX_PROFILING=3Dgc ./pre-inst-env guix environment pigx-scrnaseq --= search-paths --no-grafts >/dev/null Garbage collection statistics: heap size: 168.31 MiB allocated: 716.58 MiB GC times: 24 time spent in GC: 2.65 seconds (40% of user time) real 0m5.720s user 0m6.708s sys 0m0.149s $ time GUIX_PROFILING=3Dgc ./pre-inst-env guix environment pigx-scrnaseq --= search-paths >/dev/null Garbage collection statistics: heap size: 160.31 MiB allocated: 1387.96 MiB GC times: 42 time spent in GC: 5.87 seconds (43% of user time) real 0m10.821s user 0m13.513s sys 0m0.198s --8<---------------cut here---------------end--------------->8--- Could you tell me if it improves the situation for you? It=E2=80=99s not the end of the road, but it should be an improvement. Thanks, Ludo=E2=80=99.