DEBUGINFOD-FIND(1)
๐ NAME ๐
debuginfod-find โ request debuginfo-related data
okay so real talk, this one lives in the General Commands Manual, section 1 ๐ it's your little errand-runner for asking debuginfod servers "hey bestie, can I have this file please" and it's genuinely so useful, no cap.
โจ SYNOPSIS โจ
debuginfod-find [OPTION]... debuginfo BUILDID
debuginfod-find [OPTION]... debuginfo PATH
debuginfod-find [OPTION]... executable BUILDID
debuginfod-find [OPTION]... executable PATH
debuginfod-find [OPTION]... source BUILDID /FILENAME
debuginfod-find [OPTION]... source PATH /FILENAME
debuginfod-find [OPTION]... metadata KEY VALUE
likeโฆ pick a mode, pick an identifier, and go ๐ฆ
๐ธ DESCRIPTION ๐ธ
debuginfod-find goes and queries one or more debuginfod servers for debuginfo-related data. If it gets a match, it saves the requested file into a local cache, prints the file name to standard output, and dips out with a success status of 0. If anything goes wrong, it exits with a failure status and yells an error message at standard error. periodt. ๐
The debuginfod system uses buildids to identify debuginfo-related data. These live as binary notes inside ELF/DWARF files, and they're written as lowercase hexadecimal. So for example, if you wanna see the buildid of a program like /bin/ls, go peek at the ELF note GNU_BUILD_ID:
% readelf -n /bin/ls | grep -A4 build.id
Note section [ 4] '.note.gnu.buildid' of 36 bytes at offset 0x340:
Owner Data size Type
GNU 20 GNU_BUILD_ID
Build ID: 8713b9c3fb8a720137a4a08b325905c7aaf8429d
and then the hexadecimal BUILDID is literally just:
8713b9c3fb8a720137a4a08b325905c7aaf8429d
iconic, right? ๐
Now here's the cute part: instead of the hexadecimal BUILDID, debuginfod-find will also accept a PATH name pointing at an ELF binary, and it'll extract the buildid from it for you. This alternate mode kicks in if the file name has any character that isn't [0-9a-f]. And if you've got a file with a name that's ambiguously hex-looking โ like deadbeef โ you can still pass it by giving it an extra ./deadbeef path component. sneaky but valid ๐ซถ
๐ debuginfo BUILDID
If the buildid you handed over is known to a server, this request gets you a binary object containing the customary .*debug_* sections. That might be a split debuginfo file as created by strip, or it might be an original unstripped executable. either way, slay.
๐ executable BUILDID
If the given buildid is known to the server, this request gets you a binary object containing the normal executable segments. This may be an executable stripped by strip, or it may be an original unstripped executable. And yes โ ET_DYN shared libraries count as a type of executable here. bestie said "close enough, it's family" ๐
๐ source BUILDID /SOURCE/FILE
If the given buildid is known to the server, this request gets you a binary object containing the source file you mentioned. The path should be absolute.
Here's the thing though โ relative path names show up constantly in the DWARF file's source directory, but those paths are relative to each individual compilation unit's AT_comp_dir paths, and a single executable is made up of multiple CUs. so to disambiguate, debuginfod expects source queries to prefix relative path names with the CU compilation-directory, followed by a mandatory /. the way that slash is not optional, ok ๐ญ
Note: for software packaged by distributions, the CU compilation-directory may not be obvious. You can find it by inspectingAT_comp_dirvalues in downloaded debuginfo. For example, the comp_dir of the Fedora 37 version of/bin/lscan be found like this:
% debuginfod-find debuginfo /bin/ls
~/.cache/debuginfod_client/03529d48345409576cd5c82a56ad08555088d353/
% eu-readelf -w ~/.cache/debuginfod_client/03529d48345409576cd5c82a56ad08555088d353/debuginfo | grep comp_dir
comp_dir (line_strp) "/usr/src/debug/coreutils-9.1-6.fc37.x86_64/separate"
Note: the caller may or may not elide../or/./or extraneous///sorts of path components in the directory names.debuginfodaccepts both forms. Specifically,debuginfodcanonicalizes path names according to RFC3986 section 5.2.4 (Remove Dot Segments), plus reducing any//to/in the path.
For example:
#include <stdio.h> source BUILDID /usr/include/stdio.h
/path/to/foo.c source BUILDID /path/to/foo.c
../bar/foo.c AT_comp_dir=/zoo/ source BUILDID /zoo//../bar/foo.c
see how that last one justโฆ works? ๐ง
๐ section BUILDID SECTION-NAME
If the given buildid is known to the server, this request gets you a binary file containing the raw section contents โ whether it's found in an executable or in a separated debuginfo file. doesn't matter where it's hiding, we're getting it. ๐ฅ
๐ metadata KEY VALUE
All the designated debuginfod servers get queried for metadata about all files matching a given key/value query in their index. The results include names and buildids, which you can totally use in future queries to fetch the actual files. it's giving "preview before you commit" energy โจ
fileโ VALUE:pathโ exact match path, including in archivesglobโ VALUE:patternโ shell-style glob match pattern, including in archives, as infnmatch(FNM_PATHNAME)buildidโ VALUE:hexโ all executables and debuginfo files matching the given buildid
The resulting output will look something like the following:
{
"results":[
{
"type":"executable",
"buildid":"f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2",
"file":"/usr/local/bin/hello",
"archive":"/opt/elfutils/tests/test-2290642/R/rhel7/hello2-1.0-2.x86_64.rpm"
},
{
"type":"executable",
"buildid":"bc1febfd03ca05e030f0d205f7659db29f8a4b30",
"file":"hello2"
}
],
"complete":true }
The results of the search are output to stdout as a JSON object containing an array of objects, supplying metadata about each match, as well as a boolean value corresponding to the completeness of the result. The result is considered complete if all of the queries to upstream servers returned complete results and the local query succeeded. This metadata report may be cached. It may be incomplete and may contain duplicates. Additional JSON object fields may be present. so like, don't be shocked if you see extra stuff in there, it's fine ๐
The fields:
buildidโ TYPE:stringโ hexadecimal buildid associated with the filetypeโ TYPE:stringโ one ofdebuginfoorexecutablefileโ TYPE:stringโ matched file name, outside or inside the archivearchiveโ TYPE:stringโ archive containing matched file name, if any
It's worth noting that type cannot be source, since in order to perform such a search fast enough, additional indexing would need to be added to the database, which would nearly double its size. yeah no, we're not doing that ๐
The search also always combines both files and archives in the results, and at this time further granularity is not available. that's just the vibe check result, sorry bestie.
๐ OPTIONS ๐
-v,--verboseโ Increase verbosity, including printing frequent download-progress messages and printing the http response headers from the server. very "narrator voice on" of it ๐--help,--usageโ Print some help and exit. classic.
๐ SECURITY ๐
If IMA signature(s) are available from the RPMs that contain the requested files, then debuginfod will extract those signatures into response headers, and debuginfod-find will perform verification upon the files. Validation policy is controlled via tags inserted into $DEBUGINFOD_URLS. By default, debuginfod-find acts in ignore mode. ๐
If accessed across HTTP rather than HTTPS, the network should be trustworthy. Authentication information through the internallibcurllibrary is not currently enabled, except for the basic plaintexthttp[s]://userid:password@hostname/style. (Thedebuginfodserver does not perform authentication, but a front-end proxy server could.)
The following information is generic. Some debuginfod clients may internally override defaults listed here.
โจ bestie there is literally MORE of this page, we are NOT done, keep going ๐
โจ ENVIRONMENT VARIABLES โจ
okay bestie, gather round the group chat ๐ these env vars are the behind-the-scenes besties that tell the debuginfod client what to do. no skipping, they all matter.
๐พ $TMPDIR
points to the file system used for temporary files. the default is /tmp. simple, iconic.
๐ $DEBUGINFOD_URLS
this one is a list of URL prefixes for trusted debuginfod instances. alternate URL prefixes are separated by a space. it may be set by /etc/profile.d scripts reading /etc/debuginfod/*.urls files. it can also contain policy defining tags that dictate the response policy for verifying per-file IMA signatures in RPMs. as the space separated list is read left to right, when you hit a tag, the subsequent URLs up to the next tag get handled using that specified policy. all URLs before the first tag use the default policy, ima:ignore. for example:
DEBUGINFOD_URLS="https://foo.com ima:enforcing https://bar.ca http://localhost:8002/ ima:ignore https://baz.org"
so foo.com and baz.org use the default ignore policy, while bar.ca and localhost use an enforcing policy. the policy tag can be one of these:
ima:enforcingโ every downloaded file requires a valid signature, fully protecting integrity. no shortcuts.ima:ignoreโ skips verification altogether, providing no protection. it's giving trusting.
alerts of validation failure will be directed as specified in $DEBUGINFOD_VERBOSE. ๐
๐๏ธ $DEBUGINFOD_CACHE_PATH
this governs the location of the cache where downloaded files and cache-control files are kept. the default directory is chosen based on other environment variables, see below. it's the cache queen's address ๐
๐ $DEBUGINFOD_PROGRESS
governs the default progress function. if set, and if a progressfn is not explicitly set, then the library will configure a default progressfn. this function will append a simple progress message periodically to stderr. the default is no progress function output. so if you want lil updates, set it; if not, silence is golden โจ
๐ฃ๏ธ $DEBUGINFOD_VERBOSE
governs the default file descriptor for verbose output. if set, and if a verbose fd is not explicitly set, then the verbose output will be produced on STDERR_FILENO. yes bestie, it's chatty on purpose.
๐ $DEBUGINFOD_RETRY_LIMIT
governs the default limit of retry attempts. if a query failed with errno other than ENOENT, will initiate several attempts within the limit. so like, it's not giving up unless the error is ENOENT. periodt.
โณ $DEBUGINFOD_TIMEOUT
governs the download commencing timeout, in seconds, for each debuginfod HTTP connection. a server is skipped if it either fails to establish a connection within the timeout or fails to provide at least 100K of data within the timeout. the default is 90 seconds. zero or negative means "no timeout". so you can wait forever if you want, but that's a choice ๐
๐ฐ๏ธ $DEBUGINFOD_MAXTIME
dictates how long the client will wait to complete the download a file found on a server, in seconds. it is best used to ensure that a file is downloaded quickly or be rejected. the default is 0 (infinite time). so by default, it's patient like a saint.
๐ฆ $DEBUGINFOD_MAXSIZE
dictates the maximum size of a file to download in bytes. this is best used if the user would like to ensure only small files are downloaded. a value of 0 causes no consideration for size, and the client may attempt to download a file of any size. the default is 0 (infinite size). tiny file only? set it. big chaotic energy? leave it at 0. ๐
๐จ $DEBUGINFOD_HEADERS_FILE
points to a file that supplies headers to outbound HTTP requests, one per line. the header lines shouldn't end with CRLF, unless that's the system newline convention. whitespace-only lines are skipped. so no empty lines with main character energy, they get ignored.
๐ $DEBUGINFOD_IMA_CERT_PATH
contains a list of absolute directory paths holding X.509 certificates for RPM per-file IMA-verification. alternate paths are separated by colons. yes, colons. not commas. we love a specific separator. ๐
๐งบ CACHE ๐งบ
before each query, the debuginfod client library checks for a need to clean the cache. if it's time to clean, the library traverses the cache directory and removes downloaded debuginfo-related artifacts and newly empty directories, if they have not been accessed recently. it's giving spring cleaning but make it automated ๐งน
control files are located directly under the cache directory. they contain simple decimal numbers to set cache-related configuration parameters. if the files do not exist, the client library creates the files with the default parameter values as content. so they manifest themselves, iconic.
after each query, the debuginfod client library deposits newly received files into a directory & file that is named based on the build-id. a failed query is also cached by a special file. the naming convention used for these artifacts is deliberately undocumented. so don't ask, bestie, it's a secret ๐
๐ Cache directories
$XDG_CACHE_HOME/debuginfod_client/โ default cache directory, if$XDG_CACHE_HOMEis set.$HOME/.cache/debuginfod_client/โ default cache directory, if$XDG_CACHE_HOMEis not set.$HOME/.debuginfod_client_cache/โ deprecated cache directory, used only if preexisting. so like, only if it was already there. don't come for it.
๐งฎ Control files
cache_clean_interval_sโ this control file gives the interval between cache cleaning rounds, in seconds. the default is86400, one day.0means "immediately". so if you set0, it's clean-girl-clean-girl on loop.max_unused_age_sโ this control file sets how long unaccessed debuginfo-related files are retained, in seconds. the default is604800, one week.0means "immediately". no hoarding, periodt.cache_miss_sโ this control file sets how long to remember a query failure, in seconds. new queries for the same artifacts within this time window are short-circuited (returning an immediate failure instead of sending a new query to servers). this accelerates queries that probably would still fail. the default is600, 10 minutes.0means "forget immediately". so it's not holding grudges unless you tell it to.metadata_retention_sโ this control file sets how long to remember the results of a metadata query. new queries for the same artifacts within this time window are short-circuited (repeating the same results). this accelerates queries that probably would probably have the same results. the default is3600, 1 hour.0means "do not retain". yes, "probably would probably" is in the original, and we respect the chaos. ๐ญ
๐ SEE ALSO ๐
debuginfod(8)debuginfod_find_debuginfod(3)
and that's the whole page, bestie ๐ซถ โ DEBUGINFOD-FIND(1), from the debuginfod source/version, dated whenever your local manpage footer says it was. go forth and debug like the main character you are ๐
โจ
๐ฆ where this page comes from
- arch rolling: debuginfod 0.196-1
- arch rolling: debuginfod 0.197-1 ยท GPL-3.0-or-later
- centos-stream 10: elfutils-debuginfod-client 0.197-1.el10 ยท GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)
- centos-stream 9: elfutils-debuginfod-client 0.197-1.el9 ยท GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)
- centos-stream 9: elfutils-debuginfod-client 0.197-1.el9 ยท GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)
- fedora 43: elfutils-debuginfod-client 0.196-1.fc43
- fedora 43: elfutils-debuginfod-client 0.196-1.fc43
- fedora 43: elfutils-debuginfod-client 0.197-1.fc43 ยท GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)
- fedora 43: elfutils-debuginfod-client 0.197-1.fc43 ยท GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)
- fedora 44: elfutils-debuginfod-client 0.196-1.fc44
- fedora 44: elfutils-debuginfod-client 0.196-1.fc44
- fedora 44: elfutils-debuginfod-client 0.197-1.fc44 ยท GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)
- fedora 44: elfutils-debuginfod-client 0.197-1.fc44 ยท GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms