[PATCH] debuginfod: Check result of curl_easy_getinfo in debuginfod_write_callback

2022-05-09 Thread Mark Wielaard
This was the only place in debuginfod-client.c where we didn't check the result of curl_easy_getinfo. Just check it to make things consistent. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 5 + 1 file changed, 5 insertions(+) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLo

[PATCHv2] debuginfod: Check result of curl_easy_getinfo in debuginfod_write_callback

2022-05-09 Thread Mark Wielaard
This was the only place in debuginfod-client.c where we didn't check the result of curl_easy_getinfo. Just check it to make things consistent. Signed-off-by: Mark Wielaard --- v2 This time with the actual code change... debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c |

[PATCH] debuginfod: Check all curl_easy_setopt calls

2022-05-09 Thread Mark Wielaard
curl_easy_setup can fail for various reasons. Add a curl_easy_setopt_ck macro to check all curl_easy_setopt calls and provides a human readable error message in verbose mode. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 5 +++ debuginfod/debuginfod-client.c | 61 +++

[PATCH] libdw: Add sanity check to store_implicit_value

2022-05-09 Thread Mark Wielaard
Don't just skip the block length, but check it is equal to the op->number that we are going to use as length. Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 4 libdw/dwarf_getlocation.c | 5 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libdw/ChangeLog b/

[Bug debuginfod/29098] set default prefetch limits to >0

2022-05-09 Thread Noah Sanci via Elfutils-devel
debuginfod/debuginfod.cxx: - Added default value to fdcache_prefetch_mds and fdcache_prefetch_fds when -R is specified. Defaults to one half of fdcache's values for those respective variables. These values are only set when -R is specified Note: the ratio of prefetch:fdcache file descrip

Re: [Bug debuginfod/29098] set default prefetch limits to >0

2022-05-09 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > + // Make the prefetch cache spaces smaller than the normal > + // fd cache if rpm scanning is on. This is to not waste memory > + // since the prefetch cache isn't used when -R isn't specified > + // Set to 1/2 arbitrarily > + if ( scan_archives[".rpm"] == "cat" ) > +{ > + if

[Bug debuginfod/28577] Make run-debuginfod-fd-prefetch-caches.sh test something

2022-05-09 Thread nsanci at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28577 Noah Sanci changed: What|Removed |Added Assignee|unassigned at sourceware dot org |nsanci at redhat dot com

[PATCH] strip: Add more NULL check

2022-05-09 Thread Mark Wielaard
When gelf_getshdr, gelf_getrela, gelf_getrel or gelf_getsymshndx return NULL it is an internal error which we want to report instead of crashing. Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/strip.c | 12 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --

[PATCH] debuginfod: Always request servname from getnameinfo for conninfo.

2022-05-09 Thread Mark Wielaard
When getting the connection info getnameinfo is called getting the hostname and servname except when the sockaddr is a pure ipv6 address. In that last case only hostname is requested. Since servname is stack allocated and not initialized it might contain garbage which is then put in the log. Just a

Optimize debuginfod-client cache lookup/cleanup a little

2022-05-09 Thread Mark Wielaard
Hi, debuginfod-client would try to create the cache config files twice, once through debuginfod_init_cache, which was always called before the debuginfod_clean_cache check. Which called debuginfod_config_cache which also tried to create the config files when they didn't exist yet. debuginfod_confi

[PATCH 1/3] debuginfod: Make sure debuginfod_config_cache always returns valid stat

2022-05-09 Thread Mark Wielaard
If the condig file which value was requested from debuginfod_config_cache didn't exist yet, stat would fail and no valid struct stat would be returned even when the file was correctly created. Fix this by always using O_CREAT to open the file, and reuse that file descriptor to call fstat and for ei

[PATCH 2/3] debuginfod: Remove debuginfod_init_cache

2022-05-09 Thread Mark Wielaard
debuginfod_init_cache would create all config files if they didn't exist yet. It always made two stat calls. Then debuginfod_clean_cache would call debuginfod_config_cache which did the same checks and created any missing config files. Just make sure the cache_path directory exists and remove debug

[PATCH 3/3] debuginfod: update mtime of interval_path as early as possible

2022-05-09 Thread Mark Wielaard
Call utime on interval_path file as soon as the thread is committed to cleanup the cache files. This will prevent other threads trying to also commit to cleaning the cache files. Having multiple threads try to clean the cache simultaniously doesn't improve cleanup speed because the threads will try

Re: [Bug debuginfod/29098] set default prefetch limits to >0

2022-05-09 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Thanks, committing this, with corrected comments and changelog entries and a bit of man page cleanup. diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 619ebd8c9202..026908c85000 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,7 @@ +2022-05-09 Noah Sanc

☺ Buildbot (GNU Toolchain): elfutils - build successful (master)

2022-05-09 Thread builder--- via Elfutils-devel
A restored build has been detected on builder elfutils-debian-armhf while building elfutils. Full details are available at: https://builder.sourceware.org/buildbot/#builders/6/builds/19 Build state: build successful Revision: c7982c9e3bee93422dd140568587e2796e0c96ca Worker: debian-armhf Buil