Bug 2035283

Summary: gdb hangs until debuginfod metadata is downloaded
Product: [Fedora] Fedora Reporter: Vitaly <vitaly>
Component: gdbAssignee: Kevin Buettner <kevinb>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: ahajkova, amerey, blarsen, fweimer, helio, jan.kratochvil, jreznik, kde-sig, keiths, kevinb, manisandro, mcermak, pmuldoon, rdieter, sergiodj, thomas.zimmermann
Target Milestone: ---Keywords: Reopened
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: 2022-02-09 17:04:45 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:

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 Aaron Merey 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.