From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 69A983858C54 for ; Tue, 17 Oct 2023 14:50:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 69A983858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 69A983858C54 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697554217; cv=none; b=Dv+FNhZO6bKiFLSK2c/eCXCz7fG89fxkvrmi4sL+jOoaNH6XeH8AhhFBMytgEAEzF+nAyPaApvwH8C0doR3yCFbSHEHe0yQnVpMPD8y4jYmXSQ++hCcN3XfG3d9y6u4GJUwEMeOCEHEB2q49reZoRqMFflYeazGbFcaXWrYtFjU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697554217; c=relaxed/simple; bh=jMY+S/+hqHNTgZzE0UED5X+vhpxM0L0Lt4F7/iPd7H8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=uN9t6HfSJ49XHQTEmB8Of3QWO1dTyY6SCeR/VsK4cs0+LHSgYcFvFteYRkTQ5LEUrOE5/E8Sz+weXwTOItLiW3+wdebWRyzkpetavSwxeaOle5xQO4YR9+zZMgspeLoL9ezDtuqFnPb48jTbVjqJUVloGG23Q3Y3U1t3B/22R58= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1c888b3a25aso36511345ad.0 for ; Tue, 17 Oct 2023 07:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697554213; x=1698159013; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=MOO9PKIsue//eLUfRaC7I/DKd+DxSVyBB8tGqlmYli0=; b=UQD2qVNZJp0pqLfZgHwjnjcyFlMaBbrzRtcTFIPllsvnrhQVbCjaWdUrnpuybn7JFF YQfAJbMCTh08lOGK6oMGDotJZn8w+uGVvHKrNO2qKAtXH63SArVQpp34WhxgGUlFx668 4GrhYSZMRD4KVDuRwTB+1LFc4gINBYC67SLrlJkWtwDGBFtqDIirmWGHjc/99ElJ2/hy C8l9Rsgyft4fJImfQA7FMY6xKZUQhQcaXf9t9XsH7257saqi/9SifAdnEjkwFodDiJ5p 4C8U1NujSwS4PefdWoc9+AdMzMCQ49LxKy+fNrZei6jzkhVELS4mIOwcrzJsHZAenqu2 Hucg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697554213; x=1698159013; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MOO9PKIsue//eLUfRaC7I/DKd+DxSVyBB8tGqlmYli0=; b=q0E/r9QR/hLl3P+slxKikekfA3uj+CcK8XguLmKu/Tfu4raLy+a7IdSK9HYhYBOR0a OlbEhwFZw0X+NN1Z/Z0P7PbTItOVZbAU6dJX9O+uedT6ap/Ud0oNXZDsA/RLNQH24p/k 6g+Y3JdSgJa4sJE9GhfSggJ1275OLui7JzOOr7ECtssoBvgTVuD0STO8lEhnI9X9KGeo mi93JJO/oq0KFWCnqfOmFHKRUQwEukU7zzCcneWILObrhrpcAeNVS860bCuSX6uKx2+I 1riPdBMNZXxRcDNcihYp2hO+73LsiYaffZKgBrOtkdOxN2wB9r+CvW6Td4Ab1N9eSNx0 6acg== X-Gm-Message-State: AOJu0YxACj8dSpBTjuRD472HhfApKdgzHEVtVMLzB6O77uNnbsG911SU FfQZEFmew+1rj4iAjdxochkrcfgoYqzP0XiSEj3KWw== X-Google-Smtp-Source: AGHT+IFYUc/ZtTsPwzUcLqfuklIeINxCHo3wN6u1PSuK0kNV5rHvtqkVDBM27S9YJA8p5LxkVQpkhg== X-Received: by 2002:a17:902:c412:b0:1c3:1f0c:fb82 with SMTP id k18-20020a170902c41200b001c31f0cfb82mr2622182plk.41.1697554213311; Tue, 17 Oct 2023 07:50:13 -0700 (PDT) Received: from [192.168.15.31] (201-92-183-120.dsl.telesp.net.br. [201.92.183.120]) by smtp.gmail.com with ESMTPSA id q11-20020a170902dacb00b001bb9bc8d232sm1653424plx.61.2023.10.17.07.50.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 07:50:12 -0700 (PDT) Message-ID: Date: Tue, 17 Oct 2023 11:48:55 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] test-container: disable ld.so system cache on DSO detection Content-Language: en-US To: Simon Chopin , libc-alpha@sourceware.org References: <20231005125431.3958485-1-simon.chopin@canonical.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20231005125431.3958485-1-simon.chopin@canonical.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 05/10/23 09:54, Simon Chopin wrote: > When building the testroot, the script runs the newly built ld.so on a > couple of binaries in order to copy over any additional libararies s/libararies/libraries > needed. However, if the dependencies are found in the system cache, it > will be copied over using that path. > > This is problematic if the system ld.so and the one built don't have the > exact same search configuration. We encountered this in Ubuntu, where we > build a variant of libc with -fno-omit-frame-pointer for accurate > performance profiling. > > This variant is built using a non-standard slibdir to be able to be > co-installed with the default library (e.g. slibdir = /lib/libc6-prof). > Since we have /lib pointing to /usr/lib, any additional dependency > should still be reachable via /usr. However, resolving via the cache > might result in the additional DSOs being copied into $testroot/lib, out > of the search path in the container. > > The problem has been triggered by 1d5024f4f052c12e404d42d3b5bfe9c3e9fd27c4 > ("support: Build with exceptions and asynchronous unwind tables [BZ #30587]") > which introduced a dependency on libgcc_s.so.1 under some circumstances. > > Downstream bug: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2031495 It makes sense to inhibit cache on testroot creation, although default system dirs will always be used. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index c6d4817a9e..b938721166 100644 > --- a/Makefile > +++ b/Makefile > @@ -624,7 +624,7 @@ $(objpfx)testroot.pristine/install.stamp : > ifeq ($(run-built-tests),yes) > # Copy these DSOs first so we can overwrite them with our own. > for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \ > - $(rtld-prefix) \ > + $(rtld-prefix) --inhibit-cache \ > $(objpfx)testroot.pristine/bin/sh \ > | sed -n '/\//{s@.*=> /@/@;s/^[^/]*//;s/ .*//p;}'` ;\ > do \ > @@ -633,7 +633,7 @@ ifeq ($(run-built-tests),yes) > $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\ > done > for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \ > - $(rtld-prefix) \ > + $(rtld-prefix) --inhibit-cache \ > $(objpfx)support/$(LINKS_DSO_PROGRAM) \ > | sed -n '/\//{s@.*=> /@/@;s/^[^/]*//;s/ .*//p;}'` ;\ > do \ > > base-commit: 1056e5b4c3f2d90ed2b4a55f96add28da2f4c8fa