* gdbserver delayed packet event issue
@ 2010-11-11 5:52 karthikeyan.s
2010-11-11 11:00 ` Pedro Alves
0 siblings, 1 reply; 5+ messages in thread
From: karthikeyan.s @ 2010-11-11 5:52 UTC (permalink / raw)
To: gdb
Hi,
I am seeing an issue with the gdb remote debugging, this is gdb 7.1.50
version. I have marked the erroneous states with line --> below.
gdbserver sometimes gets a delayed event for the packet
QStartNoAckMode sent from the host. In the case pasted below gdbserver
gets two events clubbed together when the client has sent the second
"QStartNoAckMode" packet after its timeout. At this stage, gdbserver
ends up sending two "$OK" while the client is expecting only one and
the state gets messed up between client and server.
1) It seems that the client does not handle issues with the network.
Instead it assumes the packet is lost on a timeout.
2) Why doesn't gdbserver get an event on the first request itself. I
used writeshark on the client side to confirm the packet is being
sent. And tcpdump on the remote side to see that the packet does come
in at the target.
Any help is appreciated
Thanks,
Karthik
----------
getpkt ("qSupported"); [sending ack]
[sent ack]
putpkt ("$PacketSize=3fff;QPassSignals+;qXfer:libraries:read+;qXfer:auxv:read+;qXfer:spu:read+;qXfer:spu:write+;qXfer:siginfo:read+;qXfer:siginfo:write+;qXfer:features:read+;QStartNoAckMode+;qXfer:osdata:read+;multiprocess+;QNonStop+;qXfer:threads:read+#31");
[looking for ack]
[received '+' (0x2b)]
-->handling possible serial event
-->getpkt ("QStartNoAckMode"); [sending ack]
-->[sent ack]
-->[noack mode enabled]
-->putpkt ("$OK#9a"); [noack mode]
-->handling possible serial event
-->getpkt ("QStartNoAckMode"); [no ack sent]
-->[noack mode enabled]
-->putpkt ("$OK#9a"); [noack mode]
handling possible serial event
[getpkt: discarding char '+']
getpkt ("Hg0"); [no ack sent]
putpkt ("$OK#9a"); [noack mode]
handling possible serial event
getpkt ("qXfer:features:read:target.xml:0,fff"); [no ack sent]
putpkt ("$l<?xml version="1.0"?>
<!-- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
*!Copying and distribution of this file, with or without modification,
*!are permitted in any medium without royalty provided the copyright
*!notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
<xi:include href="arm-core.xml"/>
<xi:include href="arm-vfpv2.xml"/>
</target>
#44"); [noack mode]
handling possible serial event
readchar: Got EOF
[getpkt: discarding char 'ÿ']
-------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver delayed packet event issue
2010-11-11 5:52 gdbserver delayed packet event issue karthikeyan.s
@ 2010-11-11 11:00 ` Pedro Alves
2010-11-11 11:58 ` karthikeyan.s
0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2010-11-11 11:00 UTC (permalink / raw)
To: gdb; +Cc: karthikeyan.s
On Thursday 11 November 2010 05:52:17, karthikeyan.s wrote:
> Hi,
> I am seeing an issue with the gdb remote debugging, this is gdb 7.1.50
> version. I have marked the erroneous states with line --> below.
>
> gdbserver sometimes gets a delayed event for the packet
> QStartNoAckMode sent from the host. In the case pasted below gdbserver
> gets two events clubbed together when the client has sent the second
> "QStartNoAckMode" packet after its timeout. At this stage, gdbserver
> ends up sending two "$OK" while the client is expecting only one and
> the state gets messed up between client and server.
>
> 1) It seems that the client does not handle issues with the network.
> Instead it assumes the packet is lost on a timeout.
> 2) Why doesn't gdbserver get an event on the first request itself. I
> used writeshark on the client side to confirm the packet is being
> sent. And tcpdump on the remote side to see that the packet does come
> in at the target.
"7.1.50" is quite vague. All snapshots from the 7.1 release up to
the 7.2 release were named like that. There should be a date
after the "50". Which is it? There was a similar problem fixed
around April/March 2010.
You could also try switching to 7.2 or a later snapshot and
confirm the problem is gone.
--
Pedro Alves
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver delayed packet event issue
2010-11-11 11:00 ` Pedro Alves
@ 2010-11-11 11:58 ` karthikeyan.s
2010-11-11 12:16 ` Pedro Alves
0 siblings, 1 reply; 5+ messages in thread
From: karthikeyan.s @ 2010-11-11 11:58 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb
Will try 7.2 but in the meantime, The complete version is 7.1.50.20100416.
On Thu, Nov 11, 2010 at 4:30 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Thursday 11 November 2010 05:52:17, karthikeyan.s wrote:
>> Hi,
>> I am seeing an issue with the gdb remote debugging, this is gdb 7.1.50
>> version. I have marked the erroneous states with line --> below.
>>
>> gdbserver sometimes gets a delayed event for the packet
>> QStartNoAckMode sent from the host. In the case pasted below gdbserver
>> gets two events clubbed together when the client has sent the second
>> "QStartNoAckMode" packet after its timeout. At this stage, gdbserver
>> ends up sending two "$OK" while the client is expecting only one and
>> the state gets messed up between client and server.
>>
>> 1) It seems that the client does not handle issues with the network.
>> Instead it assumes the packet is lost on a timeout.
>> 2) Why doesn't gdbserver get an event on the first request itself. I
>> used writeshark on the client side to confirm the packet is being
>> sent. And tcpdump on the remote side to see that the packet does come
>> in at the target.
>
> "7.1.50" is quite vague. All snapshots from the 7.1 release up to
> the 7.2 release were named like that. There should be a date
> after the "50". Which is it? There was a similar problem fixed
> around April/March 2010.
>
> You could also try switching to 7.2 or a later snapshot and
> confirm the problem is gone.
>
> --
> Pedro Alves
>
--
---
S. Karthikeyan | +919980814745
---
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver delayed packet event issue
2010-11-11 11:58 ` karthikeyan.s
@ 2010-11-11 12:16 ` Pedro Alves
2010-11-15 9:29 ` karthikeyan.s
0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2010-11-11 12:16 UTC (permalink / raw)
To: karthikeyan.s; +Cc: gdb
On Thursday 11 November 2010 11:58:08, karthikeyan.s wrote:
> Will try 7.2 but in the meantime, The complete version is 7.1.50.20100416.
I think these were the patches that fixed the issue:
2010-05-03 Doug Evans <>
* event-loop.c (struct callback_event): New struct.
(callback_list): New global.
2010-04-26 Doug Evans <>
* server.c (handle_general_set): Make static.
* remote-utils.c (putpkt_binary_1): Call readchar instead of read.
Print received char after testing for error/eof instead of before.
(input_interrupt): Tweak comment.
So they postdate your snapshot.
--
Pedro Alves
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdbserver delayed packet event issue
2010-11-11 12:16 ` Pedro Alves
@ 2010-11-15 9:29 ` karthikeyan.s
0 siblings, 0 replies; 5+ messages in thread
From: karthikeyan.s @ 2010-11-15 9:29 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb
On Thu, Nov 11, 2010 at 5:46 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Thursday 11 November 2010 11:58:08, karthikeyan.s wrote:
>> Will try 7.2 but in the meantime, The complete version is 7.1.50.20100416.
>
> I think these were the patches that fixed the issue:
>
> 2010-05-03 Doug Evans <>
>
> * event-loop.c (struct callback_event): New struct.
> (callback_list): New global.
>
> 2010-04-26 Doug Evans <>
>
> * server.c (handle_general_set): Make static.
>
> * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
> Print received char after testing for error/eof instead of before.
> (input_interrupt): Tweak comment.
>
> So they postdate your snapshot.
>
> --
> Pedro Alves
>
Hi Pedro,
The issue seems to be fixed in 7.2. I did not try individual patches
that you mentioned. Will move over 7.2 instead.
Thanks
Karthik
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-11-15 9:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-11 5:52 gdbserver delayed packet event issue karthikeyan.s
2010-11-11 11:00 ` Pedro Alves
2010-11-11 11:58 ` karthikeyan.s
2010-11-11 12:16 ` Pedro Alves
2010-11-15 9:29 ` karthikeyan.s
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox