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 ms0.migadu.com with LMTPS id jGpALr6CPmINFAEAgWs5BA (envelope-from ) for ; Sat, 26 Mar 2022 04:04:30 +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 cLGLKr6CPmLVoAAA9RJhRA (envelope-from ) for ; Sat, 26 Mar 2022 04:04:30 +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 4FEB02E064 for ; Sat, 26 Mar 2022 04:04:30 +0100 (CET) Received: from localhost ([::1]:56434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXwj7-0007dM-6N for larch@yhetil.org; Fri, 25 Mar 2022 23:04:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXwig-0007dA-V7 for bug-guix@gnu.org; Fri, 25 Mar 2022 23:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58937) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXwig-0001yA-Mg for bug-guix@gnu.org; Fri, 25 Mar 2022 23:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nXwig-0004CV-Er for bug-guix@gnu.org; Fri, 25 Mar 2022 23:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#54557: =?UTF-8?Q?=E2=80=9Cfakechroot=E2=80=9D?= execution engine =?UTF-8?Q?doesn=E2=80=99t?= work for Bash Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 26 Mar 2022 03:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54557 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 54557-submit@debbugs.gnu.org id=B54557.164826380216096 (code B ref 54557); Sat, 26 Mar 2022 03:04:02 +0000 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 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?="'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-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: 54557@debbugs.gnu.org, Philippe Swartvagher Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648263870; 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=RLuVGxFCMwQ075TgGLIJKZC8J/Lmr4IYK/wKAe3j8lw=; b=EnG2fCkr8mpHrt8/Qjeu0iZLXedyLU02lgH/muH4EBAVKht5tiKncQSbfoYPXdlcTe9eli yXCHqijdT9UMWChUlSY1RbmTSje/LcEW3EGhUDQVWFvMiFYOz3JH/UnMSSwvV+8/fg656z KZ1rxg7MsYcR4eKvWA7qLZKQqSp52RlmVFJ7SiVOHXXh/S6YSR/N7xoJl76dNFwDO83tkl ya4roeWwt0avsF6RcG7qs6AEDcxgahzk/6ev1HaViZO1oGGx7pMkXlk7EzJCz5nYBlJx0H 3uq/AWmjywSDRwEOpusWE71evo2fgfvRxLxK4HARMV5ul5L+HEcbsnlIND48Ww== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648263870; a=rsa-sha256; cv=none; b=Mq2TvU2C2H1Uem2I9itPF9ImryuujrYDBslP5vLvtNfzjV8z7VIvZt4dr2C9ra6XV8kpZk rLQQv+v5Sdjw9oLQ4cvL4pglLGmZHyzaFjU2bvnz0g9R976D64CTB9sVQAt3Gl+KPXd3iV LwVo8LbElq0o9eZd3YUBZ3PIp3FxKMAk6Z5sz2iE472/gGAJ7U8p5jaQJXv+3EEPkwFjAZ BESQYk1nqtk501t4iikg6LxI1xIvMLmtPYsByz2Xkx+caFm2fwnWPZv6q/nlLG0SHrXYQi MaZ1c3NahtaAxUpMfZTe6W4tLxOF3jOw0ZzutPHN5KQevOj5ow/Z47xFcYBgig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hOTgsPuZ; 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.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hOTgsPuZ; 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: 4FEB02E064 X-Spam-Score: 5.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: qSUrvWpIZf8g 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