public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
@ 2021-03-05 16:48 simark at simark dot ca
2021-03-05 16:59 ` [Bug gdb/27526] " simark at simark dot ca
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: simark at simark dot ca @ 2021-03-05 16:48 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Bug ID: 27526
Summary: Attaching to threaded process on glibc 2.33:
libthread_db fails to initialize with "generic error"
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: simark at simark dot ca
Target Milestone: ---
As reported here:
https://sourceware.org/pipermail/gdb/2021-February/049208.html
On a Linux system with glibc 2.33, attaching to a threaded program gives:
$ pidof gnome-calculator
1476833
(gdb) attach 1476833
Attaching to process 1476833
[New LWP 1476834]
[New LWP 1476835]
[New LWP 1476836]
LOOKUP nptl_version in libpthread.so.0
LOOKUP nptl_version in libpthread.so.0
LOOKUP _rtld_global in ld-linux-x86-64.so.2
LOOKUP _dl_stack_user in (null)
Error while reading shared library symbols for /usr/lib/libpthread.so.0:
Cannot find user-level thread for LWP 1476836: generic error
0x00007fdb0288b6ed in __GI___poll (fds=0x5581bab7b100, nfds=3, timeout=-1) at
../sysdeps/unix/sysv/linux/poll.c:29
29 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
(gdb)
The "LOOKUP" lines come from a print I added in ps_pglobal_lookup to see which
symbols libthread_db asks GDB to look up.
The lookup for _dl_stack_user is new with glibc 2.33, I don't see it with glibc
2.31 (I don't have a system with glibc 2.32 handy). We fail to find a symbol
with this name, which fails the loading/initialization of libthread_db.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
@ 2021-03-05 16:59 ` simark at simark dot ca
2021-03-05 19:12 ` fweimer at redhat dot com
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: simark at simark dot ca @ 2021-03-05 16:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
The stack trace where the lookup for _dl_stack_user happens:
#0 ps_pglobal_lookup (ph=0x60c000037fe8, obj=0x0, name=0x7fffde34e6bd
"_dl_stack_user", sym_addr=0x6170000477c8) at
/home/simark/src/binutils-gdb/gdb/proc-service.c:102
#1 0x00007fffde34c7cc in td_mod_lookup (ps=<optimized out>, mod=mod@entry=0x0,
idx=idx@entry=54, sym_addr=sym_addr@entry=0x6170000477c8) at
td_symbol_list.c:48
#2 0x00007fffde34b131 in __td_ta_stack_user (ta=ta@entry=0x617000047580,
plist=plist@entry=0x7fffffffb000) at td_thr_validate.c:32
#3 0x00007fffde349b8c in td_ta_map_lwp2thr (ta_arg=0x617000047580,
lwpid=1476836, th=0x7fffffffb0a0) at td_ta_map_lwp2thr.c:190
#4 0x000055555d54fbc2 in thread_from_lwp (stopped=0x61700003a700, ptid=...) at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:415
#5 0x000055555d554b6b in try_thread_db_load_1 (info=0x60c000037fc0) at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:912
#6 0x000055555d555837 in try_thread_db_load (library=0x555560734260
"libthread_db.so.1", check_auto_load_safe=false) at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:1014
#7 0x000055555d55689c in try_thread_db_load_from_sdir () at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:1091
#8 0x000055555d557450 in thread_db_load_search () at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:1146
#9 0x000055555d557d90 in thread_db_load () at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:1203
#10 0x000055555d557e72 in check_for_thread_db () at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:1246
#11 0x000055555d557fdf in thread_db_new_objfile (objfile=0x614000007040) at
/home/simark/src/binutils-gdb/gdb/linux-thread-db.c:1275
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
2021-03-05 16:59 ` [Bug gdb/27526] " simark at simark dot ca
@ 2021-03-05 19:12 ` fweimer at redhat dot com
2021-03-07 7:30 ` vries at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: fweimer at redhat dot com @ 2021-03-05 19:12 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
2021-03-05 16:59 ` [Bug gdb/27526] " simark at simark dot ca
2021-03-05 19:12 ` fweimer at redhat dot com
@ 2021-03-07 7:30 ` vries at gcc dot gnu.org
2021-03-07 23:08 ` simark at simark dot ca
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-03-07 7:30 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Looks like a duplicate of PR25674.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (2 preceding siblings ...)
2021-03-07 7:30 ` vries at gcc dot gnu.org
@ 2021-03-07 23:08 ` simark at simark dot ca
2021-03-22 7:16 ` crvisqr at gmail dot com
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: simark at simark dot ca @ 2021-03-07 23:08 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
--- Comment #3 from Simon Marchi <simark at simark dot ca> ---
(In reply to Tom de Vries from comment #2)
> Looks like a duplicate of PR25674.
Even though it's the same error message ("Generic error", not very
descriptive), I don't think it's the same root cause. PR25674 looks like a
race condition when attaching, this one is caused by a change in glibc.
See: https://sourceware.org/pipermail/gdb-patches/2021-March/176787.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (3 preceding siblings ...)
2021-03-07 23:08 ` simark at simark dot ca
@ 2021-03-22 7:16 ` crvisqr at gmail dot com
2021-03-22 13:38 ` simark at simark dot ca
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: crvisqr at gmail dot com @ 2021-03-22 7:16 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
crvi <crvisqr at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crvisqr at gmail dot com
--- Comment #4 from crvi <crvisqr at gmail dot com> ---
Same here in fedora rawhide with glibc-2.33 and gdb-10.1-15.fc35.
Any suggested workarounds ?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (4 preceding siblings ...)
2021-03-22 7:16 ` crvisqr at gmail dot com
@ 2021-03-22 13:38 ` simark at simark dot ca
2021-03-31 17:00 ` vries at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: simark at simark dot ca @ 2021-03-22 13:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.1
--- Comment #5 from Simon Marchi <simark at simark dot ca> ---
(In reply to crvi from comment #4)
> Same here in fedora rawhide with glibc-2.33 and gdb-10.1-15.fc35.
>
> Any suggested workarounds ?
I don't see a workaround for this, we'll need a proper fix in GDB. I'm marking
this bug with the 11.1 target milestone, I don't think we'll want to release
GDB 11 without a fix for this.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (5 preceding siblings ...)
2021-03-22 13:38 ` simark at simark dot ca
@ 2021-03-31 17:00 ` vries at gcc dot gnu.org
2021-04-02 15:54 ` simark at simark dot ca
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-03-31 17:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
Patch posted:
https://sourceware.org/pipermail/gdb-patches/2021-March/177369.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (6 preceding siblings ...)
2021-03-31 17:00 ` vries at gcc dot gnu.org
@ 2021-04-02 15:54 ` simark at simark dot ca
2021-05-06 13:04 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: simark at simark dot ca @ 2021-04-02 15:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.1 |10.2
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (7 preceding siblings ...)
2021-04-02 15:54 ` simark at simark dot ca
@ 2021-05-06 13:04 ` vries at gcc dot gnu.org
2021-05-06 13:05 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-05-06 13:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
It seems there's a glibc PR27744 - "Support different libpthread/ld.so load
orders in libthread_db" with a commit that should fix this on the glibc side.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (8 preceding siblings ...)
2021-05-06 13:04 ` vries at gcc dot gnu.org
@ 2021-05-06 13:05 ` vries at gcc dot gnu.org
2021-05-06 13:20 ` simark at simark dot ca
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-05-06 13:05 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=27744
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (9 preceding siblings ...)
2021-05-06 13:05 ` vries at gcc dot gnu.org
@ 2021-05-06 13:20 ` simark at simark dot ca
2021-05-09 23:38 ` brobecker at gnat dot com
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: simark at simark dot ca @ 2021-05-06 13:20 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
--- Comment #8 from Simon Marchi <simark at simark dot ca> ---
I posted a v2 here:
https://sourceware.org/pipermail/gdb-patches/2021-May/178485.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (10 preceding siblings ...)
2021-05-06 13:20 ` simark at simark dot ca
@ 2021-05-09 23:38 ` brobecker at gnat dot com
2021-06-20 15:55 ` brobecker at gnat dot com
2021-06-21 16:39 ` simark at simark dot ca
13 siblings, 0 replies; 15+ messages in thread
From: brobecker at gnat dot com @ 2021-05-09 23:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Joel Brobecker <brobecker at gnat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.2 |11.1
CC| |brobecker at gnat dot com
--- Comment #9 from Joel Brobecker <brobecker at gnat dot com> ---
Important fix to have for our next release.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (11 preceding siblings ...)
2021-05-09 23:38 ` brobecker at gnat dot com
@ 2021-06-20 15:55 ` brobecker at gnat dot com
2021-06-21 16:39 ` simark at simark dot ca
13 siblings, 0 replies; 15+ messages in thread
From: brobecker at gnat dot com @ 2021-06-20 15:55 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
--- Comment #10 from Joel Brobecker <brobecker at gnat dot com> ---
Hello,
Now that https://sourceware.org/pipermail/gdb-patches/2021-June/179786.html has
been pushed to master, do we have anything left to do for this PR, or can we
close?
Thank you!
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug gdb/27526] Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error"
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
` (12 preceding siblings ...)
2021-06-20 15:55 ` brobecker at gnat dot com
@ 2021-06-21 16:39 ` simark at simark dot ca
13 siblings, 0 replies; 15+ messages in thread
From: simark at simark dot ca @ 2021-06-21 16:39 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Simon Marchi <simark at simark dot ca> ---
(In reply to Joel Brobecker from comment #10)
> Hello,
>
> Now that https://sourceware.org/pipermail/gdb-patches/2021-June/179786.html
> has been pushed to master, do we have anything left to do for this PR, or
> can we close?
>
> Thank you!
Yes, let's close it. If any related problem pops up, it will be a new PR.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2021-06-21 16:39 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 16:48 [Bug gdb/27526] New: Attaching to threaded process on glibc 2.33: libthread_db fails to initialize with "generic error" simark at simark dot ca
2021-03-05 16:59 ` [Bug gdb/27526] " simark at simark dot ca
2021-03-05 19:12 ` fweimer at redhat dot com
2021-03-07 7:30 ` vries at gcc dot gnu.org
2021-03-07 23:08 ` simark at simark dot ca
2021-03-22 7:16 ` crvisqr at gmail dot com
2021-03-22 13:38 ` simark at simark dot ca
2021-03-31 17:00 ` vries at gcc dot gnu.org
2021-04-02 15:54 ` simark at simark dot ca
2021-05-06 13:04 ` vries at gcc dot gnu.org
2021-05-06 13:05 ` vries at gcc dot gnu.org
2021-05-06 13:20 ` simark at simark dot ca
2021-05-09 23:38 ` brobecker at gnat dot com
2021-06-20 15:55 ` brobecker at gnat dot com
2021-06-21 16:39 ` simark at simark dot ca
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).