Bug 328021 - invalid remote reply from gdbserver
invalid remote reply from gdbserver
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-11 13:23 EDT by David L.
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: gdb-6.6-33.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-12 05:22:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David L. 2007-10-11 13:23:04 EDT
Description of problem:
After attaching to a gdbserver and continuing, I get an error:
[New Thread 9788]
warning: Invalid remote reply:

This warning does not seem benign... I'm unable to debug.

Version-Release number of selected component (if applicable):
GNU gdb Red Hat Linux (6.6-32.fc8rh)

How reproducible:
Every time on the application I'm trying to debug.
It doesn't happen on a simple "helloworld" app.
Perhaps the error is related to multiple threads.

Steps to Reproduce:
1. gdbserver localhost:9100 myapp
2. gdb myapp
3. target remote localhost:9100
4. cont
Actual results:
warning: Invalid remote reply:

Expected results:

Additional info:
Comment 1 David L. 2007-10-11 14:12:05 EDT
This is slightly off-topic, but I'm unable to build gdb 6.6 or 6.7 to
check if my problem happens with those vanilla releases.  I get this

/usr/include/netinet/tcp.h:236: error: field ‘tcpm_addr’ has incomplete type
Comment 2 Jan Kratochvil 2007-10-11 15:28:10 EDT
BTW what is the reason to use Fedora-built gdbserver on Fedora?
I was considering removing gdbserver from the Fedora packaging, IMO it is useful
only for embedded targets when one has to build everything specifically for his
custom hardware/arch.

Otherwise confirming some bug exists:
  warning: Invalid remote reply: 
It occurs for me on Firefox but even not on a simple threaded sample code.

(In reply to comment #1)
> /usr/include/netinet/tcp.h:236: error: field ‘tcpm_addr’ has incomplete type

It is really offtopic here, IMO it should be fixed with next glibc (2.6.20-19):
* Thu Oct 11 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-19
- fix <netinet/tcp.h>
Comment 3 Jan Kratochvil 2007-10-11 16:02:04 EDT
Related to Bug 314131, going to commit for F8 a backport.

2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>

        * thread-db.c (thread_db_find_new_threads): Add prototype.
        (thread_db_create_event): Check for the main thread before adding
        a new thread.
        (maybe_attach_thread): Only enable event reporting if TID == 0.
        (thread_db_get_tls_address): Check for new threads.

It is broken in gdb-6.6 upstream (due to IMO the glibc changes since that time)
and I expect it would work in gdb-6.7 upstream.
gdb-6.7 is going to land only for F9, though.
Comment 4 Jan Kratochvil 2007-10-12 05:22:27 EDT
F-8 - gdb-6.6-33.fc8:
* Thu Oct 11 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.6-33
- Fix gdbserver for threaded applications and recent glibc (BZ 328021).

Rawhide - gdb-6.6-34.fc9:
* Fri Oct 12 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.6-34
- Fix gdbserver for threaded applications and recent glibc (BZ 328021).

Note You need to log in before you can comment on or make changes to this bug.