From: Sandra Loosemore <sandra@codesourcery.com>
To: Paul Koning <Paul_Koning@dell.com>,
gdb@sourceware.org, gdb-patches@sourceware.org,
pedro@codesourcery.com
Subject: Re: [remote protocol] support for disabling packet acknowledgement
Date: Fri, 11 Jul 2008 00:22:00 -0000 [thread overview]
Message-ID: <4876A718.2050100@codesourcery.com> (raw)
In-Reply-To: <20080710223312.GA19058@caradoc.them.org>
Daniel Jacobowitz wrote:
>
> [snip]
>
> The result of this is that the acks become ambiguous in the presence
> of an unreliable or antagonistically delayed transport. For instance,
> if GDB sends a memory write, the stub acks it, the stub replies with
> OK, and then GDB's ack is delayed. Existing implementations of the
> protocol will resend the OK in this case, assuming the message was
> lost - from stub side that's indistinguishable from ack lost. GDB's
> long-delayed ACK arrives on the stub at the same time the OK arrives
> at GDB. GDB must ack again - it doesn't know whether the first ack
> ever made it through, and if it doesn't ack now then the stub might
> keep resending that OK until it gets through. So now GDB sends an
> ack. Simultaneously the stub sends a stop reply indicating that some
> other thread has stopped. When it receives the ack, it thinks GDB saw
> the stop reply and does not resend it. But GDB hasn't seen it yet,
> and if it is dropped the conversation is now out of sync. GDB will
> hang around waiting for an event that has already been reported.
Thanks, Dan. This is about the point at which my brain exploded. :-P
My suggestion for dealing with the breakage was for the stub to send an
out-of-band ^C back to GDB when it has something to report, rather than sending
an actual stop reply asynchronously. Then GDB could (synchronously) poll the
stub with an "eh, what's up?" packet, the stub could reply, the normal +/- acks
wouldn't be any more broken than they are now, the stub could resend the ^C
without any possibility of confusion if it thought GDB hadn't gotten it the
first time, etc. I still think that's workable, but the reaction here was
"let's not go there; let's just assume the connection is reliable". I think
everyone else's brain had exploded by that point as well. ;-)
In any case, whether or not it ends up being a requirement for non-stop mode in
the long run, being able to turn off the protocol acks seems useful on its own
for reducing unnecessary round-trips when debugging over laggy TCP connections.
Did anyone have comments on the patch itself?
-Sandra
next prev parent reply other threads:[~2008-07-11 0:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 18:59 Sandra Loosemore
2008-07-10 19:09 ` Paul Koning
2008-07-10 19:59 ` Sandra Loosemore
2008-07-10 20:13 ` Paul Koning
2008-07-10 22:33 ` Daniel Jacobowitz
2008-07-11 0:22 ` Sandra Loosemore [this message]
2008-07-11 0:43 ` Daniel Jacobowitz
2008-07-11 13:43 ` Paul Koning
2008-07-11 14:35 ` Daniel Jacobowitz
[not found] ` <20080710223312.GA19058__14539.8706700236$1215729298$gmane$org@caradoc.them.org>
2008-07-11 3:05 ` Frank Ch. Eigler
2008-07-11 3:25 ` Daniel Jacobowitz
2008-07-11 15:11 ` Pedro Alves
2008-07-11 15:24 ` Daniel Jacobowitz
2008-07-11 15:54 ` Paul Koning
2008-07-11 17:59 ` Pedro Alves
2008-07-11 18:54 ` Paul Koning
2008-07-11 19:10 ` Pedro Alves
2008-07-25 13:41 ` Eli Zaretskii
2008-07-25 14:14 ` Sandra Loosemore
2008-07-26 5:54 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2008-07-10 17:23 Pedro Alves
2008-07-10 18:44 ` Paul Koning
2008-07-10 19:08 ` Daniel Jacobowitz
2008-07-25 13:39 ` Eli Zaretskii
2008-08-11 19:40 ` Daniel Jacobowitz
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=4876A718.2050100@codesourcery.com \
--to=sandra@codesourcery.com \
--cc=Paul_Koning@dell.com \
--cc=gdb-patches@sourceware.org \
--cc=gdb@sourceware.org \
--cc=pedro@codesourcery.com \
/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