From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A17983856969 for ; Thu, 27 Oct 2022 16:51:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A17983856969 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666889499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MVUug7MOpCqOui2wp2eOLx21PlZWiuEx0s3Qz7EmSG0=; b=c5/wH+B4xbDDeB9D9rSnDcHrX6C0u6bftfHovJ+mE+PKxZ8snCVmCaLamSEzeI7nyj5ODK sE4zsTaBrOxrJMAOx8afg1EIox2NNy3selvrATUX1UOyRTJaSgmrWn7b+OP2OQScr38/Xo Gn1ChfmHjAGB37QhZM1Qf0VzbadD79E= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-256-TQJO-HLEOuq9VehKg6mYUg-1; Thu, 27 Oct 2022 12:51:36 -0400 X-MC-Unique: TQJO-HLEOuq9VehKg6mYUg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BCA8D29324B1; Thu, 27 Oct 2022 16:51:35 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 342C21121320; Thu, 27 Oct 2022 16:51:35 +0000 (UTC) From: Florian Weimer To: Szabolcs Nagy Cc: Szabolcs Nagy via Libc-alpha Subject: Re: [PATCH 18/20] Fix elf/tst-dlmopen-twice to support enough link namespaces References: <1adc193aeb267bdb147428b747e66c77cfd447d0.1666877952.git.szabolcs.nagy@arm.com> <874jvpjku8.fsf@oldenburg.str.redhat.com> Date: Thu, 27 Oct 2022 18:51:34 +0200 In-Reply-To: (Szabolcs Nagy's message of "Thu, 27 Oct 2022 17:45:10 +0100") Message-ID: <87sfj9i50p.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: * Szabolcs Nagy: > The 10/27/2022 18:24, Florian Weimer wrote: >> * Szabolcs Nagy via Libc-alpha: >> >> > The test dlmopens 10 namespaces recursively, which requires a glibc >> > tunable setting, otherwise it may run out of static TLS. >> > --- >> > elf/Makefile | 1 + >> > elf/tst-dlmopen-twice.c | 2 +- >> > 2 files changed, 2 insertions(+), 1 deletion(-) >> > >> > diff --git a/elf/Makefile b/elf/Makefile >> > index 7b50ccc07a..ace15dc11b 100644 >> > --- a/elf/Makefile >> > +++ b/elf/Makefile >> > @@ -2969,6 +2969,7 @@ tst-audit-tlsdesc-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so >> > $(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-auditmod-tlsdesc.so >> > tst-audit-tlsdesc-dlopen-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so >> > >> > +tst-dlmopen-twice-ENV = GLIBC_TUNABLES=glibc.rtld.nns=10 >> > $(objpfx)tst-dlmopen-twice.out: \ >> > $(objpfx)tst-dlmopen-twice-mod1.so \ >> > $(objpfx)tst-dlmopen-twice-mod2.so >> > diff --git a/elf/tst-dlmopen-twice.c b/elf/tst-dlmopen-twice.c >> > index 70c71fe19c..dfa58b1505 100644 >> > --- a/elf/tst-dlmopen-twice.c >> > +++ b/elf/tst-dlmopen-twice.c >> > @@ -46,7 +46,7 @@ do_test (void) >> > recurse (1); >> > >> > /* Then with nesting. The constant needs to be less than the >> > - internal DL_NNS namespace constant. */ >> > + glibc.rtld.nns tunable (which is between 1 and DL_NNS). */ >> > recurse (10); >> > return 0; >> > } >> >> This doesn't work if configured with --disable-tunables. >> >> I suspect this is merely a symptom. The static TLS sizing defaults >> should allow creating DL_NNS namespaces? > > the tunable defaults to 4, DL_NNS is 16 and that's the max value > of the tunable (since that's the static namespace array size) Maybe we should lower the constant from 10 to 3 then? I mistakenly assumed the namespace count was higher than it actually is. 3 should not yet invalidate the test. Thanks, Florian