public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "koachan+sourceware at protonmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/27899] New: [GNU/Linux, sparc64] GDB crashes when debugging multithreaded programs Date: Sat, 22 May 2021 17:22:06 +0000 [thread overview] Message-ID: <bug-27899-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=27899 Bug ID: 27899 Summary: [GNU/Linux, sparc64] GDB crashes when debugging multithreaded programs Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: koachan+sourceware at protonmail dot com Target Milestone: --- Created attachment 13465 --> https://sourceware.org/bugzilla/attachment.cgi?id=13465&action=edit Test code to trigger the behavior On sparc64, GDB 10.2 crashes with the following message when debugging multithreaded programs: thread.c:1309: internal-error: void switch_to_thread(thread_info*): Assertion `thr != NULL' failed. Steps to reproduce: - Compile the attached source with `gcc -g3 -o threaded-hello threaded-hello.c -lpthread -static` on a sparc64 machine. - Load the file Expected result (from GDB 9.2 and 10.1): $ gdb threaded-hello [... snipped ...] Reading symbols from threaded-hello... (gdb) break thread Breakpoint 1 at 0x100984: file threaded-hello.c, line 18. (gdb) run Starting program: /home/k/threaded-hello [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Hello World from the main thread! [New Thread 0xffff800100805870 (LWP 46440)] [Switching to Thread 0xffff800100805870 (LWP 46440)] Thread 2 "threaded-hello" hit Breakpoint 1, thread ( vargp=<error reading variable: Cannot access memory at address 0x87f>) at threaded-hello.c:18 18 printf("Hello World from a thread created by the main thread!\n"); (gdb) Actual result (from GDB 10.2): $ gdb threaded-hello [... snipped ...] Reading symbols from threaded-hello... (gdb) break thread Breakpoint 1 at 0x100984: file threaded-hello.c, line 18. (gdb) run Starting program: /home/k/threaded-hello [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Hello World from the main thread! thread.c:1309: internal-error: void switch_to_thread(thread_info*): Assertion `thr != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) I've attached the source and the compiled binary (built with GCC 9.3.0). -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2021-05-22 17:22 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-22 17:22 koachan+sourceware at protonmail dot com [this message] 2021-05-22 17:23 ` [Bug gdb/27899] " koachan+sourceware at protonmail dot com 2021-05-23 11:54 ` simark at simark dot ca 2021-05-23 11:54 ` simark at simark dot ca 2021-05-23 13:09 ` simark at simark dot ca 2021-05-23 15:42 ` koachan+sourceware at protonmail dot com 2021-05-25 14:10 ` koachan+sourceware at protonmail dot com 2021-05-27 2:34 ` simark at simark dot ca 2021-05-31 1:17 ` simark at simark dot ca 2021-06-07 15:03 ` cvs-commit at gcc dot gnu.org 2021-06-07 15:04 ` simark at simark dot ca
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=bug-27899-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).