From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yEBzJCSjfGNFXwAAbAwnHQ (envelope-from ) for ; Tue, 22 Nov 2022 11:23:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gKBlJCSjfGPGQwAA9RJhRA (envelope-from ) for ; Tue, 22 Nov 2022 11:23:32 +0100 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 5CB372653A for ; Tue, 22 Nov 2022 11:23:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxQQi-00089C-Ot; Tue, 22 Nov 2022 05:23:04 -0500 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 1oxQQg-00088w-VU for bug-guix@gnu.org; Tue, 22 Nov 2022 05:23:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxQQg-0004gG-A9 for bug-guix@gnu.org; Tue, 22 Nov 2022 05:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxQQg-0008H6-5b for bug-guix@gnu.org; Tue, 22 Nov 2022 05:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#59365: make-dynamic-linker-cache OOMs for LLVM 15 on i686-linux Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 22 Nov 2022 10:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59365 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 59365@debbugs.gnu.org, Greg Hogan , Marius Bakke Received: via spool by 59365-submit@debbugs.gnu.org id=B59365.166911257831784 (code B ref 59365); Tue, 22 Nov 2022 10:23:02 +0000 Received: (at 59365) by debbugs.gnu.org; 22 Nov 2022 10:22:58 +0000 Received: from localhost ([127.0.0.1]:49921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxQQc-0008Ga-6e for submit@debbugs.gnu.org; Tue, 22 Nov 2022 05:22:58 -0500 Received: from mail-qk1-f170.google.com ([209.85.222.170]:36670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxQQZ-0008GL-Gc for 59365@debbugs.gnu.org; Tue, 22 Nov 2022 05:22:56 -0500 Received: by mail-qk1-f170.google.com with SMTP id d7so9891074qkk.3 for <59365@debbugs.gnu.org>; Tue, 22 Nov 2022 02:22:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=uF3Z4Qoxr0txlqMqI3SqVBuR80tu5lxgTIvHDXTSHIk=; b=kkUBO6ccGZb+LeQlfS1s7t2CFg1rXZyyRbuL6IAlZ2qd8bBq7LPWjE+Tkg64Qj5REs AOHYzwezpd3xn5BKESFsJwKHhMZ6GebfkSoak8ovTLvuD2rcNyGhM/m+6cuUXguPPXsf ALpUNJNWeQEgvOD9nzvEJ6fgRuiEB7diQY9VfYdO07S0+h8fKK5VcapUN/EmxFx4TbLP JRfMZEvtNiEu+CGRrH08iIV3wuljHYUSwfZUkF2aA0FqnPlRRjYfpWu/kXz3QBlLDdnD pmH5tcnlER8/jAPO4mReIm/2kNmDNz3KJ9Yu2Lf9+uTXGmbZC5u2m0Y9xXHSBZSTULXz W13w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uF3Z4Qoxr0txlqMqI3SqVBuR80tu5lxgTIvHDXTSHIk=; b=aX3RBT9AVUvgTefeFjfT1DBXnhVce2cgbl/AW7ptgbS3gKDl34ByjgPMxAp00t06b4 asEDy8o3QPO+W+nqH7heHHX7cuQNKvik+kORqOg+fNfRBw1MTvQkDf29q02Grn9S9moC 56hSIa79C14KRTIpAEgQen1o7/LN5Kj7JJ6tOQR9U0XO/WyNlvu2hkUOB8S133lWf1Fw /DcxKaqGBXdTMPLkzyxncbiPGBrVtAPp/iqTl0oM8AqSa4ro0BXV8XTaOyv63pcgbi4U ZTyzoW1uEgMlMBZyp8bdmuZm5r234gyKXn6uTnjXAC+zit1oxkmFXoRiY//Rp0en6W1y C8NA== X-Gm-Message-State: ANoB5pkDgiLaMR6WsBXIoIYT63jBZJh4GE9SX0iBSoHdStDSm5XJ2DcB 2pD9dqxQNEOr6Qbf+f7lszH2xmIhBJ9CjQ== X-Google-Smtp-Source: AA0mqf7FFGiknGYnM4n2Ki2O8V/weHyCTzDRMgu5WThSrlTFtgM5zEpejK3kBh7ErwgKMWFhytfcIQ== X-Received: by 2002:a37:bc9:0:b0:6fa:163f:dad8 with SMTP id 192-20020a370bc9000000b006fa163fdad8mr20106095qkl.575.1669112569791; Tue, 22 Nov 2022 02:22:49 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id s3-20020a05620a0bc300b006fa84082b6dsm10071454qki.128.2022.11.22.02.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 02:22:49 -0800 (PST) From: Maxim Cournoyer References: <87mt8o14xd.fsf@gnu.org> <877cznidn8.fsf@gnu.org> Date: Tue, 22 Nov 2022 05:22:48 -0500 In-Reply-To: <877cznidn8.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 22 Nov 2022 09:42:19 +0100") Message-ID: <874jurp9tz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669112612; 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:dkim-signature; bh=uF3Z4Qoxr0txlqMqI3SqVBuR80tu5lxgTIvHDXTSHIk=; b=Wl+HncoWfVHf0KKrVncnVrKGehjMNQWuUgJhRM3HGyd+vP2vY6tXU9ITokFteBFL+lG/W6 iA3SDmbAxn4m9d71zBg8lU2YIdEEv1AHWOnTO8qYQmArFIG+ZFSmTEV/27Ouxt2GMhls3C R/rmikGA05x9jQepkH/Y5tqdxppNnqsqDNW/P64KI+4PRPRK0lN+yQYQyoYWuv6BQoe2am oKsEzCAK+L7VTwxij7xfr3fL87K8UT5uJuknmjmhk3QaUHEppT3az5rUgK2Ey7L/0uXWS5 LRxQfpQ8y9HmuVJQjaPenQJfj4ThH62HcNSkInwzInMSAl/7y5KKq+s4HvF3HA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669112612; a=rsa-sha256; cv=none; b=YL3k6TfLuBrXkAHM8wo3YQSFvQshVsRK/xwG5LrtebMbHFWOArxEkGJlwsBOkpyAC6Ijgx 0fDaLKaVsNbK2crIeb0rrk/IPFaAvQP+IBDFLjyc9FfvU+8P4vONUwZOwlGsJBe0eASJKM HjvjS5OY/mA4/0jLxR1gQHmNd+F1qrRIlMG+VvOXikDztxQCtm0WRE6dHXSzKms/yy9nqV N9LCLmMcvoWx+J2qQal4N6U81MRGpQj+WBozpz817bc+KoLx4/nl+1T8S6uP8hjZJ9OpTr SfZtpufes40hoRyhQbDCuyAnCatx8pOL81JF6nYHZMoh2IL4uXDKlntsWcVyOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kkUBO6cc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.50 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kkUBO6cc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5CB372653A X-Spam-Score: 5.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: keUIHLxMR80e Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > (Cc: Maxim and Greg for LLVM packaging questions below.) > > Marius Bakke skribis: > >> LLVM 15.0.4 fails on i686-linux: >> >> https://ci.guix.gnu.org/build/1702995/details >> >> Because the 'make-dynamic-linker-cache' phase runs out of memory: >> >> starting phase `make-dynamic-linker-cache' >> GC Warning: Repeated allocation of very large block (appr. size 268439= 552): >> May lead to memory leak and poor performance >> GC Warning: Repeated allocation of very large block (appr. size 134221= 824): >> May lead to memory leak and poor performance >> GC Warning: Repeated allocation of very large block (appr. size 268439= 552): >> May lead to memory leak and poor performance >> GC Warning: Failed to expand heap by 285216768 bytes >> GC Warning: Failed to expand heap by 268439552 bytes >> GC Warning: Out of Memory! Heap size: 3620 MiB. Returning NULL! >> Warning: Unwind-only out of memory exception; skipping pre-unwind hand= ler. >> Warning: Unwind-only out of memory exception; skipping pre-unwind hand= ler. >> Warning: Unwind-only out of memory exception; skipping pre-unwind hand= ler. >> >> (excerpt from https://ci.guix.gnu.org/build/1702995/log/raw) >> >> Not sure why this phase uses so much memory. Ideas? > > Yes: the gremlin.scm code uses =E2=80=98file-dynamic-info=E2=80=99, which= loads the > whole file in memory. Ridiculous. If it loaded just that file, it should be fine, no? It weighs 133 MiB, as you've shown below: > But the crux of the problem is that llvm@15 has a single huge shared > library, unlike previous versions: > > $ du -hL /gnu/store/bgqdvvi7k6l255332rfawgjmn2hpn13r-llvm-15.0.4/lib/*.so > 133M /gnu/store/bgqdvvi7k6l255332rfawgjmn2hpn13r-llvm-15.0.4/lib/libLL= VM-15.0.4.so > 96K /gnu/store/bgqdvvi7k6l255332rfawgjmn2hpn13r-llvm-15.0.4/lib/libLT= O.so > 16K /gnu/store/bgqdvvi7k6l255332rfawgjmn2hpn13r-llvm-15.0.4/lib/libRe= marks.so > (It also has tons of .a files, which shouldn=E2=80=99t be there.) The static files are needed at least to build the clang runtime. I had tried to get rid of them without success. Perhaps they could be moved to a "static" output if they're needed only at that time. > Is that big LLVM.so due to different build options on our side? Or is > it a radical upstream change (sounds unlikely, but who knows)? It's caused by -DLLVM_LINK_LLVM_DYLIB=3DON and -DLLVM_BUILD_LLVM_DYLIB=3DON, which is the supported configuration to build a shared library of LLVM (-DBUILD_SHARED_LIBS=3DON is obsolete/deprecated) [0]. It also makes things conveniently easy to link to LLVM; you just need to link to '-lLLVM', and everything it needs is available. [0] https://llvm.org/docs/BuildingADistribution.html#special-notes-for-lib= rary-only-distributions --=20 Thanks, Maxim