From unknown Sat Sep 20 08:01:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54557 <54557@debbugs.gnu.org> To: bug#54557 <54557@debbugs.gnu.org> Subject: Status: =?UTF-8?Q?=E2=80=9Cfakechroot=E2=80=9D?= execution engine =?UTF-8?Q?doesn=E2=80=99t?= work for Bash Reply-To: bug#54557 <54557@debbugs.gnu.org> Date: Sat, 20 Sep 2025 15:01:42 +0000 retitle 54557 =E2=80=9Cfakechroot=E2=80=9D execution engine doesn=E2=80=99t= work for Bash reassign 54557 guix submitter 54557 Ludovic Court=C3=A8s severity 54557 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 24 17:02:09 2022 Received: (at submit) by debbugs.gnu.org; 24 Mar 2022 21:02:09 +0000 Received: from localhost ([127.0.0.1]:49550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXUav-0007aV-8H for submit@debbugs.gnu.org; Thu, 24 Mar 2022 17:02:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:48928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXUat-0007aO-Cx for submit@debbugs.gnu.org; Thu, 24 Mar 2022 17:02:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXUat-0007O8-5e for bug-guix@gnu.org; Thu, 24 Mar 2022 17:02:07 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:27990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXUaq-0001Mg-KX for bug-guix@gnu.org; Thu, 24 Mar 2022 17:02:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=QURPnURnUZfKNUn6iQDasqCxGv+g3KffKDgDe2vWZ0E=; b=f6EmkPveJ21NwI4BfA5J7YtU3d5LWxFiL2C89TU4aG35JCHUOstMA+jf 2wUZeZ4CNHEdZN7XWdtGkIu97QAs42VdUtU3A+Vsl4p0gjHjjJvbc7xk/ RNwrifRV8ml64S7SC2FosjcD6kBPs7UIah3v7QJuofm7lrCbhavZIacl0 4=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.90,208,1643670000"; d="scan'208";a="28011246" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2022 22:02:01 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-guix@gnu.org Subject: =?utf-8?B?4oCcZmFrZWNocm9vdOKAnQ==?= execution engine =?utf-8?Q?d?= =?utf-8?Q?oesn=E2=80=99t?= work for Bash X-Debbugs-Cc: Philippe Swartvagher X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 24 Mar 2022 22:02:00 +0100 Message-ID: <87sfr79i9j.fsf@inria.fr> 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 Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello! The =E2=80=9Cfakechroot=E2=80=9D engine fails when applied to =E2=80=98bash= =E2=80=99: --8<---------------cut here---------------start------------->8--- $ guix pack -RR bash -S /bin=3Dbin=20 /gnu/store/mnbmklbvd1pk7yby0k8h26msk6z11m1m-bash-tarball-pack.tar.gz $ (cd /tmp/pack; tar xf /gnu/store/mnbmklbvd1pk7yby0k8h26msk6z11m1m-bash-ta= rball-pack.tar.gz) $ unshare -mrf sh -c 'mount -t tmpfs -o ro none /gnu/store; GUIX_EXECUTION_= ENGINE=3Dfakechroot /tmp/pack/bin/bash --version' /tmp/pack/gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin//bash: = out of memory to store relocation results for /tmp/pack/bin/bash --8<---------------cut here---------------end--------------->8--- The message comes from ld.so. My guess is that the problem comes from Bash=E2=80=99s terrible =E2=80=98malloc=E2=80=99 replacement: --8<---------------cut here---------------start------------->8--- $ objdump -T /gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/bas= h | grep malloc 00000000004ae6f0 g DF .text 000000000000003b Base malloc_usable_= size 00000000004ae850 g DF .text 0000000000000009 Base malloc 0000000000484e70 g DF .text 000000000000005b Base xmalloc 00000000004ee020 g DO .bss 0000000000000004 Base malloc_trace_at= _exit 00000000004e8c24 g DO .data 0000000000000004 Base malloc_mmap_th= reshold 0000000000484f70 g DF .text 00000000000000dd Base sh_xmalloc 00000000004f7a04 g DO .bss 0000000000000004 Base malloc_trace 00000000004f7a08 g DO .bss 0000000000000004 Base malloc_flags 00000000004ae730 g DF .text 0000000000000005 Base sh_malloc 00000000004f7a00 g DO .bss 0000000000000004 Base malloc_register 00000000004ae660 g DF .text 000000000000000c Base _malloc_unbloc= k_signals 00000000004ae630 g DF .text 000000000000002e Base _malloc_block_= signals --8<---------------cut here---------------end--------------->8--- [Time passes=E2=80=A6] I confirmed this hypothesis by running: guix pack -RR -S /bin=3Dbin -m manifest.scm on this manifest: --8<---------------cut here---------------start------------->8--- (use-modules (guix) (guix utils) (guix profiles) (gnu packages bash)) (define bash-sans-malloc (package/inherit bash (name "bash-sans-malloc") (arguments (substitute-keyword-arguments (package-arguments bash) ((#:configure-flags flags ''()) `(cons "--without-bash-malloc" ,flags)))))) (packages->manifest (list bash-sans-malloc)) --8<---------------cut here---------------end--------------->8--- Works just fine: --8<---------------cut here---------------start------------->8--- $ unshare -mrf sh -c 'mount -t tmpfs -o ro none /gnu/store; GUIX_EXECUTION_= ENGINE=3Dfakechroot /tmp/pack/bin/bash --version' GNU bash, version 5.1.8(1)-release (x86_64-unknown-linux-gnu) Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. --8<---------------cut here---------------end--------------->8--- So in the end, it=E2=80=99s a bug report that=E2=80=99s kinda closed alread= y. Perhaps we should build Bash =E2=80=98--without-bash-malloc=E2=80=99 uncond= itionally in =E2=80=98core-updates=E2=80=99? The =E2=80=98INSTALL=E2=80=99 file reads: --8<---------------cut here---------------start------------->8--- '--with-bash-malloc' Use the Bash version of 'malloc' in the directory 'lib/malloc'. This is not the same 'malloc' that appears in GNU libc, but an older version originally derived from the 4.2 BSD 'malloc'. This 'malloc' is very fast, but wastes some space on each allocation. This option is enabled by default. The 'NOTES' file contains a list of systems for which this should be turned off, and 'configure' disables this option automatically for a number of systems. --8<---------------cut here---------------end--------------->8--- There might be other options if we want to keep it, such as changing the ELF visibility of those symbols, but I wonder if it=E2=80=99s worth the eff= ort. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 25 06:16:23 2022 Received: (at 54557) by debbugs.gnu.org; 25 Mar 2022 10:16:23 +0000 Received: from localhost ([127.0.0.1]:50169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXgzW-0002dd-If for submit@debbugs.gnu.org; Fri, 25 Mar 2022 06:16:23 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:1388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXgzU-0002dN-E4 for 54557@debbugs.gnu.org; Fri, 25 Mar 2022 06:16:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=yPlWNq6M9NEgfOW8znXA75rxE+tfQg59HxR0oSK9NgA=; b=pUAx2XASFbhA76unymsbYT7AjRTkPkj18Y1QhoG/N8vJPpbQP9l5Pm5j stXFXF/HZqQuFiWOIX/fz9m9nIpL1j93OyKyqxMHcD85u8AfUjU1Yrhhe byeB/fvy2acT50S5IGfNFhpZ53AJqa/AlYwPs+ubaTQAzqWJD4KzsWqAA o=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=philippe.swartvagher@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.90,209,1643670000"; d="scan'208";a="28102104" Received: from nat-eduroam-36-gw-01-bso.bordeaux.inria.fr (HELO [10.204.6.92]) ([194.199.1.36]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2022 11:16:13 +0100 Message-ID: Date: Fri, 25 Mar 2022 11:16:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: =?UTF-8?B?UmU6IGJ1ZyM1NDU1Nzog4oCcZmFrZWNocm9vdOKAnSBleGVjdXRpb24g?= =?UTF-8?Q?engine_doesn=e2=80=99t_work_for_Bash?= Content-Language: fr To: 54557@debbugs.gnu.org References: <87sfr79i9j.fsf@inria.fr> From: Philippe SWARTVAGHER In-Reply-To: <87sfr79i9j.fsf@inria.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54557 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Le 24/03/2022 à 22:02, Ludovic Courtès a écrit : > Hello! > > The “fakechroot” engine fails when applied to ‘bash’: > > --8<---------------cut here---------------start------------->8--- > $ guix pack -RR bash -S /bin=bin > /gnu/store/mnbmklbvd1pk7yby0k8h26msk6z11m1m-bash-tarball-pack.tar.gz > $ (cd /tmp/pack; tar xf /gnu/store/mnbmklbvd1pk7yby0k8h26msk6z11m1m-bash-tarball-pack.tar.gz) > $ unshare -mrf sh -c 'mount -t tmpfs -o ro none /gnu/store; GUIX_EXECUTION_ENGINE=fakechroot /tmp/pack/bin/bash --version' > /tmp/pack/gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin//bash: out of memory to store relocation results for /tmp/pack/bin/bash > --8<---------------cut here---------------end--------------->8--- > > The message comes from ld.so. My guess is that the problem comes from > Bash’s terrible ‘malloc’ replacement: > > --8<---------------cut here---------------start------------->8--- > $ objdump -T /gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/bash | grep malloc > 00000000004ae6f0 g DF .text 000000000000003b Base malloc_usable_size > 00000000004ae850 g DF .text 0000000000000009 Base malloc > 0000000000484e70 g DF .text 000000000000005b Base xmalloc > 00000000004ee020 g DO .bss 0000000000000004 Base malloc_trace_at_exit > 00000000004e8c24 g DO .data 0000000000000004 Base malloc_mmap_threshold > 0000000000484f70 g DF .text 00000000000000dd Base sh_xmalloc > 00000000004f7a04 g DO .bss 0000000000000004 Base malloc_trace > 00000000004f7a08 g DO .bss 0000000000000004 Base malloc_flags > 00000000004ae730 g DF .text 0000000000000005 Base sh_malloc > 00000000004f7a00 g DO .bss 0000000000000004 Base malloc_register > 00000000004ae660 g DF .text 000000000000000c Base _malloc_unblock_signals > 00000000004ae630 g DF .text 000000000000002e Base _malloc_block_signals > --8<---------------cut here---------------end--------------->8--- > > [Time passes…] I confirmed this hypothesis by running: > > guix pack -RR -S /bin=bin -m manifest.scm > > on this manifest: > > --8<---------------cut here---------------start------------->8--- > (use-modules (guix) (guix utils) > (guix profiles) > (gnu packages bash)) > > (define bash-sans-malloc > (package/inherit bash > (name "bash-sans-malloc") > (arguments > (substitute-keyword-arguments (package-arguments bash) > ((#:configure-flags flags ''()) > `(cons "--without-bash-malloc" ,flags)))))) > > (packages->manifest (list bash-sans-malloc)) > --8<---------------cut here---------------end--------------->8--- > > Works just fine: > > --8<---------------cut here---------------start------------->8--- > $ unshare -mrf sh -c 'mount -t tmpfs -o ro none /gnu/store; GUIX_EXECUTION_ENGINE=fakechroot /tmp/pack/bin/bash --version' > GNU bash, version 5.1.8(1)-release (x86_64-unknown-linux-gnu) > Copyright (C) 2020 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > > This is free software; you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > --8<---------------cut here---------------end--------------->8--- > > So in the end, it’s a bug report that’s kinda closed already. > > Perhaps we should build Bash ‘--without-bash-malloc’ unconditionally in > ‘core-updates’? The ‘INSTALL’ file reads: > > --8<---------------cut here---------------start------------->8--- > '--with-bash-malloc' > Use the Bash version of 'malloc' in the directory 'lib/malloc'. > This is not the same 'malloc' that appears in GNU libc, but an > older version originally derived from the 4.2 BSD 'malloc'. This > 'malloc' is very fast, but wastes some space on each allocation. > This option is enabled by default. The 'NOTES' file contains a > list of systems for which this should be turned off, and > 'configure' disables this option automatically for a number of > systems. > --8<---------------cut here---------------end--------------->8--- > > There might be other options if we want to keep it, such as changing the > ELF visibility of those symbols, but I wonder if it’s worth the effort. > > Thoughts? > > Ludo’. Hello, FTR, the --without-bash-malloc is used in the Debian bash package: apt source bash cd bash-5.1/debian grep -Irn without-bash-malloc changelog:145:  * Configure the normal build --without-bash-malloc as well. changelog:1125:  * Configure the static build --without-bash-malloc. changelog:1462:  * Disable the GNU/kFreeBSD kludge (--without-bash-malloc). Closes: #234137. changelog:1546:  * Configure --without-bash-malloc on GNU/FreeBSD (closes: #194182). changelog:1739:  * Configure --without-bash-malloc. At least on hppa, this fixes an error, rules:79:    --without-bash-malloc This option is also advised in Linux From Scratch: https://www.linuxfromscratch.org/lfs/view/stable/chapter08/bash.html -- Philippe From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 25 23:03:22 2022 Received: (at 54557) by debbugs.gnu.org; 26 Mar 2022 03:03:22 +0000 Received: from localhost ([127.0.0.1]:52834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXwi2-0004BX-84 for submit@debbugs.gnu.org; Fri, 25 Mar 2022 23:03:22 -0400 Received: from mail-qv1-f45.google.com ([209.85.219.45]:33722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXwi0-0004BL-HS for 54557@debbugs.gnu.org; Fri, 25 Mar 2022 23:03:21 -0400 Received: by mail-qv1-f45.google.com with SMTP id gi14so7720418qvb.0 for <54557@debbugs.gnu.org>; Fri, 25 Mar 2022 20:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=RLuVGxFCMwQ075TgGLIJKZC8J/Lmr4IYK/wKAe3j8lw=; b=hOTgsPuZ+hQbOuo2a89P6W+Ha2IdWKQDa0TZaonHT5BrR90l7nEw09oclAG5jVsWT1 q04XY2AJxeYtSjgpCklfRaaHFYUweyRMKx7RS3F9dhYHMDI6eDvLIKh5E7+bau+GY0El ILtc6/B+6PE/pDAAEcbkZgwfiB52dz9uXPUgJ9n/+DmXCCazWB12luayqz511eNK2yMn Fb8e/JvwfhBAE8tAwM+YmcUtQrs1nc8gpsgHY1j1sZ4QWtdq4bOU0EeGSxU9OX/R3p1u ywp6Lywvs6kiF2pAIq3Td5iGLdgmF5+4dQ7PBFAKeBfU1NGQJSPkyrEgNMxQJlSaKIrR ZMIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=RLuVGxFCMwQ075TgGLIJKZC8J/Lmr4IYK/wKAe3j8lw=; b=NB1mTDePcrPm6Zc09aZY0l7BHguljEuiNF//wfLQAKyhSusNAVsBhjaFdPnb0Wm3Os CYR3jSAPMcDkgbvSZhuOlL2xoCBn0hwaXubC5/5NIL0MZ5k+E1VOCekDCrYcLcipILdZ wWmzZZ16m4PxLPnPstohJ/1ZmJEMH4dtwfSjwq1mOzcfsAXVj+Wy9OC+pHwtPoM/p/9u 78lguJBSdSNBUtLgVqW1eJ/r48+d+Qnst7aEIh1Q5Uk2HPMsQkA6BVuVTUnbGmqWBjtp oVUX044Rdc0Wi5XVpsJUqNEkXVfCD+8kdp/ufQvhdH4EHwHDUDQjvqGnMkI4tF2yWUuv IgBA== X-Gm-Message-State: AOAM533NGI9sb3kIWsAnE2HkAAGUzTr7kRZe/CmYYheosJE6Upc3Dem6 B1gqYhplpxioRY81tJWGU/Deza78hPM= X-Google-Smtp-Source: ABdhPJw/vx8KCSEPRcbDZHGZWfEM3y8cf7TncruBzipLzlVYi5EHNrfF2pMXsotAwk82zcKMaz+acA== X-Received: by 2002:ad4:5f8d:0:b0:441:4502:36b7 with SMTP id jp13-20020ad45f8d000000b00441450236b7mr11795314qvb.45.1648263794910; Fri, 25 Mar 2022 20:03:14 -0700 (PDT) Received: from hurd (dsl-157-48.b2b2c.ca. [66.158.157.48]) by smtp.gmail.com with ESMTPSA id b2-20020ac87fc2000000b002e1b9ddb629sm6360435qtk.47.2022.03.25.20.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 20:03:14 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#54557: =?utf-8?B?4oCcZmFrZWNocm9vdOKAnQ==?= execution engine =?utf-8?Q?doesn=E2=80=99t?= work for Bash References: <87sfr79i9j.fsf@inria.fr> Date: Fri, 25 Mar 2022 23:03:13 -0400 In-Reply-To: <87sfr79i9j.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Thu, 24 Mar 2022 22:02:00 +0100") Message-ID: <878rsxxvny.fsf@gmail.com> 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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54557 Cc: 54557@debbugs.gnu.org, Philippe Swartvagher X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: [...] > The message comes from ld.so. My guess is that the problem comes from > Bash=E2=80=99s terrible =E2=80=98malloc=E2=80=99 replacement: > [...] > [Time passes=E2=80=A6] I confirmed this hypothesis by running: > > guix pack -RR -S /bin=3Dbin -m manifest.scm > > on this manifest: > > (use-modules (guix) (guix utils) > (guix profiles) > (gnu packages bash)) > > (define bash-sans-malloc > (package/inherit bash > (name "bash-sans-malloc") > (arguments > (substitute-keyword-arguments (package-arguments bash) > ((#:configure-flags flags ''()) > `(cons "--without-bash-malloc" ,flags)))))) > > (packages->manifest (list bash-sans-malloc)) > > > Works just fine: > > $ unshare -mrf sh -c 'mount -t tmpfs -o ro none /gnu/store; GUIX_EXECUTIO= N_ENGINE=3Dfakechroot /tmp/pack/bin/bash --version' > GNU bash, version 5.1.8(1)-release (x86_64-unknown-linux-gnu) > Copyright (C) 2020 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later [...] > Perhaps we should build Bash =E2=80=98--without-bash-malloc=E2=80=99 unco= nditionally in > =E2=80=98core-updates=E2=80=99? The =E2=80=98INSTALL=E2=80=99 file reads: > > '--with-bash-malloc' > Use the Bash version of 'malloc' in the directory 'lib/malloc'. > This is not the same 'malloc' that appears in GNU libc, but an > older version originally derived from the 4.2 BSD 'malloc'. This > 'malloc' is very fast, but wastes some space on each allocation. > This option is enabled by default. The 'NOTES' file contains a > list of systems for which this should be turned off, and > 'configure' disables this option automatically for a number of > systems. > > There might be other options if we want to keep it, such as changing the > ELF visibility of those symbols, but I wonder if it=E2=80=99s worth the e= ffort. > > Thoughts? I'd be OK with --without-bash-malloc; it seems we'll pay a bit in terms of Bash performance in exchange for better memory usage. It also brings benefits such as solving this issue and may benefit from advances/bugfixes to glibc's malloc in the future, if there are any. Well done investigating! Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 28 02:59:18 2022 Received: (at 54557) by debbugs.gnu.org; 28 Mar 2022 06:59:18 +0000 Received: from localhost ([127.0.0.1]:57032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYjLS-0003o6-Gm for submit@debbugs.gnu.org; Mon, 28 Mar 2022 02:59:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYjLR-0003nt-Is for 54557@debbugs.gnu.org; Mon, 28 Mar 2022 02:59:18 -0400 Received: from [2001:470:142:3::e] (port=59020 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYjLL-00028V-K3; Mon, 28 Mar 2022 02:59:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=z0A+DGvWxKxI5e7Lkwixtbs+Vw3bIyBRJb7Fs1ntZL8=; b=LNCIUgVvT5OZCXAC14ig mVldPzzfrZNgZojZCJcKBAfo+zVUUQme3lhYON8lR9+aBh/X5J1bZx+2lkhCnnFvt5QkX2onDgcAD yOxEnymVMLKmzeV4yOlU5rokGK+ZGFC8uYYQ5E7BKKZMyOoe5AceqK14DvP692IsnzRWQ/N6R9JlI cxl/OJXVaCQya5Ef9mtrXOisl6nCP209RYk05KMCL6CJJy/Y3RHHh4h4fjUHWRRlLptMk0n47iTHm iX2oM3ArwMIvwnB08Yl8LES/JVoeDZwoGXPnhFollLcfEUdCczGrcChKJYhIjEVP2b6XHg8yQz3bz 79ZTiSnE/g0STA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56119 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYjLK-00052g-4M; Mon, 28 Mar 2022 02:59:11 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Philippe SWARTVAGHER Subject: Re: bug#54557: =?utf-8?B?4oCcZmFrZWNocm9vdOKAnQ==?= execution engine =?utf-8?Q?doesn=E2=80=99t?= work for Bash References: <87sfr79i9j.fsf@inria.fr> Date: Mon, 28 Mar 2022 08:59:07 +0200 In-Reply-To: (Philippe SWARTVAGHER's message of "Fri, 25 Mar 2022 11:16:13 +0100") Message-ID: <878rsu5zr8.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54557 Cc: 54557@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Philippe SWARTVAGHER skribis: > FTR, the --without-bash-malloc is used in the Debian bash package: > > apt source bash > > cd bash-5.1/debian > > grep -Irn without-bash-malloc > changelog:145:=C2=A0 * Configure the normal build --without-bash-malloc a= s well. > changelog:1125:=C2=A0 * Configure the static build --without-bash-malloc. > changelog:1462:=C2=A0 * Disable the GNU/kFreeBSD kludge > (--without-bash-malloc). Closes: #234137. > changelog:1546:=C2=A0 * Configure --without-bash-malloc on GNU/FreeBSD > (closes: #194182). > changelog:1739:=C2=A0 * Configure --without-bash-malloc. At least on hppa, > this fixes an error, > rules:79:=C2=A0=C2=A0=C2=A0 --without-bash-malloc > > > This option is also advised in Linux From Scratch: > https://www.linuxfromscratch.org/lfs/view/stable/chapter08/bash.html Good to know, thanks for sharing. I just realized that =E2=80=98bash-minimal=E2=80=99 in Guix already uses it= , so that=E2=80=99s another way to work around the =E2=80=98guix pack -RR=E2=80=99 issue at han= d. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 28 06:06:29 2022 Received: (at 54557-done) by debbugs.gnu.org; 28 Mar 2022 10:06:29 +0000 Received: from localhost ([127.0.0.1]:57340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYmGb-0000Dk-Lf for submit@debbugs.gnu.org; Mon, 28 Mar 2022 06:06:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYmGZ-0000DX-Ru for 54557-done@debbugs.gnu.org; Mon, 28 Mar 2022 06:06:28 -0400 Received: from [2001:470:142:3::e] (port=60972 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYmGU-0006sd-09; Mon, 28 Mar 2022 06:06:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=0sNVPS8gftvZ1eNWIGhhNId4HXWX5vIGJznJUMmhYZQ=; b=LTVsrjgGtMzz37lMM1FE 07CxFCqjbcEI5ywjMYqpNZCXEUtW3l2RyJ0RFbShBujVXCRh5LDSWTO2QRiBslrjWDfzZZmtLws1p KGC7bk9lkUxaIkzCMW66ESVa5Bz+pLuWlg17X253vzbi77uMaZHil2E5yndCHYqDRK0ztG0lUVVjl qHrfN96AOnq1ubNHdH9m43B2YVgqdw8kcFUb89jwif0W/35r/4Fhm0wJhtzuPB3hnoPvKwzjpy7Yx we2/1harLbYle4ufz8Nt2n7D2SqSsNvelAVkLJwsQ/vY78BTig93U1y/t6E7O5FlUs6pMWmB8w0H0 rZJJOJGoqvbAUA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50410 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYmGT-0000xr-KD; Mon, 28 Mar 2022 06:06:21 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#54557: =?utf-8?B?4oCcZmFrZWNocm9vdOKAnQ==?= execution engine =?utf-8?Q?doesn=E2=80=99t?= work for Bash References: <87sfr79i9j.fsf@inria.fr> <878rsxxvny.fsf@gmail.com> Date: Mon, 28 Mar 2022 12:06:20 +0200 In-Reply-To: <878rsxxvny.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 25 Mar 2022 23:03:13 -0400") Message-ID: <87r16m4cir.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54557-done Cc: 54557-done@debbugs.gnu.org, Philippe Swartvagher X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer skribis: > I'd be OK with --without-bash-malloc; it seems we'll pay a bit in terms > of Bash performance in exchange for better memory usage. It also brings > benefits such as solving this issue and may benefit from > advances/bugfixes to glibc's malloc in the future, if there are any. We might actually benefit from the improvements made in glibc=E2=80=99s mal= loc over the years (it=E2=80=99s more actively developed than that of Bash), who knows. Anyway, pushed to =E2=80=98core-updates=E2=80=99 as c6b5161e97ed1010d61331874b09c3231af3b1f9. Thanks, Ludo=E2=80=99. From unknown Sat Sep 20 08:01:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 25 Apr 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator