From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 09:28:31 2020 Received: (at submit) by debbugs.gnu.org; 18 Sep 2020 13:28:31 +0000 Received: from localhost ([127.0.0.1]:41309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGRC-0000n9-HZ for submit@debbugs.gnu.org; Fri, 18 Sep 2020 09:28:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:47170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJGRA-0000mz-GE for submit@debbugs.gnu.org; Fri, 18 Sep 2020 09:28:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJGR9-00075o-Oi for bug-guix@gnu.org; Fri, 18 Sep 2020 09:28:28 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:49677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJGR4-0002NM-7i for bug-guix@gnu.org; Fri, 18 Sep 2020 09:28:27 -0400 X-IronPort-AV: E=Sophos;i="5.77,274,1596492000"; d="scan'208";a="468443874" 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/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 15:28:18 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Subject: Fakechroot execution engine can fail to find libraries X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Jour du Travail de =?utf-8?Q?l'Ann=C3=A9e?= 228 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: Fri, 18 Sep 2020 15:28:18 +0200 Message-ID: <87mu1nw6x9.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 08:00:04 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 (--) Using the =E2=80=98fakechroot=E2=80=99 execution engine of =E2=80=98guix pa= ck -RR=E2=80=99, I found a case where an executable=E2=80=99s NEEDED library is not found. --8<---------------cut here---------------start------------->8--- $ guix describe Generacio 159 Sep 18 2020 08:55:27 (nuna) guix 98b89f4 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 98b89f432103b66efacee0bcba41a94148b8e870 $ mkdir /tmp/fakechroot-test $ (cd /tmp/fakechroot-test; tar xf $(guix pack -RR openmpi -S /bin=3Dbin -v= 0)) $ unshare -m -U -r -f sh -c 'mount -t tmpfs none /gnu; echo /gnu/*; GUIX_EX= ECUTION_ENGINE=3Dfakechroot /tmp/fakechroot-test/bin/orterun' /gnu/* /tmp/fakechroot-test/gnu/store/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-openmpi-4.0= .5/bin//orterun: error while loading shared libraries: libevent_core-2.1.so= .7: cannot open shared object file: No such file or directory --8<---------------cut here---------------end--------------->8--- That library is in the RUNPATH of the original executable though: --8<---------------cut here---------------start------------->8--- $ objdump -x $(guix build openmpi)/bin/orterun | grep PATH objdump: Advertiment: '/gnu/store/3ign6b3i5ambjgqqiyman4mqw0wljlvl-openmpi-= 4.0.5-debug' =C3=A9s un directori RUNPATH /gnu/store/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-openmpi-= 4.0.5/lib:/gnu/store/xk22b03jb0c0b6vkadqbkr9d4556rwxh-hwloc-2.2.0-lib/lib:/= gnu/store/i1smdd4r44c5wwi03g40dvc6wfnqgdwq-libpciaccess-0.16/lib:/gnu/store= /c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib:/gnu/store/fa6wj5bxkj= 5ll1d7292a70knmyl7a0cr-glibc-2.31/lib:/gnu/store/01b4w3m6mp55y531kyi1g8shh7= 22kwqm-gcc-7.5.0-lib/lib:/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1= .2.11/lib:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc= /x86_64-unknown-linux-gnu/7.5.0/../../.. $ objdump -x $(guix build openmpi)/bin/orterun | grep NEED.*libevent objdump: Advertiment: '/gnu/store/3ign6b3i5ambjgqqiyman4mqw0wljlvl-openmpi-= 4.0.5-debug' =C3=A9s un directori NEEDED libevent_core-2.1.so.7 NEEDED libevent_pthreads-2.1.so.7 --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 11:54:06 2020 Received: (at control) by debbugs.gnu.org; 18 Sep 2020 15:54:06 +0000 Received: from localhost ([127.0.0.1]:44244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIi6-0005ed-HE for submit@debbugs.gnu.org; Fri, 18 Sep 2020 11:54:06 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:58123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIi5-0005dz-F9 for control@debbugs.gnu.org; Fri, 18 Sep 2020 11:54:05 -0400 X-IronPort-AV: E=Sophos;i="5.77,274,1596492000"; d="scan'208";a="359434425" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 17:53:58 +0200 Date: Fri, 18 Sep 2020 17:53:57 +0200 Message-Id: <87lfh7w06i.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #43491 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: control 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: -5.0 (-----) severity 43491 important quit From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 12:05:08 2020 Received: (at 43491) by debbugs.gnu.org; 18 Sep 2020 16:05:08 +0000 Received: from localhost ([127.0.0.1]:44264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIsl-00087v-IA for submit@debbugs.gnu.org; Fri, 18 Sep 2020 12:05:08 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:58686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJIsj-00087K-M6 for 43491@debbugs.gnu.org; Fri, 18 Sep 2020 12:05:06 -0400 X-IronPort-AV: E=Sophos;i="5.77,274,1596492000"; d="scan'208";a="359435447" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 18:04:58 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 43491@debbugs.gnu.org Subject: Re: bug#43491: Fakechroot execution engine can fail to find libraries References: <87mu1nw6x9.fsf@inria.fr> Date: Fri, 18 Sep 2020 18:04:58 +0200 In-Reply-To: <87mu1nw6x9.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Fri, 18 Sep 2020 15:28:18 +0200") Message-ID: <87d02jvzo5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 43491 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: -6.0 (------) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > $ guix describe > Generacio 159 Sep 18 2020 08:55:27 (nuna) > guix 98b89f4 > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 98b89f432103b66efacee0bcba41a94148b8e870 > $ mkdir /tmp/fakechroot-test > $ (cd /tmp/fakechroot-test; tar xf $(guix pack -RR openmpi -S /bin=3Dbin = -v0)) > $ unshare -m -U -r -f sh -c 'mount -t tmpfs none /gnu; echo /gnu/*; GUIX_= EXECUTION_ENGINE=3Dfakechroot /tmp/fakechroot-test/bin/orterun' > /gnu/* > /tmp/fakechroot-test/gnu/store/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-openmpi-4= .0.5/bin//orterun: error while loading shared libraries: libevent_core-2.1.= so.7: cannot open shared object file: No such file or directory If we look at the LD_DEBUG=3Dall output, we see that /gnu/store/=E2=80=A6libevent-2.11.1/lib has disappeared from the search pat= h at the point where ld.so looks for libevent_core.so: --8<---------------cut here---------------start------------->8--- 15220: file=3Dlibevent_core-2.1.so.7 [0]; needed by /tmp/openmpi/gnu/= store/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-openmpi-4.0.5/bin//orterun [0] 15220: find library=3Dlibevent_core-2.1.so.7 [0]; searching 15220: search path=3D/tmp/openmpi/gnu/store/fa6wj5bxkj5ll1d7292a70knm= yl7a0cr-glibc-2.31/lib:/tmp/openmpi/gnu/store/01b4w3m6mp55y531kyi1g8shh722k= wqm-gcc-7.5.0-lib/lib:/tmp/openmpi/gnu/store:/tmp/openmpi/gnu/store/01b4w3m= 6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.= 5.0/../../.. (LD_LIBRARY_PATH) 15220: trying file=3D/tmp/openmpi/gnu/store/fa6wj5bxkj5ll1d7292a70kn= myl7a0cr-glibc-2.31/lib/libevent_core-2.1.so.7 15220: trying file=3D/tmp/openmpi/gnu/store/01b4w3m6mp55y531kyi1g8sh= h722kwqm-gcc-7.5.0-lib/lib/libevent_core-2.1.so.7 15220: trying file=3D/tmp/openmpi/gnu/store/libevent_core-2.1.so.7 15220: trying file=3D/tmp/openmpi/gnu/store/01b4w3m6mp55y531kyi1g8sh= h722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../libe= vent_core-2.1.so.7 15220: search path=3D/gnu/store/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-open= mpi-4.0.5/lib:/gnu/store/xk22b03jb0c0b6vkadqbkr9d4556rwxh-hwloc-2.2.0-lib/l= ib:/gnu/store/i1smdd4r44c5wwi03g40dvc6wfnqgdwq-libpciaccess-0.16/lib (RUNP= ATH from file /tmp/openmpi/gnu/store/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-openm= pi-4.0.5/bin//orterun) 15220: trying file=3D/gnu/store/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-ope= nmpi-4.0.5/lib/libevent_core-2.1.so.7 15220: trying file=3D/gnu/store/xk22b03jb0c0b6vkadqbkr9d4556rwxh-hwl= oc-2.2.0-lib/lib/libevent_core-2.1.so.7 15220: trying file=3D/gnu/store/i1smdd4r44c5wwi03g40dvc6wfnqgdwq-lib= pciaccess-0.16/lib/libevent_core-2.1.so.7 15220: search path=3D (system search path) 15220: search path=3D/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib= -1.2.11/lib:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/g= cc/x86_64-unknown-linux-gnu/7.5.0/../../../tls/haswell/x86_64:/gnu/store/01= b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-g= nu/7.5.0/../../../tls/haswell:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-g= cc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../tls/x86_64:/gn= u/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unkno= wn-linux-gnu/7.5.0/../../../tls:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm= -gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../haswell/x86_= 64:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64= -unknown-linux-gnu/7.5.0/../../../haswell:/gnu/store/01b4w3m6mp55y531kyi1g8= shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../x8= 6_64:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_= 64-unknown-linux-gnu/7.5.0/../../.. (RUNPATH from file /tmp/openmpi/gnu/st= ore/rm1d9z3z3iwsv779vqlg7q5z7pdk5k12-openmpi-4.0.5/bin//orterun) 15220: trying file=3D/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zli= b-1.2.11/lib/libevent_core-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../tls/haswell/x86_= 64/libevent_core-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../tls/haswell/libe= vent_core-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../tls/x86_64/libev= ent_core-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../tls/libevent_cor= e-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../haswell/x86_64/l= ibevent_core-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../haswell/libevent= _core-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../x86_64/libevent_= core-2.1.so.7 15220: trying file=3D/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc= -7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../libevent_core-2.= 1.so.7 15220: search path=3D (system search path) --8<---------------cut here---------------end--------------->8--- IIUC, the only way a search path entry can =E2=80=9Cdisappear=E2=80=9D is i= f ld.so marks it as =E2=80=9Cnonexisting=E2=80=9D, as per dl-load.c: --8<---------------cut here---------------start------------->8--- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) _dl_debug_printf (" trying file=3D%s\n", buf); fd =3D open_verify (buf, -1, fbp, loader, whatcode, mode, found_other_class, false); if (this_dir->status[cnt] =3D=3D unknown) { if (fd !=3D -1) this_dir->status[cnt] =3D existing; /* Do not update the directory information when loading auditing code. We must try to disturb the program as little as possible. */ else if (loader =3D=3D NULL || GL(dl_ns)[loader->l_ns]._ns_loaded->l_auditing =3D=3D 0) { /* We failed to open machine dependent library. Let's test whether there is any directory at all. */ struct stat64 st; buf[buflen - namelen - 1] =3D '\0'; if (__xstat64 (_STAT_VER, buf, &st) !=3D 0 || ! S_ISDIR (st.st_mode)) /* The directory does not exist or it is no directory. */ this_dir->status[cnt] =3D nonexisting; else this_dir->status[cnt] =3D existing; } } --8<---------------cut here---------------end--------------->8--- Indeed, we can see =E2=80=98stat=E2=80=99 calls passed raw /gnu/store file = names from RUNPATH entries (instead of /tmp/fakechroot-test/gnu/store), suggesting that =E2=80=98la_objsearch=E2=80=99 didn=E2=80=99t have a chance to rewrite= them: --8<---------------cut here---------------start------------->8--- 18952 openat(AT_FDCWD, "/tmp/fakechroot-test/gnu/store/01b4w3m6mp55y531kyi1= g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../../= libz.so.1", O_RDONLY|O_CLOEXEC) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne= ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/rm1d9z3z3iwsv779vql= g7q5z7pdk5k12-openmpi-4.0.5/lib/libz.so.1", O_RDONLY|O_CLOEXEC) =3D -1 ENOE= NT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/xk22b03jb0c0b6vkadq= bkr9d4556rwxh-hwloc-2.2.0-lib/lib/libz.so.1", O_RDONLY|O_CLOEXEC) =3D -1 EN= OENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/i1smdd4r44c5wwi03g4= 0dvc6wfnqgdwq-libpciaccess-0.16/lib/libz.so.1", O_RDONLY|O_CLOEXEC) =3D -1 = ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/c7wscymmk379v16invi= 8m68f6v5c8gsv-libevent-2.1.11/lib/tls/haswell/x86_64/libz.so.1", O_RDONLY|O= _CLOEXEC) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 stat("/gnu/store/c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib= /tls/haswell/x86_64", 0x7ffc99e48700) =3D -1 ENOENT (Dosiero a=C5=AD dosier= ujo ne ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/c7wscymmk379v16invi= 8m68f6v5c8gsv-libevent-2.1.11/lib/tls/haswell/libz.so.1", O_RDONLY|O_CLOEXE= C) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 stat("/gnu/store/c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib= /tls/haswell", 0x7ffc99e48700) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne = ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/c7wscymmk379v16invi= 8m68f6v5c8gsv-libevent-2.1.11/lib/tls/x86_64/libz.so.1", O_RDONLY|O_CLOEXEC= ) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 stat("/gnu/store/c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib= /tls/x86_64", 0x7ffc99e48700) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne e= kzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/c7wscymmk379v16invi= 8m68f6v5c8gsv-libevent-2.1.11/lib/tls/libz.so.1", O_RDONLY|O_CLOEXEC) =3D -= 1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 stat("/gnu/store/c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib= /tls", 0x7ffc99e48700) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/c7wscymmk379v16invi= 8m68f6v5c8gsv-libevent-2.1.11/lib/haswell/x86_64/libz.so.1", O_RDONLY|O_CLO= EXEC) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 stat("/gnu/store/c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib= /haswell/x86_64", 0x7ffc99e48700) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo = ne ekzistas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/c7wscymmk379v16invi= 8m68f6v5c8gsv-libevent-2.1.11/lib/haswell/libz.so.1", O_RDONLY|O_CLOEXEC) = =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 stat("/gnu/store/c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib= /haswell", 0x7ffc99e48700) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzi= stas) 18952 openat(AT_FDCWD, "/tmp/guix-exec-3Y7bac/gnu/store/c7wscymmk379v16invi= 8m68f6v5c8gsv-libevent-2.1.11/lib/x86_64/libz.so.1", O_RDONLY|O_CLOEXEC) = =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzistas) 18952 stat("/gnu/store/c7wscymmk379v16invi8m68f6v5c8gsv-libevent-2.1.11/lib= /x86_64", 0x7ffc99e48700) =3D -1 ENOENT (Dosiero a=C5=AD dosierujo ne ekzis= tas) --8<---------------cut here---------------end--------------->8--- My guess is that after these =E2=80=98stat=E2=80=99 calls, the libevent dir= ectory is marked as non-existing and is skipped from then on, hence the failure. Does that make sense? The patch below fixes the issue for this particular example by simply passing the whole RUNPATH of the wrapped executable as =E2=80=98--library-p= ath=E2=80=99, as was the case in v1 of the patch set=C2=B9. (This assumes that the RUNPA= TH of pack-audit.so is a subset of that of the program, which is usually the case.) Thanks, Ludo=E2=80=99. =C2=B9 https://issues.guix.gnu.org/41189#3 --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 379e6a3ac6..6355b99252 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -820,8 +820,7 @@ last resort for relocation." (string-append "-DLOADER_AUDIT_RUNPATH={ " (string-join (map object->string - (runpath - #$(audit-module))) + (runpath program)) ", " 'suffix) "NULL }") (if gconv --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 19 11:45:35 2020 Received: (at 43491) by debbugs.gnu.org; 19 Sep 2020 15:45:35 +0000 Received: from localhost ([127.0.0.1]:47836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJf3P-0003Ib-8I for submit@debbugs.gnu.org; Sat, 19 Sep 2020 11:45:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJf3M-0003IN-Ng for 43491@debbugs.gnu.org; Sat, 19 Sep 2020 11:45:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46676) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJf3H-0005Ql-De for 43491@debbugs.gnu.org; Sat, 19 Sep 2020 11:45:27 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48230 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kJf36-0003mi-Ew for 43491@debbugs.gnu.org; Sat, 19 Sep 2020 11:45:23 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 43491@debbugs.gnu.org Subject: Re: bug#43491: Fakechroot execution engine can fail to find libraries References: <87mu1nw6x9.fsf@inria.fr> <87d02jvzo5.fsf@gnu.org> Date: Sat, 19 Sep 2020 17:45:13 +0200 In-Reply-To: <87d02jvzo5.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 18 Sep 2020 18:04:58 +0200") Message-ID: <87k0wprcs6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 43491 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 (---) Ludovic Court=C3=A8s skribis: > Indeed, we can see =E2=80=98stat=E2=80=99 calls passed raw /gnu/store fil= e names from > RUNPATH entries (instead of /tmp/fakechroot-test/gnu/store), suggesting > that =E2=80=98la_objsearch=E2=80=99 didn=E2=80=99t have a chance to rewri= te them: This is probably an ld.so bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D26634 Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 05:49:18 2020 Received: (at 43491) by debbugs.gnu.org; 24 Sep 2020 09:49:18 +0000 Received: from localhost ([127.0.0.1]:38643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLNsL-0000y4-Mg for submit@debbugs.gnu.org; Thu, 24 Sep 2020 05:49:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLNsJ-0000xq-HB for 43491@debbugs.gnu.org; Thu, 24 Sep 2020 05:49:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58466) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLNsE-0000oV-79 for 43491@debbugs.gnu.org; Thu, 24 Sep 2020 05:49:10 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55882 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kLNsD-0001y6-PL for 43491@debbugs.gnu.org; Thu, 24 Sep 2020 05:49:09 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 43491@debbugs.gnu.org Subject: Re: bug#43491: Fakechroot execution engine can fail to find libraries References: <87mu1nw6x9.fsf@inria.fr> <87d02jvzo5.fsf@gnu.org> <87k0wprcs6.fsf@gnu.org> Date: Thu, 24 Sep 2020 11:49:07 +0200 In-Reply-To: <87k0wprcs6.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 19 Sep 2020 17:45:13 +0200") Message-ID: <87v9g3a4j0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43491 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 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > Ludovic Court=C3=A8s skribis: > >> Indeed, we can see =E2=80=98stat=E2=80=99 calls passed raw /gnu/store fi= le names from >> RUNPATH entries (instead of /tmp/fakechroot-test/gnu/store), suggesting >> that =E2=80=98la_objsearch=E2=80=99 didn=E2=80=99t have a chance to rewr= ite them: > > This is probably an ld.so bug: > > https://sourceware.org/bugzilla/show_bug.cgi?id=3D26634 The patch below provides a fix/workaround for glibc, confirming the hypothesis above. (I don=E2=80=99t think we should apply this patch though, rather we=E2=80=99ll work around the issue in =E2=80=98guix pack=E2=80=99.) Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index c83775d8ee..fa4da801af 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -685,6 +685,7 @@ the store.") (package (name "glibc") (version "2.31") + (replacement glibc-2.31/fixed) (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) @@ -933,6 +934,15 @@ with the Linux kernel.") (license lgpl2.0+) (home-page "https://www.gnu.org/software/libc/"))) +(define-public glibc-2.31/fixed + (package + (inherit glibc) + (version "2.3A") + (source (origin + (inherit (package-source glibc)) + (patches (append (search-patches "glibc-audit-stat.patch") + (origin-patches (package-source glibc)))))))) + ;; Below are old libc versions, which we use mostly to build locale data in ;; the old format (which the new libc cannot cope with.) --- /dev/null +++ b/gnu/packages/patches/glibc-audit-stat.patch @@ -0,0 +1,126 @@ +diff --git a/elf/dl-load.c b/elf/dl-load.c +index a6b80f9395..9daa32f76b 100644 +--- a/elf/dl-load.c ++++ b/elf/dl-load.c +@@ -1461,11 +1461,15 @@ print_search_path (struct r_search_path_elem **list, + user might want to know about this. + + If FD is not -1, then the file is already open and FD refers to it. +- In that case, FD is consumed for both successful and error returns. */ ++ In that case, FD is consumed for both successful and error returns. ++ ++ Set *CHANGED_BY_AUDIT to true if the audit module provided a file name ++ different from NAME. */ + static int + open_verify (const char *name, int fd, + struct filebuf *fbp, struct link_map *loader, +- int whatcode, int mode, bool *found_other_class, bool free_name) ++ int whatcode, int mode, bool *found_other_class, bool free_name, ++ bool *changed_by_audit) + { + /* This is the expected ELF header. */ + #define ELF32_CLASS ELFCLASS32 +@@ -1500,6 +1504,8 @@ open_verify (const char *name, int fd, + const char *errstring = NULL; + int errval = 0; + ++ *changed_by_audit = false; ++ + #ifdef SHARED + /* Give the auditing libraries a chance. */ + if (__glibc_unlikely (GLRO(dl_naudit) > 0) && whatcode != 0 +@@ -1521,12 +1527,19 @@ open_verify (const char *name, int fd, + afct = afct->next; + } + +- if (fd != -1 && name != original_name && strcmp (name, original_name)) ++ if (name != original_name && strcmp (name, original_name)) + { +- /* An audit library changed what we're supposed to open, +- so FD no longer matches it. */ +- __close_nocancel (fd); +- fd = -1; ++ /* Tell the caller we're looking at something different from ++ ORIGINAL_NAME. */ ++ *changed_by_audit = true; ++ ++ if (fd != -1) ++ { ++ /* An audit library changed what we're supposed to open, so FD ++ no longer matches it. */ ++ __close_nocancel (fd); ++ fd = -1; ++ } + } + } + #endif +@@ -1782,6 +1795,7 @@ open_path (const char *name, size_t namelen, int mode, + char *edp; + int here_any = 0; + int err; ++ bool changed_by_audit; + + /* If we are debugging the search for libraries print the path + now if it hasn't happened now. */ +@@ -1810,16 +1824,19 @@ open_path (const char *name, size_t namelen, int mode, + _dl_debug_printf (" trying file=%s\n", buf); + + fd = open_verify (buf, -1, fbp, loader, whatcode, mode, +- found_other_class, false); ++ found_other_class, false, ++ &changed_by_audit); + if (this_dir->status[cnt] == unknown) + { + if (fd != -1) + this_dir->status[cnt] = existing; + /* Do not update the directory information when loading + auditing code. We must try to disturb the program as +- little as possible. */ +- else if (loader == NULL +- || GL(dl_ns)[loader->l_ns]._ns_loaded->l_auditing == 0) ++ little as possible. Additionally, if the audit module ++ change the file name, keep directory information as is. */ ++ else if ((loader == NULL ++ || GL(dl_ns)[loader->l_ns]._ns_loaded->l_auditing == 0) ++ && !changed_by_audit) + { + /* We failed to open machine dependent library. Let's + test whether there is any directory at all. */ +@@ -2064,10 +2081,11 @@ _dl_map_object (struct link_map *loader, const char *name, + realname = _dl_sysdep_open_object (name, namelen, &fd); + if (realname != NULL) + { ++ bool changed_by_audit; + fd = open_verify (realname, fd, + &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded, + LA_SER_CONFIG, mode, &found_other_class, +- false); ++ false, &changed_by_audit); + if (fd == -1) + free (realname); + } +@@ -2118,10 +2136,11 @@ _dl_map_object (struct link_map *loader, const char *name, + + if (cached != NULL) + { ++ bool changed_by_audit; + fd = open_verify (cached, -1, + &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded, + LA_SER_CONFIG, mode, &found_other_class, +- false); ++ false, &changed_by_audit); + if (__glibc_likely (fd != -1)) + realname = cached; + else +@@ -2153,9 +2172,10 @@ _dl_map_object (struct link_map *loader, const char *name, + fd = -1; + else + { ++ bool changed_by_audit; + fd = open_verify (realname, -1, &fb, + loader ?: GL(dl_ns)[nsid]._ns_loaded, 0, mode, +- &found_other_class, true); ++ &found_other_class, true, &changed_by_audit); + if (__glibc_unlikely (fd == -1)) + free (realname); + } --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 06:54:06 2020 Received: (at 43491-done) by debbugs.gnu.org; 1 Oct 2020 10:54:07 +0000 Received: from localhost ([127.0.0.1]:34248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNwDu-0003CJ-M7 for submit@debbugs.gnu.org; Thu, 01 Oct 2020 06:54:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNwDt-0003Bj-6h for 43491-done@debbugs.gnu.org; Thu, 01 Oct 2020 06:54:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52431) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNwDn-0004JT-Ts for 43491-done@debbugs.gnu.org; Thu, 01 Oct 2020 06:53:59 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37508 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kNwDn-0006xH-Hb for 43491-done@debbugs.gnu.org; Thu, 01 Oct 2020 06:53:59 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 43491-done@debbugs.gnu.org Subject: Re: bug#43491: Fakechroot execution engine can fail to find libraries References: <87mu1nw6x9.fsf@inria.fr> <87d02jvzo5.fsf@gnu.org> Date: Thu, 01 Oct 2020 12:53:58 +0200 In-Reply-To: <87d02jvzo5.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 18 Sep 2020 18:04:58 +0200") Message-ID: <87mu16tdx5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 43491-done 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, Ludovic Court=C3=A8s skribis: > The patch below fixes the issue for this particular example by simply > passing the whole RUNPATH of the wrapped executable as =E2=80=98--library= -path=E2=80=99, > as was the case in v1 of the patch set=C2=B9. (This assumes that the RUN= PATH > of pack-audit.so is a subset of that of the program, which is usually > the case.) I pushed this as a workaround as commit 58abd5873985e0cd9a2926867bf697c5e7bc01f9. The ld.so issue is still open but there seems to be consensus that it=E2=80= =99s a bug: . Closing! Ludo=E2=80=99. From unknown Mon Aug 18 06:58:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Oct 2020 11:24:09 +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 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 12:58:46 2023 Received: (at control) by debbugs.gnu.org; 17 Mar 2023 16:58:46 +0000 Received: from localhost ([127.0.0.1]:45498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdDPh-00069h-TH for submit@debbugs.gnu.org; Fri, 17 Mar 2023 12:58:46 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:21590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdDPf-00069H-9f for control@debbugs.gnu.org; Fri, 17 Mar 2023 12:58:43 -0400 Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludo@gnu.org; dmarc=fail (p=none dis=none) d=gnu.org X-IronPort-AV: E=Sophos;i="5.98,268,1673910000"; d="scan'208";a="97818337" Received: from unknown (HELO ribbon) ([193.50.110.213]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2023 17:58:36 +0100 Date: Fri, 17 Mar 2023 17:58:36 +0100 Message-Id: <87zg8bwc03.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #43491 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: control 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 (--) unarchive 43491 quit From unknown Mon Aug 18 06:58:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Fri, 17 Mar 2023 16:59:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 13:03:41 2023 Received: (at 43491) by debbugs.gnu.org; 17 Mar 2023 17:03:42 +0000 Received: from localhost ([127.0.0.1]:45513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdDUT-0000Ir-EY for submit@debbugs.gnu.org; Fri, 17 Mar 2023 13:03:41 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:9284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdDUP-0000IR-LA for 43491@debbugs.gnu.org; Fri, 17 Mar 2023 13:03:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:references:date:in-reply-to:message-id: mime-version:content-transfer-encoding; bh=cWpIqrAGHaHYH/7ETdJyOgVMljzyG3sgkNwCjPT1be8=; b=uQ1lm/E6Lxc74eUaVWE9Jijzp+Snfcf9dF7z4QsBcC0pzdIoJFshUosw mte+2D3fhQeEvncmdWG8kuQC1TR5o85wPybnmy2jGiufw6FBe+6YZg38E OGLOwkLn1YJbb2wo9jYxBy1UPPKoVlk/VIF3caTwCJSJ2FM04Ik1FAQN2 Q=; 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.98,268,1673910000"; d="scan'208";a="97818969" Received: from unknown (HELO ribbon) ([193.50.110.213]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2023 18:03:30 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 43491@debbugs.gnu.org Subject: Re: bug#43491: Fakechroot execution engine can fail to find libraries References: <87mu16tdx5.fsf@gnu.org> <87mu1nw6x9.fsf@inria.fr> Date: Fri, 17 Mar 2023 18:03:31 +0100 In-Reply-To: (GNU bug Tracking System's message of "Thu, 01 Oct 2020 10:55:02 +0000") Message-ID: <87lejvwbrw.fsf_-_@gnu.org> 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43491 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 (---) Reopening this old bug from this commit: --8<---------------cut here---------------start------------->8--- $ guix describe Generation 250 Mar 12 2023 23:58:03 (current) guix 1ed227d repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 1ed227d7952af48efe50a2f6c9537e17c356daa1 --8<---------------cut here---------------end--------------->8--- > I pushed this as a workaround as commit > 58abd5873985e0cd9a2926867bf697c5e7bc01f9. > > The ld.so issue is still open but there seems to be consensus that it=E2= =80=99s > a bug: . Commit 58abd5873985e0cd9a2926867bf697c5e7bc01f9 appears to be incomplete. Let=E2=80=99s suppose this: (mkdir /tmp/fakechroot-test && cd ~/tmp/fakechroot-test/ && \ tar xf $(guix pack --save-provenance -RR openmpi intel-mpi-benchmarks ba= sh-minimal -S /bin=3Dbin)) The motivating example at the beginning of this thread works fine: --8<---------------cut here---------------start------------->8--- $ unshare -m -U -r -f sh -c 'mount -t tmpfs none /gnu; GUIX_EXECUTION_ENGIN= E=3Dfakechroot /tmp/fakechroot-test/bin/orterun --version' orterun (OpenRTE) 4.1.4 Report bugs to http://www.open-mpi.org/community/help/ --8<---------------cut here---------------end--------------->8--- =E2=80=A6 but this doesn=E2=80=99t: --8<---------------cut here---------------start------------->8--- $ unshare -m -U -r -f sh -c 'mount -t tmpfs none /gnu; GUIX_EXECUTION_ENGIN= E=3Dfakechroot /tmp/fakechroot-test/bin/IMB-MPI1' /tmp/fakechroot-test/gnu/store/i9ypns78lmy8xr0x4zvdwc4b80m0yl72-intel-mpi-b= enchmarks-2019.6/bin//IMB-MPI1: error while loading shared libraries: libev= ent_core-2.1.so.7: cannot open shared object file: No such file or directory --8<---------------cut here---------------end--------------->8--- Reason appears to be that =E2=80=98LOADER_AUDIT_RUNPATH=E2=80=99 only conta= ins what=E2=80=99s in the RUNPATH of =E2=80=98IMB-MPI1=E2=80=99 and not its indirect dependencies= =E2=80=94libevent is one of them. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 18:27:01 2023 Received: (at 43491-done) by debbugs.gnu.org; 17 Mar 2023 22:27:01 +0000 Received: from localhost ([127.0.0.1]:45864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdIXM-000330-R3 for submit@debbugs.gnu.org; Fri, 17 Mar 2023 18:27:01 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:64129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdIXK-00032j-KY for 43491-done@debbugs.gnu.org; Fri, 17 Mar 2023 18:26:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:references:date:in-reply-to:message-id: mime-version:content-transfer-encoding; bh=slshBQeXPtBpwfyCxr4P/FX+keBQCVEy4ONbcBpTsAM=; b=As5Gl/kUuMZb4itwzFfr0vWPcudlmBs4nlS+jdx2/4dnRGSUCy+wLfb7 mt5YrsrMDmbwYFbMtHbcez8Bn++Rw0KSdBEA8vdHBXyB+Pm61udPgBloX TlZAubDq4jtxA/mX+673LoIRLZ33qn6w2cmPJP8N2uqLLqhryGygXRm5L M=; 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.98,270,1673910000"; d="scan'208";a="97840822" 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; 17 Mar 2023 23:26:51 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 43491-done@debbugs.gnu.org Subject: Re: bug#43491: Fakechroot execution engine can fail to find libraries References: <87mu16tdx5.fsf@gnu.org> <87mu1nw6x9.fsf@inria.fr> <87lejvwbrw.fsf_-_@gnu.org> Date: Fri, 17 Mar 2023 23:26:51 +0100 In-Reply-To: <87lejvwbrw.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Fri, 17 Mar 2023 18:03:31 +0100") Message-ID: <87o7orui8k.fsf@gnu.org> 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43491-done 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 (---) Ludovic Court=C3=A8s skribis: > $ unshare -m -U -r -f sh -c 'mount -t tmpfs none /gnu; GUIX_EXECUTION_ENG= INE=3Dfakechroot /tmp/fakechroot-test/bin/IMB-MPI1' > /tmp/fakechroot-test/gnu/store/i9ypns78lmy8xr0x4zvdwc4b80m0yl72-intel-mpi= -benchmarks-2019.6/bin//IMB-MPI1: error while loading shared libraries: lib= event_core-2.1.so.7: cannot open shared object file: No such file or direct= ory > > Reason appears to be that =E2=80=98LOADER_AUDIT_RUNPATH=E2=80=99 only con= tains what=E2=80=99s in > the RUNPATH of =E2=80=98IMB-MPI1=E2=80=99 and not its indirect dependenci= es=E2=80=94libevent is > one of them. Fixed (for good!) in d15dbdb79c617b8b710ef5a9502be0d5f640aaaf! Ludo=E2=80=99. From unknown Mon Aug 18 06:58:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 15 Apr 2023 11:24:09 +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