From: Tom de Vries via Gdb <gdb@sourceware.org>
To: psmith@gnu.org, Simon Marchi <simark@simark.ca>, gdb@sourceware.org
Subject: Re: GDB 15/16 crashing in add_thread_silent()
Date: Fri, 21 Nov 2025 12:59:00 +0100 [thread overview]
Message-ID: <e158998f-561e-46a7-96f3-6568356cf619@suse.de> (raw)
In-Reply-To: <9a1b77f25cab8eb7433476918a9c5be29091856c.camel@gnu.org>
On 11/14/25 8:38 PM, Paul Smith via Gdb wrote:
> However, if I use the native GDB 8.2 that comes with Rocky Linux, then
> it will open the core file without these errors, and even show me the
> backtrace for all threads.
An interesting thing to know here would be the size of the PRSTATUS note:
...
$ eu-readelf -n core | grep -i prstatus
CORE 336 PRSTATUS
$ readelf -n core | grep -i prstatus
CORE 0x00000150 NT_PRSTATUS (prstatus structure)
...
AFAIU, the note should be grokked by elf_x86_64_grok_prstatus, which
bails out unless the size is either 296 (x32 abi) or 336.
So, if your core has a PRSTATUS note that has not one of those sizes,
then it's possible that the system gdb 8.2 you mention works because the
source package has a patch that makes elf_x86_64_grok_prstatus work for
that particular number, and then hopefully that patch has more information.
But upstream gdb 8.2 only accepts the same numbers as upstream gdb
trunk: 296 or 336.
[ My current hypothesis about the related arm problem I'm looking at, is
that the core was generated by a kernel with a bug that meant that a
prstatus was generated with the wrong size, which was fixed by commit
16aead81018c ("take fdpic-related parts of elf_prstatus out"). AFAIU
that problem didn't trigger on x86_64, but I thought I mention it. ]
Thanks,
- Tom
next prev parent reply other threads:[~2025-11-21 11:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 18:56 Paul Smith via Gdb
2025-11-14 19:12 ` Simon Marchi via Gdb
2025-11-14 19:20 ` Paul Smith via Gdb
2025-11-14 19:25 ` Simon Marchi via Gdb
2025-11-14 19:38 ` Paul Smith via Gdb
2025-11-14 20:03 ` Simon Marchi via Gdb
2025-11-14 20:13 ` Tom Tromey
2025-11-14 20:29 ` Paul Smith via Gdb
2025-11-14 20:42 ` Paul Smith via Gdb
2025-11-18 18:33 ` Tom Tromey
2025-11-18 19:30 ` Paul Smith via Gdb
2025-11-18 20:24 ` Simon Marchi via Gdb
2025-11-24 16:36 ` Paul Smith via Gdb
2025-11-21 11:59 ` Tom de Vries via Gdb [this message]
2025-11-24 15:19 ` Paul Smith via Gdb
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=e158998f-561e-46a7-96f3-6568356cf619@suse.de \
--to=gdb@sourceware.org \
--cc=psmith@gnu.org \
--cc=simark@simark.ca \
--cc=tdevries@suse.de \
/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