public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: libc-alpha@sourceware.org
Subject: Glibc commit causing regression in gdb
Date: Thu, 15 Apr 2021 20:59:51 +0100	[thread overview]
Message-ID: <CACvgo503_+82SyOLdcZ6Z2_fh8H_A5GrM6G5fzDgUnP7xT6uHA@mail.gmail.com> (raw)

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

             reply	other threads:[~2021-04-15 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 19:59 Emil Velikov [this message]
2021-04-16  8:35 ` Florian Weimer
2021-04-16 10:54   ` Emil Velikov
2021-04-16 10:59     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACvgo503_+82SyOLdcZ6Z2_fh8H_A5GrM6G5fzDgUnP7xT6uHA@mail.gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).