Bug 2086761

Summary: gdb crashes with: ../../gdb/dwarf2/frame.c:1085: internal-error: Unknown CFA rule.
Product: Red Hat Enterprise Linux 9 Reporter: Mike Pattrick <mpattric>
Component: gdbAssignee: Keith Seitz <keiths>
gdb sub component: system-version QA Contact: Michal Kolar <mkolar>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: gdb-bugs, ohudlick
Version: 9.1Keywords: Bugfix, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-10.2-10.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:30:54 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:
Embargoed:
Deadline: 2022-07-18   

Description Mike Pattrick 2022-05-16 14:45:42 UTC
Description of problem:

When attempting to attach GDB to a kernel in qemu, both a host and guest running the same 5.14.0-86 kernel, I'm unable to load module symbols into GDB.


Version-Release number of selected component (if applicable):

gdb.x86_64 - 10.2-9.el9
gcc.x86_64 - 11.3.1-2.el9 
kernel.x86_64 - 5.14.0-86.kpq0.el9
qemu-kvm.x86_64 - 17:7.0.0-2.el9

How reproducible:

Happens every time.


Steps to Reproduce:
1. Install a recent build of RHEL 9.1 on host and guest
2. Use provided RPMs for kernel, kernel-devel, and kernel-source
3. Attach GDB to guest and run lx-symbols

Actual results:

(gdb) lx-symbols
loading vmlinux
scanning for modules in /usr/lib/debug/usr/lib/modules/5.14.0-86.kpq0.el9.x86_64
scanning for modules in /root
../../gdb/dwarf2/frame.c:1085: internal-error: Unknown CFA rule.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

Comment 1 Mike Pattrick 2022-05-16 18:14:51 UTC
I installed gdb-12.1 from source and it resolved this issue. It seems to be GDB 10 related: https://sourceware.org/bugzilla/show_bug.cgi?id=26876

Comment 2 Keith Seitz 2022-05-16 18:51:43 UTC
Yes, that's correct.

@mpattric , you've filed the bug against GTS11, but there is no such release for RHEL9. Did you mean the system version?

Planning has already ended for 9.1, so unless we can convince the stakeholders, we'll have to defer to 9.2. [Fortunately, the patch is practically trivial.]

This patch will be included with gcc-toolset-12-gdb (the first GTS release for RHEL9).

Comment 3 Mike Pattrick 2022-05-16 18:59:40 UTC
Yes sorry, changed it to the system version.

Comment 5 Michal Kolar 2022-06-29 08:39:04 UTC
Verified with gdb-10.2-10.el9.

Comment 9 errata-xmlrpc 2022-11-15 10:30:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gdb bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8167