|
1 | | -# debuginfod client |
| 1 | +# debuginfod support |
2 | 2 |
|
3 | | -In order to symbolize ingested profiles, Parca needs to have debug information |
4 | | -for the binaries that are being profiled. Debug information, also |
5 | | -referred to as _debuginfos_, can be ELF object files, DWARF debug data, and |
6 | | -source code. However, sometimes, application packages distributed by various Linux |
7 | | -distros [strip](https://man7.org/linux/man-pages/man1/strip.1.html) away debug |
8 | | -information to minimize the size of the binaries. Thankfully, there are publicly accessible |
9 | | -servers, distributing debug information for various Linux package managers and distributions. |
| 3 | +:::tip |
10 | 4 |
|
11 | | -[debuginfod](https://www.mankier.com/8/debuginfod) is an HTTP file server that serves debug |
12 | | -information to clients based on the build IDs of the binaries. You can find out the build ID |
13 | | -of a binary using the `file` command on Linux. |
| 5 | +This page assumes familiarity with what debuginfos are. First read the [debuginfos](debuginfos) docs page if you are not already familiar with debuginfos. |
14 | 6 |
|
15 | | -Here is an example to find out the build ID of a zsh shell: |
| 7 | +::: |
| 8 | + |
| 9 | +Unfortunately, packages distributed by various Linux distros [strip](https://man7.org/linux/man-pages/man1/strip.1.html) away debuginfos to minimize the size of the binaries. |
| 10 | + |
| 11 | +Thankfully, there are publicly accessible servers, distributing debuginfos for various Linux package managers and distributions. |
| 12 | + |
| 13 | +[debuginfod](https://www.mankier.com/8/debuginfod) is an HTTP file server that serves debuginfos to clients based on the Build IDs of the binaries. You can find out the Build ID of a binary using the `file` command on Linux. |
| 14 | + |
| 15 | +Here is an example to find out the Build ID of a zsh binary: |
16 | 16 |
|
17 | 17 | ``` |
18 | 18 | $ file /bin/zsh |
19 | 19 |
|
20 | 20 | /bin/zsh: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=24fcd0179bb3aa797de6a570c2359e528f7638c0, for GNU/Linux 3.2.0, stripped |
21 | 21 | ``` |
22 | | -Parca integrates with debuginfod to query for upstream debuginfod files and then |
23 | | -stores them for potential later use. The default debuginfod server used by Parca is |
24 | | -at https://debuginfod.elfutils.org . |
25 | | - |
26 | | -## Implementation |
27 | | - |
28 | | -Primarily, Parca looks for the relevant debug information files in its default |
29 | | -symbol store. However, if debug info files are not found in the symbol store, |
30 | | -Parca will try to fetch corresponding debuginfo files from the upstream |
31 | | -[debuginfod servers](https://sourceware.org/elfutils/Debuginfod.html), and store |
32 | | -them in the Parca symbol store, associated with the unique build ID of the object files. |
33 | | - |
34 | | -The symbol store is a wrapper around the [Parca object store](https://www.parca.dev/docs/storage#storing-debug-information) |
35 | | -to hold debug information. By default, Parca is configured to use the `/tmp` |
36 | | -directory on local disk. This can be reconfigured to use any other user-specified |
37 | | -location by editing the Parca configuration file. |
38 | | - |
39 | | -The debuginfod client is implemented as a read-through client storage cache. |
40 | | -An HTTP client is implemented to send requests to the upstream debuginfod servers. |
41 | | -The client queries the server addresses sequentially until it finds the suitable |
42 | | -debuginfo files. The downloaded object files are then stored in a `parca/debuginfod` |
43 | | -bucket with the build ID as the key. |
44 | | - |
45 | | -Users can add private debuginfod servers to be queried through the |
46 | | -` --debuginfod-upstream-servers` flag. |
| 22 | + |
| 23 | +Parca integrates with debuginfod to query for upstream debuginfod files and then stores them for potential later use. The default debuginfod server used by Parca is: https://debuginfod.elfutils.org |
| 24 | + |
| 25 | +To use a different set of debuginfod servers to attempt to retrieve debuginfos from use the `--debuginfod-upstream-servers` flag. |
47 | 26 |
|
48 | 27 | ## Additional Resources |
49 | 28 |
|
|
0 commit comments