public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/27710] remote-notif.c:113: internal-error: void remote_async_get_pending_events_handler(gdb_client_data): Assertion `target_is_non_stop_p ()' failed
Date: Wed, 14 Apr 2021 09:59:46 +0000	[thread overview]
Message-ID: <bug-27710-4717-824pCFb1Au@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27710-4717@http.sourceware.org/bugzilla/>

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

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
Backtrace:
...
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007fd1b7b43a01 in __GI_abort () at abort.c:79
#2  0x0000000000b1db10 in dump_core () at
/home/vries/gdb_versions/devel/src/gdb/utils.c:204
#3  0x0000000000b1e022 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *) (problem=0x16d7bc0
<internal_error_problem>, 
    file=0xf4c5b0 "/home/vries/gdb_versions/devel/src/gdb/remote-notif.c",
line=113, 
    fmt=0xf4c584 "%s: Assertion `%s' failed.", ap=0x7ffe5cb2a788)
    at /home/vries/gdb_versions/devel/src/gdb/utils.c:414
#4  0x0000000000b1e0ea in internal_verror (
    file=0xf4c5b0 "/home/vries/gdb_versions/devel/src/gdb/remote-notif.c",
line=113, 
    fmt=0xf4c584 "%s: Assertion `%s' failed.", ap=0x7ffe5cb2a788)
    at /home/vries/gdb_versions/devel/src/gdb/utils.c:439
#5  0x0000000000df5b79 in internal_error (
    file=0xf4c5b0 "/home/vries/gdb_versions/devel/src/gdb/remote-notif.c",
line=113, 
    fmt=0xf4c584 "%s: Assertion `%s' failed.")
    at /home/vries/gdb_versions/devel/src/gdbsupport/errors.cc:55
#6  0x000000000094be95 in remote_async_get_pending_events_handler
(data=0x40e34b0)
    at /home/vries/gdb_versions/devel/src/gdb/remote-notif.c:113
#7  0x00000000004d29e5 in check_async_event_handlers ()
    at /home/vries/gdb_versions/devel/src/gdb/async-event.c:335
#8  0x0000000000df5cb7 in gdb_do_one_event ()
    at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:216
#9  0x00000000007fa045 in start_event_loop ()
    at /home/vries/gdb_versions/devel/src/gdb/main.c:348
#10 0x00000000007fa165 in captured_command_loop ()
    at /home/vries/gdb_versions/devel/src/gdb/main.c:408
#11 0x00000000007fb846 in captured_main (data=0x7ffe5cb2a9d0)
    at /home/vries/gdb_versions/devel/src/gdb/main.c:1242
#12 0x00000000007fb8ac in gdb_main (args=0x7ffe5cb2a9d0)
    at /home/vries/gdb_versions/devel/src/gdb/main.c:1257
#13 0x00000000004187ee in main (argc=15, argv=0x7ffe5cb2aad8)
    at /home/vries/gdb_versions/devel/src/gdb/gdb.c:32
...

So, we hit the assert:
...
  gdb_assert (target_is_non_stop_p ());
...

The function is defined as:
...
bool
target_is_non_stop_p ()
{
  return ((non_stop
           || target_non_stop_enabled == AUTO_BOOLEAN_TRUE
           || (target_non_stop_enabled == AUTO_BOOLEAN_AUTO
               && target_always_non_stop_p ()))
          && target_can_async_p ());
}
...
and:
...
(gdb) p non_stop
$1 = true
...
so presumably the assert fails because target_can_async_p () == false.

We have:
...
bool
target_can_async_p ()
{
  return current_inferior ()->top_target ()->can_async_p ();
}
...

AFAIU, current_inferior ()->top_target () translates to:
...
(gdb) p
current_inferior_.m_obj.m_target_stack.m_stack[current_inferior_.m_obj.m_target_stack.m_top]
$16 = (target_ops *) 0x16c6cd0 <exec_ops>
...

Exec_ops has type exec_target, which subclasses target_ops without implementing
a can_async_p override, so we have the default:
...
    virtual bool can_async_p ()
      TARGET_DEFAULT_RETURN (false);
...

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

  parent reply	other threads:[~2021-04-14  9:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 13:39 [Bug gdb/27710] New: " vries at gcc dot gnu.org
2021-04-08 13:41 ` [Bug gdb/27710] " vries at gcc dot gnu.org
2021-04-08 13:44 ` vries at gcc dot gnu.org
2021-04-08 14:02 ` simark at simark dot ca
2021-04-14  8:29 ` vries at gcc dot gnu.org
2021-04-14  8:57 ` vries at gcc dot gnu.org
2021-04-14  9:59 ` vries at gcc dot gnu.org [this message]
2021-04-14 10:12 ` vries at gcc dot gnu.org
2021-04-14 12:51 ` simark at simark dot ca
2021-04-14 12:56 ` vries at gcc dot gnu.org
2021-04-14 12:58 ` simark at simark dot ca
2021-04-14 13:13 ` simark at simark dot ca
2021-04-14 15:06 ` vries at gcc dot gnu.org
2021-04-14 15:09 ` vries at gcc dot gnu.org
2021-04-14 15:34 ` vries at gcc dot gnu.org
2021-04-14 17:03 ` simark at simark dot ca
2021-04-14 17:19 ` cbiesinger at google dot com
2021-04-14 17:20 ` simark at simark dot ca
2021-04-15  7:34 ` vries at gcc dot gnu.org
2021-04-15 17:58 ` simark at simark dot ca
2021-04-16  8:03 ` [Bug remote/27710] " vries at gcc dot gnu.org
2021-04-22  8:53 ` vries at gcc dot gnu.org
2021-04-22 15:01 ` cvs-commit at gcc dot gnu.org
2021-04-22 15:01 ` vries at gcc dot gnu.org

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-27710-4717-824pCFb1Au@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).