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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id EE534389441C for ; Thu, 22 Apr 2021 08:33:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EE534389441C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-313-q-dtUx3iMJS9MySDEukMXA-1; Thu, 22 Apr 2021 04:32:57 -0400 X-MC-Unique: q-dtUx3iMJS9MySDEukMXA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4079B343A7; Thu, 22 Apr 2021 08:32:56 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-20.ams2.redhat.com [10.36.113.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95D0B5C1B4; Thu, 22 Apr 2021 08:32:54 +0000 (UTC) From: Florian Weimer To: Szabolcs Nagy Cc: Florian Weimer via Libc-alpha , Simon Marchi , Pedro Alves , Kevin Buettner , gdb-patches@sourceware.org Subject: Re: [PATCH v3] nptl_db: Support different libpthread/ld.so load orders (bug 27744) References: <87tuo24kxi.fsf@oldenburg.str.redhat.com> <87czunoo5m.fsf@oldenburg.str.redhat.com> <20210422072821.GE9028@arm.com> Date: Thu, 22 Apr 2021 10:33:12 +0200 In-Reply-To: <20210422072821.GE9028@arm.com> (Szabolcs Nagy's message of "Thu, 22 Apr 2021 08:28:27 +0100") Message-ID: <87o8e6k9br.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 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 08:33:02 -0000 * Szabolcs Nagy: > The 04/21/2021 13:47, Florian Weimer via Libc-alpha wrote: >> * Florian Weimer via Libc-alpha: >> >> > libthread_db is loaded once GDB encounters libpthread, and at this >> > point, ld.so may not have been processed by GDB yet. As a result, >> > _rtld_global cannot be accessed by regular means from libthread_db. >> > To make this work until GDB can be fixed, acess _rtld_global through >> > a pointer stored in libpthread. >> > >> > The new test does not reproduce bug 27744 with >> > --disable-hardcoded-path-in-tests, but is still a valid smoke test. >> > With --enable-hardcoded-path-in-tests, it is necessary to avoid >> > add-symbol-file because this can tickle a GDB bug. >> > >> > Fixes commit 1daccf403b1bd86370eb94edca794dc106d02039 ("nptl: Move >> > stack list variables into _rtld_global"). >> > >> > --- >> > v3: Mark test as UNSUPPORTED if launching gdb fails with ENOENT. >> > This is the version I'd like to commit soon. >> >> I've pushed this version given that Pedro acknowledged v2. > > on the aarch64 buildbot i see > > FAIL: nptl/tst-pthread-gdb-attach > > $ cat nptl/tst-pthread-gdb-attach.out > +set debug libthread-db 1 > +add-symbol-file /work/glibc-aarch64-linux/build/build/nptl/tst-pthread-gdb-attach > add symbol table from file "/work/glibc-aarch64-linux/build/build/nptl/tst-pthread-gdb-attach" > +set auto-load safe-path /work/glibc-aarch64-linux/build/build/nptl_db > +set libthread-db-search-path /work/glibc-aarch64-linux/build/build/nptl_db > +attach 461328 > [New LWP 461329] > Trying host libthread_db library: /work/glibc-aarch64-linux/build/build/nptl_db/libthread_db.so.1. > td_ta_new failed: application not linked with libthread > thread_db_load_search returning 0 Unfortunately I cannot reproduce this with binutils 2.30, GDB 8.2 and GCC 8.4.1. Has your environment newer or older versions? Thanks, Florian