Bug 2042664 - gdb: internal-error: sect_index_data not initialized
Summary: gdb: internal-error: sect_index_data not initialized
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kevin Buettner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2041970 2042537 2045304
TreeView+ depends on / blocked
 
Reported: 2022-01-19 21:25 UTC by Jerry James
Modified: 2022-02-03 16:52 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-03 16:52:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2022-01-19 21:25:38 UTC
Description of problem:
I made an attempt at debugging a pdflatex crash (bug 2042421), but was stymied by a gdb internal error.  I ran "gdb /usr/bin/pdflatex" and gave permission to download debuginfo.  This is the tail of the GDB output:

Downloading 0.01 MB separate debug info for /lib64/libbrotlicommon.so.1                                                
Downloading -0.00 MB separate debug info for /lib64/liblzma.so.5
Downloading -0.00 MB separate debug info for /lib64/libpcre.so.1                                                       
Downloading -0.00 MB separate debug info for /builddir/.cache/debuginfod_client/37f6a27ef468c151ebdef9221635598885599a53/debuginfo
../../gdb/objfiles.h:510: internal-error: sect_index_data not initialized                                              
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

../../gdb/objfiles.h:510: internal-error: sect_index_data not initialized
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.

Version-Release number of selected component (if applicable):
gdb-11.1-9.fc36.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install texlive-latex on an x86_64 Rawhide machine
2. Invoke "gdb /usr/bin/pdflatex".
3. Invoke "run <some LaTeX file>".
4. Give GDB permission to download debuginfo.

Actual results:
GDB hits an internal error ... due to corrupt debuginfo downloads?  GDB also reports downloading negative 0 bytes for many of the debuginfo downloads.

Expected results:
GDB does not hit an internal error.

Additional info:

Comment 1 Jerry James 2022-01-19 21:28:40 UTC
I removed ~/.cache/debuginfod_client and tried again.  This time I did NOT give permission to download debuginfo.  The same internal error was encountered.

Comment 2 Kevin Buettner 2022-01-26 00:13:22 UTC
The recent gdb-12.0 inclusion into rawhide packages includes a libgcc_s which lacks a .data section.  Apparently, up 'til now, certain code within GDB requires a .data section to be present in executables and shared libraries.

I have posted a upstream patch which fixes this problem.  See:

https://sourceware.org/pipermail/gdb-patches/2022-January/185430.html

Once this patch makes it into upstream sources, we'll backport it to F35 and rawhide.

Comment 3 Severin Gehwolf 2022-01-27 17:45:26 UTC
This bug is breaking our OpenJDK builds in Fedora rawhide which routinely check whether or not backtraces can be gathered from OpenJDK builds (bug 2041970). We had to disable this check for the time being :-/

Comment 4 Sandro Mani 2022-01-28 20:30:31 UTC
Scratch build for those who need a working gdb on rawhide: https://koji.fedoraproject.org/koji/taskinfo?taskID=82076745

Comment 5 Kevin Buettner 2022-02-03 16:52:17 UTC
Should be fixed in gdb-11.1-12.fc36.x86_64.

HOWEVER, testing shows that there are still some problems.  I'm looking at those now.


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