public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-28275-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28275

            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=data-directory /usr/bin/sleep 
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) 

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, because it
has no non-exited inferior.  So when we wait here, it's still true:

#10 0x000055c06ee19510 in target_wait (ptid=..., status=0x7fffb62cf0a0,
options=...) at /home/simark/src/binutils-gdb/gdb/target.c:2603
#11 0x000055c06e74d1ce in startup_inferior (proc_target=0x55c072e373c0
<the_amd64_linux_nat_target>, pid=2995427, ntraps=1, last_waitstatus=0x0,
last_ptid=0x0) at /home/simark/src/binutils-gdb/gdb/nat/fork-inferior.c:483
#12 0x000055c06e1f8e89 in gdb_startup_inferior (pid=2995427, num_traps=1) at
/home/simark/src/binutils-gdb/gdb/fork-child.c:129
#13 0x000055c06e38ffa3 in inf_ptrace_target::create_inferior
(this=0x55c072e373c0 <the_amd64_linux_nat_target>, exec_file=0x6020000918b0
"/usr/bin/sleep", allargs="123", env=0x61500001cc80, from_tty=1) at
/home/simark/src/binutils-gdb/gdb/inf-ptrace.c:102
#14 0x000055c06e4f04b2 in linux_nat_target::create_inferior
(this=0x55c072e373c0 <the_amd64_linux_nat_target>, exec_file=0x6020000918b0
"/usr/bin/sleep", allargs="123", env=0x61500001cc80, from_tty=1) at
/home/simark/src/binutils-gdb/gdb/linux-nat.c:1075
#15 0x000055c06e3aba38 in run_command_1 (args=0x0, from_tty=1,
run_how=RUN_NORMAL) at /home/simark/src/binutils-gdb/gdb/infcmd.c:448
#16 0x000055c06e3ac1f9 in run_command (args=0x0, from_tty=1) at
/home/simark/src/binutils-gdb/gdb/infcmd.c:504

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-08-26 14:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 14:35 simark at simark dot ca [this message]
2021-08-26 19:39 ` [Bug gdb/28275] " andrew.burgess at embecosm dot com
2021-10-29  9:22 ` nyanpasu64 at tuta dot io
2021-10-29 12:54 ` simark at simark dot ca
2022-11-14 15:02 ` vries at gcc dot gnu.org
2022-11-14 15:29 ` simark at simark dot ca
2022-11-14 16:32 ` vries at gcc dot gnu.org
2022-11-15  7:34 ` vries at gcc dot gnu.org
2022-11-15 11:20 ` vries at gcc dot gnu.org
2022-11-15 12:55 ` vries at gcc dot gnu.org
2022-11-16 15:36 ` aburgess at redhat dot com
2022-11-22 15:29 ` brobecker at gnat dot com
2022-11-28 13:03 ` cvs-commit at gcc dot gnu.org
2022-11-28 14:13 ` cvs-commit at gcc dot gnu.org
2022-11-28 14:14 ` simark at simark dot ca
2022-12-01 15:07 ` cvs-commit at gcc dot gnu.org
2022-12-01 15:07 ` cvs-commit at gcc dot gnu.org
2023-01-04  9:15 ` vries at gcc dot gnu.org
2023-01-04  9:57 ` brobecker at gnat 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-28275-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: link
Be 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).