Bug 2026402

Summary: Doesn't respect unset DEBUGINFOD_URLS in ~/.gdbinit
Product: [Fedora] Fedora Reporter: Bastien Nocera <bnocera>
Component: gdbAssignee: Guinevere Larsen <guinevere>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: ahajkova, fweimer, guinevere, jan.kratochvil, keiths, kevinb, mcermak, pmuldoon, sergiodj
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-11.1-7.fc34 gdb-11.1-6.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-02 01:24:29 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 Bastien Nocera 2021-11-24 15:07:16 UTC
gdb seems to expect to be running in an environment with DEBUGINFOD_URLS already unset to disable auto-downloading debuginfo data. I would expect disabling this to be possible from within ~/.gdbinit. This isn't listed as a possible option in:
https://fedoraproject.org/wiki/Debuginfod#Disabling

unset environment DEBUGINFOD_URLS
or
set environment DEBUGINFOD_URLS ""
in ~/.gdbinit don't disable auto-downloading of debuginfos.

Comment 1 Guinevere Larsen 2021-11-25 17:37:25 UTC
GDB accepts disabling debuginfod through .gdbinit, by using either

set debuginfod enabled off
or
set debuginfod urls

environment refers to the environment variables that will be passed to the inferior (program running under GDB) rather than environment variables that GDB itself will interact with. So I am closing this as "not a bug", but we have updated the wiki to mention how to use .gdbinit to disable debuginfod

Comment 2 Bastien Nocera 2021-11-30 09:49:20 UTC
"set debuginfod enabled off", which is the recommended configuration option in the wiki, doesn't work as expected.

$ gdb
GNU gdb (GDB) Fedora 11.1-5.fc35
[...]
/home/hadess/.config/gdb/gdbinit:1: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
(gdb) q
$ head -n1 /home/hadess/.config/gdb/gdbinit
set debuginfod enabled off

"set debuginfod urls" or "set debuginfod urls /dev/null" fail in the same way.

Comment 3 Guinevere Larsen 2021-11-30 12:56:13 UTC
Apologies. It seems that these commands relied on a patch that hadn't been backported to fedora yet. We're already working on backporting them to fedora, so they should arrive soon.

Comment 4 Bastien Nocera 2022-01-05 09:32:59 UTC
Can we please get some movement into getting this fix into a Fedora update?

This "feature" is really riling up developers that use Fedora, myself included.

Comment 5 Guinevere Larsen 2022-01-05 12:13:07 UTC
We are working on this as fast as we can, it just turned out to be much more complicated than expected. 

In the meantime, you can disable this feature by unsetting the DEBUGINFOD_URLS environment variable

Comment 6 Fedora Update System 2022-01-07 14:10:49 UTC
FEDORA-2022-39ffce84e3 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-39ffce84e3

Comment 7 Fedora Update System 2022-01-08 01:41:15 UTC
FEDORA-2022-39ffce84e3 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-39ffce84e3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-39ffce84e3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-01-10 13:08:06 UTC
FEDORA-2022-e3b891fe11 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e3b891fe11

Comment 9 Fedora Update System 2022-01-11 01:34:30 UTC
FEDORA-2022-e3b891fe11 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-e3b891fe11`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-e3b891fe11

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2022-02-02 01:24:29 UTC
FEDORA-2022-39ffce84e3 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.