From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 49E3E3844015; Thu, 1 Apr 2021 13:52:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49E3E3844015 From: "enedil at outlook dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: enedil at outlook dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 13:52:00 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27682 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 #include #include #include 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=20 [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_ !=3D 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 tak= en from master branch (GNU gdb (GDB) 11.0.50.20210331-git)=20 Compilers:=20 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 doe= sn'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=3D2= 2474 --=20 You are receiving this mail because: You are on the CC list for the bug.=