From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 468D5385481D; Tue, 13 Jul 2021 11:49:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 468D5385481D From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/27690] FAIL: gdb.threads/check-libthread-db.exp: user-initiated check: libpthread.so not initialized (pattern 2) Date: Tue, 13 Jul 2021 11:49:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 11:49:19 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27690 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca --- Comment #3 from Tom de Vries --- Managed to bisect this in glibc, as follows. I.=20 Build glibc using pretty basic script: ... $ more ~/glibc/scripts/build.sh #!/bin/sh set -e pwd=3D$(pwd -P) src=3D$pwd/src build=3D$pwd/build install=3D$pwd/install rm -Rf $build $install mkdir $build $install cd $build $src/configure --prefix=3D$install make -j5 ... II. Run test-case using custom build glibc (using recipe from https://sourceware.org/glibc/wiki/Testing/Builds#Compile_against_glibc_buil= d_tree): ... diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/c heck-libthread-db.exp index dfb3bad3712..78bb881c6b3 100644 --- a/gdb/testsuite/gdb.threads/check-libthread-db.exp +++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp @@ -27,15 +27,23 @@ if [gdb_debug_enabled] { standard_testfile +set GLIBC "/home/vries/glibc/build" +set f1 "-Wl,-rpath=3D${GLIBC}:${GLIBC}/math:${GLIBC}/elf:${GLIBC}/dlfcn:${GLIBC}/n= ss: ${GLIBC}/nis:${GLIBC}/rt:${GLIBC}/resolv:${GLIBC}/crypt:${GLIBC}/nptl:${GLI= BC}/dfp"=20 + +set f2 "-Wl,--dynamic-linker=3D${GLIBC}/elf/ld.so" + if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ - executable debug] !=3D "" } { + executable [list debug additional_flags=3D$f1 additional_flags=3D$= f2]] !=3D "" } { return -1 } + with_test_prefix "user-initiated check" { # User-initiated check with libthread_db not loaded. clean_restart ${binfile} + gdb_test "set auto-load safe-path /" + gdb_test "set libthread-db-search-path /home/vries/glibc/build/nptl_db" gdb_test "maint show check-libthread-db" \ "Whether to check libthread_db at load time is off." @@ -81,6 +89,8 @@ with_test_prefix "automated load-time check" { # Automated load-time check with NPTL uninitialized. with_test_prefix "libpthread.so not initialized" { clean_restart ${binfile} + gdb_test "set auto-load safe-path /" + gdb_test "set libthread-db-search-path /home/vries/glibc/build/nptl= _db" gdb_test_no_output "maint set check-libthread-db 1" gdb_test_no_output "set debug libthread-db 1" @@ -99,6 +109,8 @@ with_test_prefix "automated load-time check" { # Automated load-time check with NPTL fully operational. with_test_prefix "libpthread.so fully initialized" { clean_restart ${binfile} + gdb_test "set auto-load safe-path /" + gdb_test "set libthread-db-search-path /home/vries/glibc/build/nptl= _db" gdb_test_no_output "maint set check-libthread-db 1" gdb_test_no_output "set debug libthread-db 1" ... Bisects to (as indeed suggested here https://sourceware.org/pipermail/gdb-patches/2021-July/180867.html by Simon= ): ... $ git bisect bad 1daccf403b1bd86370eb94edca794dc106d02039 is the first bad commit commit 1daccf403b1bd86370eb94edca794dc106d02039 Author: Florian Weimer Date: Mon Nov 16 19:33:30 2020 +0100 nptl: Move stack list variables into _rtld_global ... --=20 You are receiving this mail because: You are on the CC list for the bug.=