PR27092: debuginfod low-memory handling
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 5 Feb 2021 01:31:56 +0000 (20:31 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 5 Feb 2021 17:38:50 +0000 (12:38 -0500)
commitaa121ea7f19e002c5e4738616342cd1d7be1bfd2
tree67c8a093b4871b72900ed9a5c5736f73844b1c97
parent6362941714548d93a348239ca8b8038005bd57cd
PR27092: debuginfod low-memory handling

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>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx
doc/ChangeLog
doc/debuginfod.8
tests/ChangeLog
tests/run-debuginfod-find.sh