From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id 434213846012; Wed, 21 Apr 2021 22:36:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 434213846012 Received: by mail-oi1-x22a.google.com with SMTP id r186so16156497oif.8; Wed, 21 Apr 2021 15:36:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FupJ6fiJo9o9wjhI3db5UqLYGQ8bCzRlFuks5LhweXo=; b=Byxdnn1eOCENHiBEm7J/qXfFHd3d/2Msjy95kQEy2x7XoSxBMJdoB4wSCrot+oPFWR WER9K40qs8T0lH3T91qafQe5+C028u4ryjbkjRDxWOvkSOnMYtR9xTdiKCY2n38tm973 AWv/OUbJ8x4TQ2OLMQeJrh0KxSEJB2hUWWFs6Qpj9TPYp+RqOg7HeKEWflf3FdbeP2EZ 5KT0zWW2VCNAkWBqvuPYK0nqW8XQG+ZIF3359bvXIJzU+JSf+vj4uOSSG8vlYy9I//91 J7yfmzPPtswufboH9l6hYWMNMgyQUBpDlM+3t9LV+cXC65qQOhKERd4BZcecnuNzmwWH kqXQ== X-Gm-Message-State: AOAM530UHhnjoSyl9FatokctG0ICGs2c6M6XoxQAodMz93EQAbBWSUij 5U/Bjh/Kb57C3c8UvBeEaI70+6qjUNYXMpR9hyM= X-Google-Smtp-Source: ABdhPJx7whnMBVuvr8dc0GrmvepepixF76rG9YPKGYjstOmP1TCw5NIb9KUcT3pkcEcisr5OILI4AddFmKS1nSX6hYg= X-Received: by 2002:aca:5904:: with SMTP id n4mr7867623oib.25.1619044563632; Wed, 21 Apr 2021 15:36:03 -0700 (PDT) MIME-Version: 1.0 References: <87tuo24kxi.fsf@oldenburg.str.redhat.com> <87czunoo5m.fsf@oldenburg.str.redhat.com> In-Reply-To: <87czunoo5m.fsf@oldenburg.str.redhat.com> From: "H.J. Lu" Date: Wed, 21 Apr 2021 15:35:27 -0700 Message-ID: Subject: Re: [PATCH v3] nptl_db: Support different libpthread/ld.so load orders (bug 27744) To: Florian Weimer Cc: Florian Weimer via Libc-alpha , Simon Marchi , Pedro Alves , Kevin Buettner , gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3028.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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: Wed, 21 Apr 2021 22:36:05 -0000 On Wed, Apr 21, 2021 at 6:04 AM 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. > I got FAIL: nptl/tst-pthread-gdb-attach FAIL: nptl/tst-pthread-gdb-attach-static when testing i686 build on Fedora 33: [New LWP 1329590] Trying host libthread_db library: /export/build/gnu/tools-build/glibc-32bit-cet-gitlab/build-i686-linux/nptl_db/libthread_db.so.1. dlopen failed: /export/build/gnu/tools-build/glibc-32bit-cet-gitlab/build-i686-linux/nptl_db/libthread_db.so.1: wrong ELF class: ELFCLASS32. thread_db_load_search returning 0 Is it possible to skip this when gdb and libthread_db.so.1 have different ELC classes? -- H.J.