public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "enedil at outlook dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug python/27682] New: Continue event in Python delivered after thread dies Date: Thu, 01 Apr 2021 13:51:59 +0000 [thread overview] Message-ID: <bug-27682-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=27682 Bug ID: 27682 Summary: Continue event in Python delivered after thread dies Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: python Assignee: unassigned at sourceware dot org Reporter: enedil at outlook dot com Target Milestone: --- I have this C++ (this is C++, not C) code: #include <pthread.h> #include <stdlib.h> #include <signal.h> #include <stdint.h> void* foo(void* ptr) { return NULL; } int main() { pthread_t th; pthread_create(&th, NULL, foo, NULL); pthread_kill(pthread_self(), SIGSEGV); pthread_join(th, NULL); } This is what happens: /tmp $ /tmp/gdb/bin/gdb -q -n -ex 'pi gdb.events.cont.connect(lambda ev: gdb.parse_and_eval("2137"))' -ex 'run' ./test Reading symbols from ./test... Starting program: /tmp/test [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff7dae640 (LWP 426580)] thread.c:72: internal-error: thread_info* inferior_thread(): Assertion `current_thread_ != nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) I compile it in either of these ways: gcc -x c++ testcase.cc -g -pthread -o test g++ testcase.cc -g -pthread -o test clang++ testcase.cc -g -pthread -o test These however don't trigger the bug: gcc -x c testcase.cc -g -pthread -o test gcc -x c++ testcase.cc -pthread -o test clang -x c testcase.cc -g -pthread -o test My environment: fully upgraded Fedora 33 Desktop (amd64), with GDB just taken from master branch (GNU gdb (GDB) 11.0.50.20210331-git) Compilers: gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) clang version 11.0.0 (Fedora 11.0.0-2.fc33) Bug was confirmed on default configuration of Arch Linux. It should be noted, that if I use GNU gdb (GDB) Fedora 10.1-4.fc33, the doesn't show up just after `run`, but if I make a `break main`, and later issue `continue`, it appears once again. Possibly connected bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22474 -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2021-04-01 13:52 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-01 13:51 enedil at outlook dot com [this message] 2021-04-01 13:52 ` [Bug python/27682] Continue event in Python delivered after thread dies: internal-error: thread_info* inferior_thread(): Assertion `current_thread_ != nullptr' failed enedil at outlook dot com 2021-04-01 13:52 ` enedil at outlook dot com 2021-09-16 1:11 ` parke.nexus at gmail dot com
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-27682-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).