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/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 17:03:24 +0000	[thread overview]
Message-ID: <bug-27710-4717-WJPHT2JrE3@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 #15 from Simon Marchi <simark at simark dot ca> ---
(In reply to Tom de Vries from comment #14)
> I just stumbled upon remote_unpush_target, and it seems one remote_target
> can be associated with multiple inferiors.  So at this point I'm not sure
> how one would select the "right" inferior.

Indeed, one remote target can handle multiple inferiors (if using
extended-remote).
The right inferior in this case would be any inferior of that target.  Making
any inferior of this remote target the current inferior implicitly makes this
remote target the current one, such that target_is_non_stop_p will hit that
remote target.  If the current inferior is one that does not belong to that
remote target, then target_is_non_stop_p is really asking whether some other
unrelated target is non-stop.

So adding a call to switch_to_target_no_thread should make it work (it just
makes an arbitrary inferior of the target the current one).

Another option, instead of switching the current inferior, would be to make
target_is_non_stop accept a target:

  gdb_assert (target_is_non_stop_p (notif_state->remote));

And pass down the target to everything below.  It would be a bit more work, and
we would have to make sure everything called by target_is_non_stop_p doesn't
use the global context.

This looks like a problem that happens quite rarely though, it would be nice to
have a way to reproduce it all the time, by adding some delay somewhere or
otherwise.

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

  parent reply	other threads:[~2021-04-14 17:03 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
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 [this message]
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-WJPHT2JrE3@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).