From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB8D33858434; Thu, 26 Aug 2021 14:35:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB8D33858434 From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/28275] New: commit_resumed_state assertion failure when killing running inferior and running again Date: Thu, 26 Aug 2021 14:35:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD 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: 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, 26 Aug 2021 14:35:32 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28275 Bug ID: 28275 Summary: commit_resumed_state assertion failure when killing running inferior and running again Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: simark at simark dot ca Target Milestone: --- $ ./gdb -nx -q --data-directory=3Ddata-directory /usr/bin/sleep=20 Reading symbols from /usr/bin/sleep... (No debugging symbols found in /usr/bin/sleep) (gdb) r 123 & Starting program: /usr/bin/sleep 123 (gdb) kill Kill the program being debugged? (y or n) y [Inferior 1 (process 2995416) killed] (gdb) r Starting program: /usr/bin/sleep 123 /home/simark/src/binutils-gdb/gdb/target.c:2603: internal-error: ptid_t target_wait(ptid_t, target_waitstatus*, target_wait_flags): Assertion `!proc_target->commit_resumed_state' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n)=20 When we kill, commit_resumed_state is and stays "true". When we run again,= the linux nat target is not considered by scoped_disable_commit_resumed, becaus= e it has no non-exited inferior. So when we wait here, it's still true: #10 0x000055c06ee19510 in target_wait (ptid=3D..., status=3D0x7fffb62cf0a0, options=3D...) at /home/simark/src/binutils-gdb/gdb/target.c:2603 #11 0x000055c06e74d1ce in startup_inferior (proc_target=3D0x55c072e373c0 , pid=3D2995427, ntraps=3D1, last_waitstatus=3D= 0x0, last_ptid=3D0x0) at /home/simark/src/binutils-gdb/gdb/nat/fork-inferior.c:4= 83 #12 0x000055c06e1f8e89 in gdb_startup_inferior (pid=3D2995427, num_traps=3D= 1) at /home/simark/src/binutils-gdb/gdb/fork-child.c:129 #13 0x000055c06e38ffa3 in inf_ptrace_target::create_inferior (this=3D0x55c072e373c0 , exec_file=3D0x60200009= 18b0 "/usr/bin/sleep", allargs=3D"123", env=3D0x61500001cc80, from_tty=3D1) at /home/simark/src/binutils-gdb/gdb/inf-ptrace.c:102 #14 0x000055c06e4f04b2 in linux_nat_target::create_inferior (this=3D0x55c072e373c0 , exec_file=3D0x60200009= 18b0 "/usr/bin/sleep", allargs=3D"123", env=3D0x61500001cc80, from_tty=3D1) at /home/simark/src/binutils-gdb/gdb/linux-nat.c:1075 #15 0x000055c06e3aba38 in run_command_1 (args=3D0x0, from_tty=3D1, run_how=3DRUN_NORMAL) at /home/simark/src/binutils-gdb/gdb/infcmd.c:448 #16 0x000055c06e3ac1f9 in run_command (args=3D0x0, from_tty=3D1) at /home/simark/src/binutils-gdb/gdb/infcmd.c:504 --=20 You are receiving this mail because: You are on the CC list for the bug.=