public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/27627] New: GDB cannot get long threadinfo data over UDP
@ 2021-03-23  8:05 dinc.tarkan at gmail dot com
  2021-03-29 16:02 ` [Bug gdb/27627] " tromey at sourceware dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dinc.tarkan at gmail dot com @ 2021-03-23  8:05 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27627
           Summary: GDB cannot get long threadinfo data over UDP
           Product: gdb
           Version: 9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: dinc.tarkan at gmail dot com
  Target Milestone: ---

I am using remote-target debugging and connected to target over UDP.
I have one process and 60 threads and every thread has 30 characters long name
and using a non-stop debug. So the thread info xml data is over 1kB.
gdb first ask for process info with "qXfer:osdata:read:processes:0,283"
Since the data is bigget than 643 (0x283) byte, the answer is "m<osdata
type="processes">...". gdb understands the multiple packet format and continues
to ask for osdata information "qXfer:osdata:read:processes:283,283"
and so on until it receives the package startind with 'l'.
Later gdb asks for thread info "qXfer:thread:read::0,44b" and the answer is
"m<threads>...." but after that gdb stop asking the remaining thread info. The
xml data is incomplete and when it trys to parse the data, gdb terminates due
to an error.
I changed the connection type to TCP, nothing else changed and it works as
expected.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/27627] GDB cannot get long threadinfo data over UDP
  2021-03-23  8:05 [Bug gdb/27627] New: GDB cannot get long threadinfo data over UDP dinc.tarkan at gmail dot com
@ 2021-03-29 16:02 ` tromey at sourceware dot org
  2021-04-05  5:36 ` dinc.tarkan at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2021-03-29 16:02 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Offhand I am not sure what is going on.

Are you using gdbserver on the remote end?  Or something else?

One thing that might help is if you could get a remote log file.
Like:

(gdb) set remotelogfile /tmp/whatever
(gdb) target remote ....
(gdb) ... debug until you get the problem

The remote log file lets us replay the session in gdb and see
if there's a bug on the gdb side.
It won't help, though, if the problem is on the remote.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/27627] GDB cannot get long threadinfo data over UDP
  2021-03-23  8:05 [Bug gdb/27627] New: GDB cannot get long threadinfo data over UDP dinc.tarkan at gmail dot com
  2021-03-29 16:02 ` [Bug gdb/27627] " tromey at sourceware dot org
@ 2021-04-05  5:36 ` dinc.tarkan at gmail dot com
  2021-04-05  5:43 ` dinc.tarkan at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dinc.tarkan at gmail dot com @ 2021-04-05  5:36 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Tarkan <dinc.tarkan at gmail dot com> ---
Created attachment 13350
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13350&action=edit
log outputs

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/27627] GDB cannot get long threadinfo data over UDP
  2021-03-23  8:05 [Bug gdb/27627] New: GDB cannot get long threadinfo data over UDP dinc.tarkan at gmail dot com
  2021-03-29 16:02 ` [Bug gdb/27627] " tromey at sourceware dot org
  2021-04-05  5:36 ` dinc.tarkan at gmail dot com
@ 2021-04-05  5:43 ` dinc.tarkan at gmail dot com
  2021-04-05 14:42 ` simark at simark dot ca
  2021-04-06  6:13 ` dinc.tarkan at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dinc.tarkan at gmail dot com @ 2021-04-05  5:43 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Tarkan <dinc.tarkan at gmail dot com> ---
yes i am using gdbserver.
it's easy to generate the error.
i have an application with 60 threads, all of them have long names and one
semaphore.
all of them trys to take the semaphıre and sleeps randomly and gives it back,
forever. 
application starts running. when i try to attach to application 60 threads ara
active.
gdb first gets the qxfer,osdata and later qxfer,threads.
second one cause the problem.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/27627] GDB cannot get long threadinfo data over UDP
  2021-03-23  8:05 [Bug gdb/27627] New: GDB cannot get long threadinfo data over UDP dinc.tarkan at gmail dot com
                   ` (2 preceding siblings ...)
  2021-04-05  5:43 ` dinc.tarkan at gmail dot com
@ 2021-04-05 14:42 ` simark at simark dot ca
  2021-04-06  6:13 ` dinc.tarkan at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: simark at simark dot ca @ 2021-04-05 14:42 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simark at simark dot ca

--- Comment #4 from Simon Marchi <simark at simark dot ca> ---
I'm going to be that guy: is there a reason you are using UDP for this?  It
just sounds like asking for trouble.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/27627] GDB cannot get long threadinfo data over UDP
  2021-03-23  8:05 [Bug gdb/27627] New: GDB cannot get long threadinfo data over UDP dinc.tarkan at gmail dot com
                   ` (3 preceding siblings ...)
  2021-04-05 14:42 ` simark at simark dot ca
@ 2021-04-06  6:13 ` dinc.tarkan at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dinc.tarkan at gmail dot com @ 2021-04-06  6:13 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Tarkan <dinc.tarkan at gmail dot com> ---
UDP works over a decade for us.
Tried on emulator (qemu) so no physical connection, and no reliability problem
and still same problem.
Also TCP is much slower on windows.
Tried to TCP_NODELAY option, but that cause another problems.
It's better for us if we can use UDP.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-06  6:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23  8:05 [Bug gdb/27627] New: GDB cannot get long threadinfo data over UDP dinc.tarkan at gmail dot com
2021-03-29 16:02 ` [Bug gdb/27627] " tromey at sourceware dot org
2021-04-05  5:36 ` dinc.tarkan at gmail dot com
2021-04-05  5:43 ` dinc.tarkan at gmail dot com
2021-04-05 14:42 ` simark at simark dot ca
2021-04-06  6:13 ` dinc.tarkan at gmail dot com

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).