public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Glibc commit causing regression in gdb
@ 2021-04-15 19:59 Emil Velikov
  2021-04-16  8:35 ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Emil Velikov @ 2021-04-15 19:59 UTC (permalink / raw)
  To: libc-alpha

Greetings everyone,

We have recently received a regression report in Arch Linux, where gdb
attach fails with some applications.
In particular, the issue originates in glibc 2.33, while gdb used is
10.1 and is 100% reproducible (here) with steam and gimp.

Note that explicitly rebuilding gdb explicitly against the glibc does not help.

After some digging I found the offending glibc commit
1daccf403b1bd86370eb94edca794dc106d02039 ("nptl: Move stack list
variables into _rtld_global"). With the said commit the
td_ta_map_lwp2thr() call in GDB fails, resulting in the infamous

Error while reading shared library symbols for /usr/lib/libpthread.so.0:
Cannot find user-level thread for LWP 2999060: generic error


Can anyone confirm if the issue is reproducible with other distros? Is
there some gdb patch to fix this, or alternatively is it safe to ship
a revert upstream and/or within the Arch Linux package?

Bear in mind that I'm happy to get this issue resolved properly, yet
this is my first time seriously looking at the glibc codebase. For my
initial investigation I force-enabled LOG() and added a few extra
notations.

- Vanilla glibc 2.33
td_init
td_ta_new
td_init
td_ta_new
td_ta_map_lwp2thr
__td_ta_stack_user has failed // newly added LOG

- Vanilla glibc 2.33 with offending commit reverted
td_init
td_ta_new
td_init
td_ta_new
td_ta_map_lwp2thr
__td_ta_lookup_th_unique // newly added LOG entry
td_thr_get_info
... above three are repeated a lot, until the end

Thanks
Emil
[1] https://bugs.archlinux.org/task/69657

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-16 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 19:59 Glibc commit causing regression in gdb Emil Velikov
2021-04-16  8:35 ` Florian Weimer
2021-04-16 10:54   ` Emil Velikov
2021-04-16 10:59     ` Florian Weimer

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).