From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C0EEC385803B; Sun, 19 Sep 2021 02:10:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0EEC385803B From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/26761] thread.c:95: internal-error: thread_info* inferior_thread(): Assertion `current_thread_ != nullptr' failed Date: Sun, 19 Sep 2021 02:10:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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: Sun, 19 Sep 2021 02:10:40 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26761 --- Comment #7 from Simon Marchi --- (In reply to Parke from comment #6) > I encounter a similar bug. Easy to reproduce. >=20 > On Arch Linux: >=20 > $ gdb --version > GNU gdb (GDB) 10.2 > [snip] >=20 > $ gdb -q -ex run /bin/true > Reading symbols from /bin/true... > (No debugging symbols found in /bin/true) > Starting program: /usr/bin/true=20 > [Inferior 1 (process 339) exited normally] > ../../gdb/thread.c:95: 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. >=20 > This is a bug, please report it. For instructions, see: > . >=20 > Aborted (core dumped) >=20 > $ cat ~/.gdbinit > define hook-quit > set confirm off > end >=20 > python >=20 > def exit_handler ( event ): > if hasattr ( event, 'exit_code' ) and event .exit_code =3D=3D 0: > gdb .execute ( "quit" ) >=20 > gdb .events .exited .connect ( exit_handler ) >=20 > end >=20 > ---- >=20 > I encounter a similar bug on Ubuntu 20.04. >=20 > $ gdb --version > GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 > [snip] >=20 > $ gdb -q -ex run /bin/true > Reading symbols from /bin/true... > (No debugging symbols found in /bin/true) > Starting program: /usr/bin/true=20 > [Inferior 1 (process 4134946) exited normally] > /build/gdb-OxeNvS/gdb-9.2/gdb/inferior.c:283: internal-error: inferior* > find_inferior_pid(int): Assertion `pid !=3D 0' failed. > A problem internal to GDB has been detected, > further debugging may prove unreliable. >=20 > This is a bug, please report it. For instructions, see: > . >=20 > Aborted (core dumped) >=20 > Possibly related: > https://sourceware.org/bugzilla/show_bug.cgi?id=3D27682 Although the symptom is the same, the root cause for this particular assert= ion to fail can be one of many things. So I would suggest filing a new bug, wi= th a title that is specific to what you are doing (e.g. "Assertion failure when using Python exit event handler". --=20 You are receiving this mail because: You are on the CC list for the bug.=