From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4D5oCiFBZ2b/BwAA62LTzQ:P1 (envelope-from ) for ; Mon, 10 Jun 2024 18:08:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 4D5oCiFBZ2b/BwAA62LTzQ (envelope-from ) for ; Mon, 10 Jun 2024 20:08:33 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=OUTLOOK.ES header.s=selector1 header.b="owHB0Q/g"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.es; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718042912; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=jzT2cqZCiBbYm6nrS4Z2tCwloBQlTE2lzvtFaY7+zIo=; b=ahzsyRbVJZHvINprTs6dHEsdV6sdGiRV0/xQGF37WrlkVS7nmRP2XDP6XnY5ILF1oKEpkQ S+wJUbAPnY9vLvpd4KYcIc/xvIpO8eCsTawcdmeI10j9YVm9ge2HaLxm6lysx5/XvFmn78 76zbacyYgieyWXJBjZmRIroRpp4VLbTgUEifTeEnkbmIBW/RMAFmV8NwZDrdKMon2Aqb+f eLACpbHXHed51Rwab+pCMru1mf7aGMbDWlbgXrJZCohZVb/izmmqV197jWoX7toPrSe5YC tvin28YsbLrfTq4A1qk2FUBiDsRGOLAIrZZPCQ48Z5rY40pSHPPeiallbZvtcA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1718042912; a=rsa-sha256; cv=pass; b=kXuOjycZiT1T1VCorwu/KR6klerAMsq2OhRyshmTdn10ifuj/V7cKzqaGZ53VofBH1iWd7 sbjqg6ySe1y8bn/KiU/PoPTANRekxzkVzbVEvI/SyO+xgr5rh4ofIVfEYeD62if6vBxNB6 h15vmJyv8Rv/3ol9m5KLWmEmbs9VhwtSuKwwUglkhngh1EQLIjbvB49ifraS9QVwRt1xi4 1qbyld/N51hWqB/jLtixbCVFcxWTgIv0K3W6FbDT+R68eyrJEbLuZeVCueb2Ru1pBcWGq3 zLO1O/eAZ6P16up0jeUMPb3oMXPD/5Q6dO0Wigo7IYarUNG9a0+Zgo8ep5Hm4Q== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=OUTLOOK.ES header.s=selector1 header.b="owHB0Q/g"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.es; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" 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 BF4D53FAB4 for ; Mon, 10 Jun 2024 20:08:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGjR7-00033k-63; Mon, 10 Jun 2024 14:08:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGjR6-00033V-4r for guix-devel@gnu.org; Mon, 10 Jun 2024 14:08:04 -0400 Received: from mail-vi1eur02olkn2107.outbound.protection.outlook.com ([40.92.48.107] helo=EUR02-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGjR4-0003G8-5Q for guix-devel@gnu.org; Mon, 10 Jun 2024 14:08:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q3ShgP+vSWw/SFAic+jKYj520m7mOuT+mdqYV4GyLWdsVTS2og3i2WWwhofa6r2G/JY5sqMiMp8LvI+p4BXBiiCP/g+yatY7xEFRn9/j1fpiJuF0f5xQo2L0qDzSd45HVGOf+ioEFLxBEip7VsNxEny9wMM164PalwQjXSy99PCrC2wzM6GlxWdizbwx+RXnrMU3qMuXOpVo2fGC4LZh88EnOiBXfPFpwpgLU2voqtyM55NEpirLJH+Rni1CCm4TAHM0ufp7pZhKugPctl8SSBJYtmUy4s3awJGeaozXLJahlnLrx6MtzK65lXCm1TcByGU2gORWCMG4MHdq187P8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jzT2cqZCiBbYm6nrS4Z2tCwloBQlTE2lzvtFaY7+zIo=; b=Lk9w9lLPUQ4naN53y+gkGoSiJ5ZKtju5s90Qkkbkw1eDt79IXb4IWSHo0FW73CQj53JHzY1cjPfhB29BZmTHjfjAqKvS2/T1j8AW+/zDlN7AOQDXQT1FnZzxnXkGGypGzZ4E9tgm4zQSESIFaZUXc6+/NiqHQIXquGbex5mjGMvdaB+bUjMGJmgJYctmxyV8k1ExWGmXIaMjnOWZdLWaKJqh3FeGklVNNFUI6lebSrLCv6e7esNrTd02hTHlL1SbqoE62g8CO02mSmZP3szJfKfSWuUQRFa33ektid6+IODJDVmgcKFeFBW7SIiCSCEuNbdkoGrTkAif/8LMBU4Eog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=OUTLOOK.ES; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jzT2cqZCiBbYm6nrS4Z2tCwloBQlTE2lzvtFaY7+zIo=; b=owHB0Q/gXzO7op8ibCZ9cOlTfdGpYkAZXJJDJtQVXU3cj67BCa8HAcGmS65e2vwLpbSLV6U/mq2YGrsp/1+en3U6XmFHXnBKQDI73PXnCifY8yJ6TUhEcVN2AkvRhsY6Y+oiTOp/5I8NNG/T/SzwLsSN0C3zIfmgONYZZsLX2KUEZF/F34FpWNVlxhDoS7wyeBGQmhP24RxNXskTOpoIMHdE0tblbpMCg2cXUyMR3w2VRU5+sDRE2C5GWMibJyWRT7x3Aig6ldB+ojC8ueQHL3B+9B3xybxolNkL9CyB6hkab44QsHZw5/EDmDwVwwm3VjYw69JmcaFNKsGWyMcfoQ== Received: from PAXP251MB0348.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:20b::10) by DB4P251MB0901.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:37a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Mon, 10 Jun 2024 18:02:57 +0000 Received: from PAXP251MB0348.EURP251.PROD.OUTLOOK.COM ([fe80::1f4f:1f6b:1817:f03f]) by PAXP251MB0348.EURP251.PROD.OUTLOOK.COM ([fe80::1f4f:1f6b:1817:f03f%7]) with mapi id 15.20.7633.036; Mon, 10 Jun 2024 18:02:57 +0000 From: Sergio Pastor =?utf-8?Q?P=C3=A9rez?= To: AS8P251MB0337E3439FE24C98DA02D6BBF3F72@AS8P251MB0337.EURP251.PROD.OUTLOOK.COM Cc: michal_atlas+gnu@posteo.net, guix-devel@gnu.org Subject: Re: System deployment commands hoarding all RAM In-Reply-To: References: Date: Mon, 10 Jun 2024 20:02:55 +0200 Message-ID: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-TMN: [D9ppGX/1gzQYcJZuwtLC2GE4AoRg14A1] X-ClientProxiedBy: MA2P292CA0012.ESPP292.PROD.OUTLOOK.COM (2603:10a6:250:1::19) To PAXP251MB0348.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:20b::10) X-Microsoft-Original-Message-ID: <84bk48r7zk.fsf@outlook.es> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXP251MB0348:EE_|DB4P251MB0901:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ae45191-634b-4575-7226-08dc89778ecd X-Microsoft-Antispam: BCL:0;ARA:14566002|461199019|440099019|3412199016; X-Microsoft-Antispam-Message-Info: mYLrKXnYlL48JADdzEOS2PXUCCiI+lnQrm2NksONXZ7HD8ZCYsS4fSWNSaqMvlvCJE0HJ+bRfvCXdEeipdHqgVnBpbJ4puCp7OpZp0l3mqyxflcfkracMdBj76bezNbU+93DoCDODftwyMaTPq5bu5LaCwG705LQt607y/TFLrwGQUAmHnLF6uPrcq4I7y59ootYCDR0Tn+lsWLp16s10tItFL+Z+ENsmOJcriWv/O8zpsiSoMObv8d86mjPuFUBwmUIEXNKeVeOVGsp31H6xX1LNROAc258Y8laqXVb3XdvbxzidEBGPFY79fNV3VYQ8ZDAX6THRN4ySCg00nvpRunHzadFyAwyrCOa3j+yRbSkq1gURhkzWn7vif/Ky6B51F1srG3cGL1PQTNtmCvwZQ5QWFRGbvRi++lP33q420o1HrHEvNm+frtTqxeL/ffJmE+Q3TQ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VWNDSFo3eWFtRm9G?= =?utf-8?B?SWxaN2w5Ym5oWHBrb0RaZDAxSm9rUzRSLyszNUk4dGR4dmR0M3hxcU51WjlY?= =?utf-8?Q?4WyBqcHepe3kGxzbovI0?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-00b75.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 2ae45191-634b-4575-7226-08dc89778ecd X-MS-Exchange-CrossTenant-AuthSource: PAXP251MB0348.EURP251.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2024 18:02:57.3434 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4P251MB0901 Received-SPF: pass client-ip=40.92.48.107; envelope-from=sergio.pastorperez@outlook.es; helo=EUR02-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.83 X-Spam-Score: -7.83 X-Migadu-Queue-Id: BF4D53FAB4 X-Migadu-Scanner: mx11.migadu.com X-TUID: 1k3il4XOZ4b/ Hi Juliana, Thanks for your help on the matter! After reading your explanation about tail recursion I understand the concept much better. I still need to find a way to implement the problematic code in a tail-recursive fashion. But, I'm not convinced that it will solve the problem. Specially since issuing the `apply-to-record-type` over an operating system record yields a short computation time: --8<---------------cut here---------------start------------->8--- scheme@(pastor utils gpu-specification)>=20 ,time (begin ; Avoid printing the output (apply-to-record-type (lambda (pkg) pkg) (@ (guix packages) ) (@ (base-system) %base-gnome-system)) #f) $15 =3D #f ;; 0.007433s real time, 0.007428s run time. 0.000000s spent in GC. --8<---------------cut here---------------end--------------->8--- I'm not able to use the profiler to display how deep the recursion grows. In any case, I believe it should grow equally for the following invocations: --8<---------------cut here---------------start------------->8--- =CE=BB guix system build transformed-sheepbook.scm /gnu/store/kpk9la4h9xwp6n7vabd5lfs6kbhb2f2d-system =CE=BB guix system vm transformed-sheepbook.scm Killed --8<---------------cut here---------------end--------------->8--- Since the second one hoards the RAM, I'm guessing that the commands operate differently over the resulting operating system record. I'm not able to dig further since the `guix repl` does not support tracing, and using a pure Guile REPL errors out whenever I try to use trace points for this procedure: --8<---------------cut here---------------start------------->8--- scheme@(pastor utils gpu-specification)> ,tracepoint apply-to-record-type scheme@(pastor utils gpu-specification)> ((@ (guix scripts system) guix-sys= tem) "vm" "/home/pastor/.config/guix/systems/transformed-sheepbook.scm") ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure port-column: Wrong type argument in position 1: # --8<---------------cut here---------------end--------------->8--- Interestingly, the traces work when using the `build` command instead of the `vm` command: --8<---------------cut here---------------start------------->8--- scheme@(pastor utils gpu-specification)> ((@ (guix scripts system) guix-sys= tem) "build" "/home/pastor/.config/guix/systems/transformed-sheepbook.scm") Trap 0: (apply-to-record-type # =E2=80=A6) Trap 0: | (apply-to-record-type # =E2=80=A6) ... /gnu/store/6xxzsp3grp53x9w49wh513i8sjyal3zg-system --8<---------------cut here---------------end--------------->8--- I think I've hit a road block. Does any fellow Guix hacker knows a way to debug `guix system` commands or why the `vm` subcommand does not make the same computation over the record as the `build` subcommand does? Thanks again for your time. Regards, Sergio. PS: I appreciate the book recommendations!