summaryrefslogtreecommitdiff
path: root/debuginfod/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* PR25367: improve debuginfod webapi loggingfche/pr25367Frank Ch. Eigler2020-03-241-0/+9
| | | | | | | Improve debuginfod logging to show webapi query results including http status, sizes, and processing times. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod-client thinko: non-default progressfn extra outputFrank Ch. Eigler2020-03-241-0/+6
| | | | | | | | A previous commit changed the default_progressfn output format to \rFOOBAR, to be terminated by an \n when the download finished. The \n terminator was conditional on the wrong thing (env var setting, rather than actual progressfn setting), so the \n could be printed even if an app overrode the default.
* debuginfod-find: Correct error check for -v source comboFrank Ch. Eigler2020-03-241-0/+5
| | | | | | | Hardcoding argv[2] is wrong in presence of -v option. Code immediately following did the correct argv[] indexing already. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod client API: add get_url functionFrank Ch. Eigler2020-03-221-0/+9
| | | | | | | This function lets a client know, during or after a progressfn callback, what the url of the winning outgoing download is/was. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod client API: add get/set user_data functionsFrank Ch. Eigler2020-03-221-0/+6
| | | | | | | | Add a pair of functions to associate a void* parameter with a client object. Requested by GDB team as a way to pass file names and such user-interface data through to a progressfn callback. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod-client: Update cache_path when the new default path existsAaron Merey2020-03-041-0/+5
| | | | | | | | | Update cache_path with the path of the new default directory when this directory already exists. Previously cache_path was updated only when creating the new default directory and would otherwise be set to the old default path. Signed-off-by: Aaron Merey <amerey@redhat.com>
* debuginfod-client: default to XDG cache.Aaron Merey2020-02-281-0/+7
| | | | | | | | | | | | PR25502: debuginfod client should default to XDG cache Location of client cache now defaults to $XDG_CACHE_HOME/debuginfod_client. If XDG_CACHE_HOME is not set then fallback to $HOME/.cache/debuginfod_client. Also maintain backwards compatibility with the previous default path- if $HOME/.debuginfod_client_cache exists, use that instead of the new defaults. Signed-off-by: Aaron Merey <amerey@redhat.com>
* debuginfod: file:// URLs: handle curl resp. codeKonrad Kleine2020-02-261-0/+5
| | | | | | | | | | | | | | When file:// is used for DEBUGINFOD_URLS, then the response code for a successful server query is 0 and not 200. Using file:// can be helpful when you want to test your debuginfod-client integration against a mocked file tree that mimics the HTTP URLs from the debuginfod server. This way you don't have to run the debuginfod server at all. Fixes https://sourceware.org/bugzilla/show_bug.cgi?id=25600 Signed-off-by: Konrad Kleine <kkleine@redhat.com>
* debuginfod PR25583: map -R to -Z.rpmFrank Ch. Eigler2020-02-251-0/+4
| | | | | | | | | | It was reported that libarchive (bsdtar) at least as far back as rhel7 (3.1.2) can natively process RPM files, so there's no need to mediate those accesses through rpm2cpio. There's no noteworthy performance or testing impact. Signed-off-by: Frank Ch. Eigler <fche@redhat.com> Signed-off-by: Mark Wielaard <mark@klomp.org>
* PR25375: fdcache prefetching to reduce repeated archive decompressionFrank Ch. Eigler2020-02-251-0/+13
| | | | | | | Introduce new option --fdcache-prefetch to accelerate repeated queries from the same debuginfo archive. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* PR25365: debuginfod-client: restrict cleanup to client-pattern filesAaron Merey2020-02-191-0/+5
| | | | | | | | Avoid deleting general files and directories in case a user mis-sets $DEBUGINFOD_CACHE_PATH or accidentally moves a file into the cache. Signed-off-by: Aaron Merey <amerey@redhat.com>
* debuginfod: generalized archive supportFrank Ch. Eigler2020-02-101-0/+6
| | | | | | | | | Add a '-Z EXT[=CMD]' option to debuginfod, which lets it scan any given extension and run CMD on it to unwrap distro archives. For example, for arch-linux pacman files, -Z '.tar.zst=zstdcat' lets debuginfod grok debug and source content in split-debuginfo files. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: diagnostics verbosity tweakFrank Ch. Eigler2020-01-221-0/+5
| | | | | | | marxin reported "skipping hat= .... empty comp_dir" messages were too chatty for the journnal. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* PR25394: debuginfod mutex between grooming and scanningfche/debuginfod-PR25394Frank Ch. Eigler2020-01-191-0/+11
| | | | | | | | | | | | | | | | | | | | Extended the work-queue concept with "idlers" - other threads that block on the work queue until it becomes empty (rather than normal consumers that block on it until it becomes non-empty). Use this facility for the groomer thread to avoid working at the same time as the scanner threads. Use this for the fts traversal thread for similar reasons. One user-visible effect: response to SIGUSR1 and SIGUSR2 will wait until the work queue runs empty, but the man page was unspecific so does not need changing. It's not obvious how to test this with a tests/ dataset so small that scanning takes negligible time, so the former races are very tight. P.S. We also evaluated using sqlite level transactions to isolate the scanner thread groups-of-operations from the groomer. These experiments failed to produce a nominally concurrent debuginfod, having triggered "database locked" type errors. So we remain single-threaded (fully serialized) at the sqlite API level.
* PR25415: fix debuginfod SEGV for empty search path listFrank Ch. Eigler2020-01-181-0/+4
| | | | | Prevent triggering undefined behaviour of fts(3), which causes a SEGV on fedora glibc 2.29.
* debuginfod: extracted-from-archive file cacheFrank Ch. Eigler2020-01-111-0/+12
| | | | | | | | | | | Add a facility to service webapi and dwz/altdebug requests that resolve to archives via a $TMPDIR file cache. This permits instantaneous dwz resolution during -debuginfo rpm scanning, and also instantanous duplicate webapi requests. The cache is limited both in number of entries and in storage space. Heuristics provide serviceable defaults. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: print U-A: and X-F-F: request headersFrank Ch. Eigler2020-01-111-0/+6
| | | | | | | | | For an incoming webapi request, print two headers that should assist in the administration of a debuginfod service. At fweimer's suggestion, added a bit of filtering so the text is more reliably parseable. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: rework threading model for file/archive scanningFrank Ch. Eigler2020-01-111-0/+16
| | | | | | | | | | We switch from a thread per supplied PATH, with a semaphore based concurrency control, to a fixed number of worker threads collecting the result of a plain directory traversal being put into a work queue. This allows maximal continuous concurrency, even if the PATH directories are dramatically differently sized. There is no more need to use concurrency-motivated subdirectory wildcards for PATH entries: just a single top level directory will work fast. doc & tests incl.
* debuginfod: Use DEBUGINFOD_TIMEOUT as seconds to get at least 100K.Mark Wielaard2020-01-101-0/+8
| | | | | | | Use just one timeout using CURLOPT_LOW_SPEED_TIME (default 90 seconds) and CURLOPT_LOW_SPEED_LIMIT (100K). Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: pass a distro-summary User-Agent request headerFrank Ch. Eigler2020-01-091-0/+6
| | | | | | | | | | | | It may be useful for a debuginfod server operator to know what kinds of clients make webapi requests. This is mainly as a telemetry/diagnostic (though the data cannot be really trusted). It may also be useful to automate downloading of distro packages to a debuginfod server in the case of an unknown hex buildid. doc/testing not affected as these are diagnostics. Signed-off-by: Frank Ch. Eigler <fche@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* debuginfod server: support .deb/.ddeb archivesFrank Ch. Eigler2019-12-221-0/+7
| | | | | | | | | Add support for scanning .deb / .ddeb files, enabled with a new command line option "-U". Using a synthetic .deb/.ddeb from a Ubuntu 18 machine, extend the debuginfod testsuite with some .deb processing, if the dpkg-deb binary is installed. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: usability tweaks, incl. $DEBUGINFOD_PROGRESS client supportFrank Ch. Eigler2019-12-191-0/+10
| | | | | | | | | | This facility allows a default progress-printing function to be installed if the given environment variable is set. Some larger usage experience (systemtap fetching kernels) indicates the default timeout is too short, so forked it into a connection timeout (default short) and a transfer timeout (default unlimited). Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: Check the DEBUGINFOD_URLS environment variable early in client.Mark Wielaard2019-12-111-0/+5
| | | | | | | | | | | | | | | | | | If the debuginfod-client isn't configured we should do as little as possible. Simply return early with ENOSYS if no servers are configured. This means we won't check This does change the behavior of the debuginfod_find calls slightly. Previously we would setup and check the cache if the given build-id was valid. Which might have provided a result if an earlier client had run with the same cache and valid server URLs which knew about that particular build-id. Now we don't return any cached results unless at least one server is configured. This prevents selinux errors when the library is used in a confined setup. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: Fix implicit conversion from 'CURLcode' to 'CURLMcode'Mark Wielaard2019-12-091-0/+5
| | | | | | | | | | | | | | GCC10 warns when converting the value of one enum type into another: debuginfod-client.c:530:24: error: implicit conversion from ‘CURLcode’ to ‘CURLMcode’ [-Werror=enum-conversion] 530 | curl_res = curl_easy_getinfo(target_handle, | ^ libcurl has different error code enums. The "easy" interfaces return a CURLcode error. The "multi" interface functions return a CURLMcode. Signed-off-by: Mark Wielaard <mark@klomp.org>
* Fix BUILD_STATIC build and enable gcov for debuginfod.Mark Wielaard2019-11-261-0/+5
| | | | | | | | libdw now always needs -lpthread and -ld even when BUILD_STATIC. BUILD_STATIC is only used when doing a gcov enabled build. Enable gcov coverage also for debuginfod. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: Tweak groom cycle for memory freeingFrank Ch. Eigler2019-11-251-0/+5
| | | | | | | Use the sqlite3_db_release_memory() call periodically. It should have no effect except hopefully smaller server memory usage. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* tests: Don't sleep in run-debuginfod-find.sh, but wait till ready.Mark Wielaard2019-11-251-0/+6
| | | | | | | | Wait for the debuginfod server to finish and use the metrics to see when a server is ready for the next test instead of sleeping. Also remove DEBUGINFOD_TEST_WEBAPI_SLEEP. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: Add found_{executable,debuginfo,sourcerefs}_total metrics.Mark Wielaard2019-11-241-0/+8
| | | | | | | Keeps metrics of how many executables, debuginfo and sourcerefs were found in total for file and rpm scanners. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod 5: add /metrics endpointFrank Ch. Eigler2019-11-231-0/+11
| | | | | | | | This webapi extensions allows admins to hook up debuginfod to a prometheus-compatible monitoring system for general situational statistics. The metrics are simple enough that local curl requests can give a user a sense of what's going on. The metrics are documented as unstable with respect to future versions.
* debuginfod 4: symbolic link traversal modeFrank Ch. Eigler2019-11-221-0/+5
| | | | | | In order to support file/rpm archives that are organized via symlink trees, add an "-L" option to debuginfod, meaning about the same as for find(1) or ls(1): to traverse rather than ignore symlinks.
* debuginfod 3/3: client interruptabilityFrank Ch. Eigler2019-11-221-0/+15
| | | | | | | | For interactive clients such as gdb, interruptibility is important for usability during longer downloads. This patchset adds a download-progress callback function to the debuginfod client library, with which a caller app can interrupt a download as well as be notified of its quantitative progress.
* debuginfod 2/2: server sideFrank Ch. Eigler2019-11-221-0/+6
| | | | | | | | | | Add the server to the debuginfod/ subdirectory. This is a highly multithreaded c++11 program (still buildable on rhel7's gcc 4.8, which is only partly c++11 compliant). Includes an initial suite of tests, man pages, and a sample systemd service. Signed-off-by: Frank Ch. Eigler <fche@redhat.com> Signed-off-by: Aaron Merey <amerey@redhat.com>
* debuginfod 1/2: client sideAaron Merey2019-11-221-0/+9
Introduce the debuginfod/ subdirectory, containing the client for a new debuginfo-over-http service, in shared-library and command-line forms. Two functions in libdwfl make calls into the client library to fetch elf/dwarf files by buildid, as a fallback. Instead of normal dynamic linking (thus pulling in a variety of curl dependencies), the libdwfl hooks use dlopen/dlsym. Server & tests coming in patch 2. Signed-off-by: Aaron Merey <amerey@redhat.com> Signed-off-by: Frank Ch. Eigler <fche@redhat.com>