summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* PR27701: debuginfod client: encourage reused debuginfod_client objectsFrank Ch. Eigler2021-04-302-2/+10
| | | | | | | | | | | | | | | | | Client objects now carry long-lived curl handles for outgoing connections. This makes it more efficient for multiple sequential queries, because the TCP connections and/or TLS state info are kept around awhile, avoiding O(100ms) setup latencies. debuginfod is adjusted to take advantage of this for federation. Other clients should gradually do this too, perhaps including elfutils itself (in the libdwfl->debuginfod_client hooks). A large gdb session with 117 debuginfo downloads was observed to run twice as fast (45s vs. 1m30s wall-clock time), just in nuking this extra setup latency. This was tested via a debuginfod intermediary: it should be even faster once gdb reuses its own debuginfod_client. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* doc/debuginfod.8: fix wrong parameter name for .deb files in descriptionFrank Ch. Eigler2021-04-041-1/+1
| | | | | | | One place in the description referred to the parameter for .deb/.ddeb files as "-D" as opposed to the correct "-U". Signed-off-by: Andreas Ziegler <andreas.ziegler@fau.de>
* PR27092: debuginfod low-memory handlingFrank Ch. Eigler2021-02-052-0/+15
| | | | | | | | | | | | | | | | | | | | | | A couple of closely related pieces of work allow more early warning about low storage/memory conditions: - New prometheus metrics to track filesystem freespace, and more details about some errors. - Frequent checking of $TMPDIR freespace, to trigger fdcache emergency flushes. - Switch to floating point prometheus metrics, to communicate fractions - and short time intervals - accurately. - Fix startup-time pthread-creation error handling. Testing is smoke-test-level only as it is hard to create free-space-limited $TMPDIRs. Locally tested against tiny through medium tmpfs filesystems, with or without sqlite db also there. Shows a pleasant stream of diagnostics and metrics during shortage but generally does not fail outright. However, catching an actual libstdc++- or kernel-level OOM is beyond our ken. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* doc: fix spelling typosDmitry V. Levin2020-12-115-7/+14
| | | | | | | | | | | filesytem -> filesystem requries -> requires hte -> the recieve -> receive varients -> variants preceeded -> preceded Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* debuginfod: export DEBUGINFOD_SONAME macro in debuginfod.hDmitry V. Levin2020-12-092-0/+19
| | | | | | | | Add DEBUGINFOD_SONAME macro to API for use by those of libdebuginfod clients that would like to dlopen the library in the same way as __libdwfl_debuginfod_init does. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* debuginfod-client: Add debuginfod_set_verbose_fd and DEBUGINFOD_VERBOSEMark Wielaard2020-11-232-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new function debuginfod_set_verbose_fd which will produce verbose output on a given file descriptor (STDERR_FILENO if the environment variable DEBUGINFOD_VERBOSE is set) showing how the search for a particular client query is going. Example output: debuginfod_find_debuginfo 1234567890 server urls "https://debuginfod.elfutils.org/ http://dbgd.usersys.com:3632/" checking build-id checking cache dir /home/mark/.cache/debuginfod_client using timeout 90 init server 0 https://debuginfod.elfutils.org/ url 0 https://debuginfod.elfutils.org/buildid/1234567890/debuginfo init server 1 http://dbgd.usersys.com:3632/ url 1 http://dbgd.usersys.com:3632/buildid/1234567890/debuginfo query 2 urls in parallel server response HTTP response code said error url 0 The requested URL returned error: 404 Not Found server response HTTP response code said error url 1 The requested URL returned error: 404 Not Found not found No such file or directory (err=-2) Signed-off-by: Mark Wielaard <mark@klomp.org>
* PR26775: make grooming progress visible & interruptibleFrank Ch. Eigler2020-10-302-2/+10
| | | | | | | | | | | On very large servers, it's desirable to be able to interrupt a rescan or groom cycle. SIGUSR[12] now do that. (Unfortunately, this is not practically testable in the testsuite, since these cycles are so fast on that small dataset.) We also expose more internal progress count about the grooming pass, so the administrator can assess possible need to interrupt. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: Translate CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.Mark Wielaard2020-10-262-1/+7
| | | | | | | | | | | When a file couldn't be retrieved because of an bad HTTPS certificate find-debuginfod currently says: Server query failed: No such file or directory With this patch it will say: Server query failed: Connection refused Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod-find.1: Fix formatting on wide consolesFrank Ch. Eigler2020-10-072-0/+9
| | | | | | | The SYNOPSIS section looks less funny with missing .br directives added in. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: Add --disable-libdebuginfod and --enable-libdebuginfod=dummy.Mark Wielaard2020-07-042-1/+7
| | | | | | | | | | Make it possible to build just the debuginfod client or to create a dummy libdebuginfod that doesn't link against libcurl. The dummy library can be used for bootstrapping. For testing purposes you can also build debuginfod against the dummy libdebuginfod but then the debuginfod server will not be able to do delegation. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: Document and sanity check debuginfod_add_http_header format.Mark Wielaard2020-03-302-1/+14
| | | | | | | | | | Document and sanity check the format of the header string form that can be passed to debuginfod_add_http_header. It should contain precisely one colon, which cannot be the first or last character. And the function should only be used to add optional headers, not replace any existing standard ones. Anything else isn't supported. Signed-off-by: Mark Wielaard <mark@klomp.org>
* PR25728: disable debuginfod --port=0Mark Wielaard2020-03-282-3/+8
| | | | | | | | | | | | When starting debuginfod with --port=0 it would start using a random port (possibly different for ipv4 and ipv6). This seems to be an accidental and not very useful functionality. Just produce an error when started with --port=0. https://sourceware.org/bugzilla/show_bug.cgi?id=25728 Signed-off-by: Mark Wielaard <mark@klomp.org> Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* PR25722: debuginfod-find: accept /path/names in place of buildid hexFrank Ch. Eigler2020-03-272-2/+15
| | | | | | | | | Extend the debuginfod-find command line interface to permit /file/names instead of only buildid hexadecimal strings. v2: move code into debuginfod-find; client API remains buildid only. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: User-Agent and X-Forwarded-For header relayFrank Ch. Eigler2020-03-274-0/+25
| | | | | | | | | Extend the debuginfod client API with a function to stuff outgoing headers into libcurl http transfers. Use this from debuginfod so federated trees of debuginfod/httpd can trace back to to the originating client for administrative purposes. Docs & test included. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: document and workaround fedora31 zstd compressionFrank Ch. Eigler2020-03-262-1/+9
| | | | | | | | | | Old enough (even RHEL8 era) rpm/libarchive tools cannot grok fedora31 zstd-compressed rpms. Disable those tests if necessary. Document -Z based workaround for these debuginfod users. https://fedoraproject.org/wiki/Changes/Switch_RPMs_to_zstd_compression Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* PR25548: support canonicalized source-path names in debuginfod webapiFrank Ch. Eigler2020-03-264-12/+20
| | | | | | | | | | | | | Programs are sometimes compiled with source path names containing noise like /./ or // or /foo/../, and these survive into DWARF. This code allows either raw or canonicalized pathnames in the webapi, by letting the client pass things verbatim, and letting the server store/accept both raw and canonicalized path names for source files. Tests included & docs updated. Signed-off-by: Frank Ch. Eigler <fche@redhat.com> Reported-by: Eli Schwartz <eschwartz@archlinux.org> Tested-by: Eli Schwartz <eschwartz@archlinux.org>
* debuginfod client API: add get_url functionFrank Ch. Eigler2020-03-224-0/+19
| | | | | | | 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-225-5/+42
| | | | | | | | 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: default to XDG cache.Aaron Merey2020-02-282-5/+13
| | | | | | | | | | | | 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 PR25583: map -R to -Z.rpmFrank Ch. Eigler2020-02-252-1/+6
| | | | | | | | | | 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-252-7/+14
| | | | | | | Introduce new option --fdcache-prefetch to accelerate repeated queries from the same debuginfo archive. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod/doc: Fix typo debuginfo_progressfn_t -> debuginfod_progressfn_tKonrad Kleine2020-02-121-3/+3
| | | | | | | I've copied the type name for the progress function from the manual and noticed that it didn't compile... Signed-off-by: Konrad Kleine <kkleine@redhat.com>
* debuginfod: generalized archive supportFrank Ch. Eigler2020-02-102-15/+36
| | | | | | | | | 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>
* doc: Fix DEBUGINFOD_PROGRESS description to just mention output on stderr.Mark Wielaard2020-01-122-2/+7
| | | | | | | | An earlier variant of the default progress function could write to any file. Which is still in the documentation. But the actual implementation just uses stderr. Fix the documentation to match. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: extracted-from-archive file cacheFrank Ch. Eigler2020-01-112-0/+14
| | | | | | | | | | | 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: rework threading model for file/archive scanningFrank Ch. Eigler2020-01-112-46/+55
| | | | | | | | | | 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-104-16/+19
| | | | | | | 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 server: support .deb/.ddeb archivesFrank Ch. Eigler2019-12-222-31/+49
| | | | | | | | | 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-193-6/+28
| | | | | | | | | | 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: add client contextMark Wielaard2019-11-233-11/+42
| | | | | | | | | | Add a mandatory debuginfod_begin()/_end() call pair to manage a client object that represents persistent but non-global state. From libdwfl, dlopen the debuginfod.so client library early on. This hopefully makes sure that the code (and the libcurl.so dependency) is loaded before the program goes into multi-threaded mode. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod 5: add /metrics endpointFrank Ch. Eigler2019-11-231-2/+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/+9
| | | | | | 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-224-16/+55
| | | | | | | | 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-222-1/+371
| | | | | | | | | | 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-225-1/+330
| | | | | | | | | | | | 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>
* readelf: Add --dyn-sym option.Mark Wielaard2019-09-102-2/+12
| | | | | | | | | | | It is already possible to select the symbol table to print by name, using --symbols=SECTION. This allows printing the dynamic symbol table with --symbols=.dynsym. binutils readelf allows printing just the dynamic symbol table by type using --dyn-sym. Add the same option and document it. Also add a testcase to show --symbols=.dynsym and --dyn-sym produce the same output. Signed-off-by: Mark Wielaard <mark@klomp.org>
* config: Fix spec file, add manpages and new GFDL license.Mark Wielaard2019-08-293-1/+6
| | | | | | | | | Now that we have manpages lets also package them. Rename COPYING to COPYING-GFDL to make it not clash with the top-level COPYING file. Also fix up the spec file so it can be used to create a srpm again. Add eu-stack to the file list. Signed-off-by: Mark Wielaard <mark@klomp.org>
* Begin adding some docs to elfutilsBen Woodard2019-08-2710-14/+1317
| | | | | | | | | | | | | | | | | | | - Added doc/README - Updated doc/ChangeLog - Added a eu-readelf manpage based on the one from binutils. - Added a brand new manpage for eu-elfclassify the new utility. - Add some new files in the doc directory and sync makefile with upstream. - Reenable the compilation of doc directory. - Disable sgml file building - Build man pages the automake way Since V1 - Put man pages in the proper directories. - Added copy of Gnu Free Documentation License - Modified eu-readelf.1 man page to match the supported options. Signed-off-by: Ben Woodard <woodard@redhat.com> Signed-off-by: Mark Wielaard <mark@klomp.org>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change name from "Red Hat elfutils" to "elfutils". * Update license of standalone tools and test from GPLv2 to GPLv3+. * Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+. * Add Developer Certificate of Origin based contributor policy. top-level: - COPYING: Upgraded from GPLv2 to GPLv3. - CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files. - NEWS: Added note about new contribution and license policy. - Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST. - configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'. backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf: - All files updated to GPLv2/LGPLv3+. Except some very small files (<5 lines) which didn't have any headers at all before, the linker .maps files and the libcpu/defs files which only contain data and libelf/elf.h which comes from glibc and is under LGPLv2+. config: - elfutils.spec.in: Add new License: headers and new %doc files. - Update all license headers to GPLv2/LGPLv3+ for files used by libs. src, tests: - All files updated to GPLv3+. Except for the test bz2 data files, the linker maps and script files and some very small files (<5 lines) that don't have any headers. Signed-off-by: Richard Fontana <rfontana@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Remove .mtn-ignore and .cvsignore files.Mark Wielaard2012-06-051-1/+0
| | | | We use .gitignore these days.
* Fix FSF address. No exception for libdwarf.Ulrich Drepper2006-04-041-1/+1
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2006-04-041-8/+20
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* Adjust for monotone.Ulrich Drepper2005-07-264-0/+486