Bug 2035283 - gdb hangs until debuginfod metadata is downloaded
Summary: gdb hangs until debuginfod metadata is downloaded
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Buettner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-23 13:13 UTC by Vitaly
Modified: 2022-02-09 17:04 UTC (History)
16 users (show)

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


Attachments (Terms of Use)

Description Vitaly 2021-12-23 13:13:48 UTC
Description of problem:
Debugging with GDB is broken since 5.x as gdb hangs.

Tested also on 6.0.1 (built from Rawhide's SRPM in mock) - the same issue.

Version-Release number of selected component (if applicable):
qt-creator-5.0.1-2.fc35 (base)
qt-creator-6.0.1-1.fc35 (optional)

How reproducible:
Always.

Steps to Reproduce:
1. Start Qt Creator.
2. Load any C++ project.
3. Set any breakpoint.
4. Start debugging.

Actual results:
GDB will hang.

The gdb process has not responded to a command within 20 seconds. This could mean it is stuck in an endless loop or taking longer than expected to perform the operation.

You can choose between waiting longer or aborting debugging.

Expected results:
Qt Creator should stop on breakpoint.

Additional info:

Comment 1 Sandro Mani 2021-12-23 13:21:03 UTC
Most likely dependent on system environment, as it's working here (I'm debugging Qt/C++ on a daily basis with qt-creator).

Comment 2 Vitaly 2021-12-23 13:27:52 UTC
Changing "Debug" -> "Views" -> "Global debugger log" fixed this issue until the next Qt Creator start.

Comment 3 Vitaly 2021-12-31 13:58:34 UTC
The issue was https://fedoraproject.org/wiki/Debuginfod

gdb starts working only after the debuginfod client download ~1.2 GiB of files.

Can be easily reproduced. Remove all caches from ~/.cache/debuginfod* and start debugging in Qt Creator. It will hang until download complete.

Comment 4 Vitaly 2021-12-31 14:00:02 UTC
Workaround:

echo "set debuginfod enabled off" > ~/.gdbinit

Comment 5 Sandro Mani 2021-12-31 16:40:25 UTC
This needs to be reassigned to a more relevant component, I can't see what qt-creator can do about it.

Comment 6 Vitaly 2022-01-17 14:00:10 UTC
Changing component to gdb.

Btw, workaround doesn't work with Qt Creator.

Comment 7 amerey 2022-02-09 17:04:45 UTC
This issue should be fixed in gdb-11.1-6.fc35.x86_64. 

Debuginfod will not run by default when input is not coming from a terminal.

Additionally 'echo "set debuginfod enabled off" > ~/.gdbinit' will now disable debuginfod.

If you do wish to enable debuginfod in this case, 'echo "set debuginfod enabled on" > ~/.gdbinit' will do the trick.


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