Bug 1378951

Summary: gdb refuses to connect to qemu's gdbserver with "Remote 'g' packet reply is too long"
Product: Red Hat Enterprise Linux 7 Reporter: David Jaša <djasa>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: gdb-bugs, jan.kratochvil, ohudlick, sergiodj
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 19:41:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description David Jaša 2016-09-23 15:28:24 UTC
Description of problem:
gdb refuses to connect to qemu's gdbserver with "Remote 'g' packet reply is too long"

Version-Release number of selected component (if applicable):
gdb-7.6.1-94.el7.x86_64
qemu-kvm-rhev-2.6.0-23.el7.x86_64
(rhel 7.3)

How reproducible:
always

Steps to Reproduce:
1. run qemu with -s option (or -g tcp:<list_addr>:<port> when 0:1234 doesn't fit
2. gdb [ /usr/libexec/qemu-kvm-rhev ] --ex 'target remote localhost:1234'
3.

Actual results:
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
/usr/libexec/qemu-kvm-rhev: No such file or directory.
Remote debugging using localhost:1234
Remote 'g' packet reply is too long: edffffff0000000000c09381ffffffff0000000000000001000000000000000000000000000000004600000000000000a0fe9381ffffffffa0fe9381ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000c09381ffffffff00c09381ffffffffa8ff9381ffffffff968e0581ffffffff8602000010000000180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f030000000000000000000000000000000000000000000000000000000000006f6e00636f6f6c6b6579706b313173256f6e00706373636c6974655f6e6f5f620000000000ffffffffffffffffffffff5c4e6f74696669636174696f6e00636f404040404040404040404040404040405b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b20202020202020202020202020202020000000000000000000000000000000000000ff000000000000000000ffff00ff000000202020202020202000202000200000ffffffffffffffffff00ffff00ff0000000000ff000000ffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a11f0000
(gdb) 

Expected results:
gdb connects and works

Additional info:
I found upstream bug with the same error message, thus blindly reporting against gdb as well:
https://sourceware.org/bugzilla/show_bug.cgi?id=13984

Comment 1 Jan Kratochvil 2017-01-11 19:41:06 UTC
I see there a problem:
  /usr/libexec/qemu-kvm-rhev: No such file or directory.

This is an upstream Bug, it is better to Cc to the upstream Bug and/or participate at GDB upstream mailing lists.

For RHEL once can backport something after it does work at least in Fedora.