Re: [PATCH] PR30879: debuginfod intermittent terminate()

2023-10-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > The new terminate_handler seems really useful, I wonder why something > like this isn't the default behaviour. Yeah. > I think I understand the idea behind wrapping scan () to catch the > reportable_exception. Yup. > The sqlite_checkpoint_pb looks simpler now. But I must admit I don't >

Re: [PATCH 00/14] elfutils: DWARF package (.dwp) file support

2023-09-27 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > This patch series adds support for DWARF package files to libdw and the > elfutils tools. It supports the GNU DebugFission format for DWARF 4 [1] > and the format standardized in DWARF 5 (section 7.3.5 "DWARF Package > Files"). It supports both automatically opening the .dwp file for a > sk

[PATCH] PR30879: debuginfod intermittent terminate()

2023-09-22 Thread Frank Ch. Eigler via Elfutils-devel
Author: Frank Ch. Eigler Date: Fri Sep 22 15:30:51 2023 -0400 PR30879: intermittent debuginfod crash with unhandled exception Code inspection identified two places where sqlite_ps objects were being created/used outside try/catch protection. This patch wraps or replaces

Re: Building Elfutils with Mingw32

2023-09-18 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] I would prefer to use MinGW instead of Cygwin. For some extra > context, we use the Yocto Project to build our Embedded Linux > images, which can provide a cross compiler toolchain and other host > development tools for Windows using MinGW. [...] FWIW, I'm not aware of any conflict b

Re: Building Elfutils with Mingw32

2023-09-13 Thread Frank Ch. Eigler via Elfutils-devel
Hi, Colin - > I'm currently trying to determine the level of effort required to > compile Elfutils for Windows using MinGW. I'd like to get a version > of Elfutils compiled with libdebginfod in order to compile GDB with > debuginfod support on Windows. I've currently explored two > avenues... Nic

[PATCH] PR28204, debuginfod IMA

2023-09-07 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Here's a squashed/rebased version of the big IMA patch. I also tweaked a few documentation oriented bits, and removed the "ima:default" tag. commit 4e45a08aee42958298a3fad6043cbf96243d13a5 (HEAD -> users/fche/try-bz28204, origin/users/fche/try-bz28204) Author: Ryan Goldberg Date: Mon A

PR30809, was Re: [PATCH v2 2/2] debuginfod-client.c: Fix x-debuginfod-size counts differently than CURLINFO_SIZE_DOWNLOAD_T

2023-08-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > What is the status of this patch/discussion? U forgot about it. But that's OK, filed PR30809, and wrote & tested this little patch: commit 3ef3fab0d64c89a52dd6e2ce0d01dd5e713d7b5a Author: Frank Ch. Eigler Date: Tue Aug 29 14:08:04 2023 -0400 PR30809: improve debuginfod client

Re: Fwd: Anton Baltser, bug with libdebuginfod

2023-07-30 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I need to install > I tried to install elfutils - 0.189 version , and I could solve installing > libdebuginfod. > My system ubuntu 20.04/wsl2 > > I used ./configure --prefix=/usr\ > --disable-debuginfod \ > --enable-libdebuginfod=dummy \

Re: Performance issue with systemd-coredump and container process linking 2000 shared libraries.

2023-06-21 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > On our side Francois also told me this afternoon that he didn’t > really reproduce the same thing with my reproducer posted here and > the real systemd-coredump issue he witnessed live, and also noticed > that with DEBUGINFOD_URLS unset/set to the empty string my > reproducer has no problem

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Hmm, how would the effective behavior of this differ from directly > returning the path? The symlink could become invalid at any time [...] Effective behaviour is about the same, but code logic and explanation is simpler. > It would make sense if the cache were made to contain a hard link

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > So I guess, sans the format, the feature request would just be that > it would have a shortcut for file URLs to produce the path directly > in response to e.g. a debuginfod_find_debuginfo, rather than making > a copy of the file via libcurl. A compromise solution could be for new code to p

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-05-31 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Ah, I had forgotten completely that file URLs worked out of the box > (libcurl, duh). Yeah. > When we tried that way back when, the issue was just that it > actually does a libcurl fetch out of that path and saves another > copy of the file into the cache. Yes, a copy is made. This is "

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-05-31 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > It would be really nice if there were, a DEBUGINFOD_LOCAL_PATH environment > variable that provided a colon-separated list of directories in the GDB > `.build-id//` [...] Please note that $DEBUGINFOD_URLS can already include file:// URLs that identify local filesystems whose direct

Re: Segfault in dwfl_module_getsrc

2023-05-09 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I tried to use elfutils to retrieve the backtrace within a signal handle, > but I am having a segfault inside `dwfl_module_getsrc`. > [...] A red flag is "within a signal handler". The kinds of code that one may safely invoke in a signal handler are highly limited. Most elfutils function

[patch]: PR30316: debuginfod wal checkpointing

2023-05-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - This is patch 2/2 of this series. commit 9b70bce69268eaae7621791ba7c72639469d4a69 Author: Frank Ch. Eigler Date: Mon May 8 11:05:48 2023 -0400 PR30316: debuginfod wal checkpointing Add a "--scan-checkpoint=NUM" option to debuginfod to control forced synchronization & sq

[patch] PR30378: debuginfod, _files table compression

2023-05-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - This is patch 1 of 2 of important filesystem usage reduction work for debuginfod. commit 8ee1cc26b08f773c1c6d2f8ed2f68a88534cf93d Author: Frank Ch. Eigler Date: Fri May 5 13:56:23 2023 -0400 debuginfod: PR30378: better compression for _files table Split the _files table int

[patch] PR30377: debuginfod -r -X

2023-04-21 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Planning to push this one-liner fix shortly. A new test case exercises the -r / -I / -X ops. commit bc6c774dfb61ac61a66195a269579544f97eeb30 Author: Frank Ch. Eigler Date: Fri Apr 21 17:04:08 2023 -0400 PR30377: fix debuginfod -r -X combination Until this fix, debuginfod -r

[patch] [obv] PR30348: debuginfod: retry partial archive scans

2023-04-13 Thread Frank Ch. Eigler via Elfutils-devel
Planning to push this shortly: Author: Frank Ch. Eigler Date: Thu Apr 13 13:11:56 2023 -0400 PR30348: debuginfod: retry partial archive scans On some public debuginfod servers, it was observed that errors may occur during individual archive scanning operations. That's fin

PR29472: debuginfod metadata query

2023-04-12 Thread Frank Ch. Eigler via Elfutils-devel
Hi - At long last, for your review, an updated & merged patch for $SUBJECT. "git diff -s" against git/master follows, code also on users/fche/try-pr29472e. Author: Frank Ch. Eigler Date: Tue Apr 11 23:35:25 2023 -0400 PR29472: debuginfod: add metadata query webapi, C api, client

Re: Some ideas for process improvements/changes

2023-04-06 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > - Get rid of ChangeLog files and trivial ChangeLog entries > [...] Yes please! > - Use patchwork more > [...] This doesn't seem like something for community/contributors to do - patchwork seems mostly a maintainer/committer tool. > It would be nice if it was automated a bit more b

Re: [PATCH v2 2/2] debuginfod-client.c: Fix x-debuginfod-size counts differently than CURLINFO_SIZE_DOWNLOAD_T

2023-03-30 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Hey, great idea actually tallying up writes in the callback function. > > (We need to take care to clear that counter, in case of client object > > reuse.) Also, can you think of some reason not to just use that value > > at all times, i.e., without any of that "if and only if ..." busin

Re: [PATCH 3/3] debuginfod: When retrieving files from cache, update atime manually

2023-03-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > The cache cleaning logic requires atime to be correct (strictatime) but > most users on Linux only have relatime or even noatime. This is not really correct: relatime is the kernel default and works fine with the cache. atime values updated once a day are still plenty for caches with a mu

Re: [PATCH v2 1/2] debuginfod-client.c: Fix download size not correctly fallbacks to x-debuginfod-size header

2023-03-29 Thread Frank Ch. Eigler via Elfutils-devel
> +2023-03-29 lilydjwg > + > + * debuginfod/debuginfod-client.c: Fix download size not correctly > + fallbacks to x-debuginfod-size header Thanks, merged. - FChE

Re: [PATCH 1/3] debuginfod: Replace futimes with futimens

2023-03-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Similar to what 8c4aa0ef998191ed828a37190dc179b91649938a did for ar and > strip, replace the non-standard futimes with the POSIX futimens. Thanks, merged (with a little ChangeLog thing added ... please free us, mjw!). - FChE

Re: [PATCH v2 2/2] debuginfod-client.c: Fix x-debuginfod-size counts differently than CURLINFO_SIZE_DOWNLOAD_T

2023-03-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > x-debuginfod-size is the actual file size, but CURLINFO_SIZE_DOWNLOAD_T > is transferred size, i.e. the gzipped one if gzip is on. > Let's count written data and use that if and only if x-debuginfod-size > is used. Hey, great idea actually tallying up writes in the callback function. (We n

Re: [PATCH] debuginfod-client.c: Fix download size not correctly fallbacks to x-debuginfod-size header

2023-03-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > The reason is that when Content-Length is unavailable, cl is set to -1 > by curl Is that behaviour from new versions of curl? > but dl_size remains as 0, but later dl_size == -1 is checked. Or perhaps dl_size needs to be initialized to -1 ("unknown") vs 0 ("known to be zero"), a

Re: [PATCH v2 4/7] x86_64_return_value_location: Support lvalue and rvalue references

2023-02-10 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > $ cat 1.cpp > int &foo() { throw; } > int &&bar() { throw; } > $ g++ -g 1.cpp -c > and then running > > $ LD_LIBRARY_PATH=../libelf:../libdw ./funcretval -e 1.o > > What would be a good way to integrate such a testcase? > Currently all tests are built with gcc, is it okay to add one > bui

Re: ☠ Buildbot (Sourceware): elfutils - failed test (failure) (master)

2023-02-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > A new failure has been detected on builder elfutils-gentoo-sparc while > > building elfutils. > > > > Full details are available at: > > https://builder.sourceware.org/buildbot/#builders/225/builds/10 > > - test-suite.log: > > https://builder.sourceware.org/buildbot/#builder

preservation of signed rpms

2023-01-26 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Recently, fedora koji has started applying per-file (IMA) signatures to RPMs it has built. This is in addition to the overall GPG signature of the RPM payload as a whole. While this extra capability is not yet fully developed in userspace, we do have one ready user (elfutils debuginfod [1])

Re: ☠ Buildbot (GNU Toolchain): elfutils-try-debian-armhf - failed compile (failure) (users/marxin/try-zstd-support-v2)

2022-12-21 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > Unfortunately buildbot itself doesn't show the config.log. > Trying to get that... Ah darn. It would have been saved in bunsen, but the buildbot configuration means that a make-stage failure means it won't even try. - FChE

Re: PATCH: Bug debuginfod/29472 followup

2022-11-10 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Are you sure the interface is correct? Hard to be sure, so it's left generalized. The APIs would be unchanged if future search strategies are added (or subtracted); they'd affect the choice of acceptable KEY strings. We know we want glob patterns over executable file names. I've seen c

patch, debuginfod

2022-11-03 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Showing diff -w to omit reindentation whitespace noise. Maybe worth backporting to 0.188 releases, could affect federation intermediate servers with burst workload. commit ec166cf3c8d825a2f02aca448a0823de12e78991 (HEAD -> master) Author: Frank Ch. Eigler Date: Thu Nov 3 10:07:31 2022 -0

PATCH: Bug debuginfod/29472 followup

2022-11-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - On the users/fche/try-pr29472 branch, I pushed a followup to Ryan's PR29472 draft from a bunch of weeks ago. It's missing some ChangeLog's but appears otherwise complete. It's structured as Ryan's original patch plus my followup that changes things around, so as to preserve both contributio

Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections

2022-10-26 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Is/should the section name be URL-encoded? Yes! > I would drop the maybe_debuginfo_section heuristics. There are some > sections like .strtab/.symtab that are probably in the debug file, but > might be in the executable. I would assume that a named section can > normally be found in the d

Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections

2022-10-24 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Generally looks fine, thanks a lot. A few nits: - use of write(2) to put files onto disk is not quite right; write(2) can be partial, so you need a loop (or a macro wrapping a loop) - not sure I understand why the code worries about dots in or not in section names. Why not just pass th

Re: [PATCH 1/7] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

2022-10-21 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > C:\work\xemu\elfutils>git reset --hard > 4cc429d2761846967678fb8cf5868d311d1f7862 > error: invalid path 'tests/debuginfod-rpms/hello2.spec.' > fatal: Could not reset index file to revision > '4cc429d2761846967678fb8cf5868d311d1f7862'. Sounds like a git-induced problem. Maybe try a differe

Re: Fuzzing elfutils

2022-10-21 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Cf https://oss-fuzz.com/testcases?open=yes&q=Arbitrary&proj=elfutils This is inaccessible without logins. > > I would like to know what you think about this. Is this a bug to > > you ? Or is it expected ? [...] Crashes on crafted inputs are generally bugs. Security implications are u

Re: [PATCH 1/7] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

2022-10-19 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I really want this to be merged :) ping Frank, > as this would stop me clone elfutils on windows If it doesn't break "make rpm" (or at least rpm -ts elfutils*.tar.bz2), it's fine. But I don't understand the problem - my windows machines have no problem with files named "hello2.spec2." wit

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-10-17 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Fatal error in GNU libmicrohttpd daemon.c:3831: Failed to remove FD > > from epoll set. > > Very odd. I don't have any hypothesis for why these are occuring. > > I believe this is an intermittent libmicrohttpd bug. :-( Pushing this patch as obvious ... and will try to track this one dow

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-10-17 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Fatal error in GNU libmicrohttpd daemon.c:3831: Failed to remove FD > from epoll set. > Very odd. I don't have any hypothesis for why these are occuring. I believe this is an intermittent libmicrohttpd bug. :-( - FChE

Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections.

2022-09-28 Thread Frank Ch. Eigler via Elfutils-devel
Hi, Aaron - On Tue, Sep 27, 2022 at 10:10:52PM -0400, Aaron Merey via Elfutils-devel wrote: > [...] In order to distinguish between debuginfo and executable > files with the same build-id, this function includes a bool > parameter use_debuginfo. If true, attempt to retrieve the section > from t

Re: [PATCH] Retrive 64bit timestamp from curl_easy_getinfo on _TIME_BITS=64 environment

2022-09-27 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I'm not sure the fix is the correct way, but > since -D_TIME_BITS=64 mandates -D_FILE_OFFSET_BITS=64 in glibc, > this does work on glibc environment. Thanks, this looked fine in a quick test, so merged. - FChE

Re: [patch git] PR28284 - debuginfod x-debuginfod* header processing

2022-09-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Good point, we don't want an aborted new transfer to retain records > > from a previous run, will fix that. > > Not just a new transfer, but also when we hit the cache before doing a > new transfer. Currently when we hit the cache and don't do any transfer > the winning_headers will poin

Re: [patch git] PR28284 - debuginfod x-debuginfod* header processing

2022-09-06 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Thanks for giving it a look. > > I had a bit of time to tweak Noah Sanci's PR28284 work, and I believe > > it addresses Mark's last set of comments (from a while ago). This > > follow-up patch corrects things like case sensitivity, spacing, \r\n > > processing, and tweaks documentation. >

Re: [PATCH] debuginfod: Use auto-sized connection pool when -C is not given with arg

2022-09-05 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > Fix this by using an auto-sized thread pool when '-C' is not given, just > as we do when it's given with no argument. Update the doc's description > of '-C'. Thanks, pushed. - FChE

[patch git] PR28284 - debuginfod x-debuginfod* header processing

2022-09-02 Thread Frank Ch. Eigler via Elfutils-devel
Hi - I had a bit of time to tweak Noah Sanci's PR28284 work, and I believe it addresses Mark's last set of comments (from a while ago). This follow-up patch corrects things like case sensitivity, spacing, \r\n processing, and tweaks documentation. The gist of it is to add a new client api functi

debuginfod metadata patch review

2022-08-31 Thread Frank Ch. Eigler via Elfutils-devel
Hi, Ryan - Sorry it's been taking time. These are some notes for what I believe is the newest snapshot in git: users/rgoldber/try-metadata_query. Overall things look fine. The gist of it (for the sake of audience) is the introduction of a new webapi to query debuginfod servers for metadata abou

Re: Artix Linux debuginfod

2022-08-25 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Artix Linux has deployed[0] its own instance of debuginfod and we'd be happy > if you added it to your federated server list. Our CI creates debug packages > for all eligible software and our -debug repos are currently getting > populated. The server is available at https://debuginfod.artix

Re: [PATCH] debuginfod: fix http_requests_total{type="debuginfo"} when dwz is used

2022-08-17 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > When dwarf_extract_source_paths is called, it can call handle_buildid > when a rpm file used dwz. Ignore such internal request in > http_requests_total statistics. Noble goal: > @@ -1906,7 +1906,7 @@ handle_buildid (MHD_Connection* conn, > const string& buildid /* unsafe

Re: [PATCH] debuginfod: print filename for "cannot open archive" error

2022-08-17 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Report the file that has such a problem so that one can inspect it. > Signed-off-by: Martin Liska The complication with this type of change is that the exception text objects also make it into the prometheus metrics. When file names and such variables show up, they will bifurcate all the

Re: [PATCH] Support nullglob in profile.*.in files

2022-08-16 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > In openSUSE we have the following RPM checker that uses > shopt -s nullglob: > https://github.com/openSUSE/post-build-checks/blob/master/checks/50-check-libtool-deps#L31 OK, lgtm. We'd hate to have a stuck cat. - FChE

Re: debuginfod Credential Helper RFC

2022-08-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] I could also see file-based config being useful if some > aspect of the debuginfod configuration can change from > moment-to-moment. Environment variables could be used for that, but > it would require either changing those variables in the calling > shell or wrapping each debuginfod

Re: [PATCH] debuginfod: optimize regular expressions in groom()

2022-08-03 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Subject: [PATCH] debuginfod: optimize regular expressions in groom() Thanks, pushed. - FChE

Re: [PATCH 1/1] debuginfod: create indexes to speed up grooming

2022-07-30 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Create indexes on _r_de and _f_de tables > to speed up delete operations called by groom() function. > Primary keys of those tables are optimalized to search rows > by buildids so delete by file and mtime attributes > has to scan the whole table. [...] By the way, another possible approach

Re: [PATCH 1/1] debuginfod: create indexes to speed up grooming

2022-07-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Subject: [PATCH 1/1] debuginfod: create indexes to speed up grooming > Create indexes on _r_de and _f_de tables > to speed up delete operations called by groom() function. Pushed, thanks! - FChE

Re: [PATCH] libdwfl: name dwfl_get_debuginfod_client stub's arg

2022-07-18 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Since the stub version of "dwfl_get_debuginfod_client" doesn't name its > parameter, building elfuitls fails on a system with gcc 10.2.1: Thanks, pushed this patch. - FChE

Re: elfutils configuration issue on musl

2022-07-11 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I am working on building elfutils for a project where I am building for > i3x86 with musl and I am facing configure: WARNING: "libc does not have argp" > checking for argp_parse in -largp... no > configure: error: "no libargp found" Yes, musl does not include an implementation of the arg

Re: Expanding control over debuginfod usage from dwfl [was: Re: Questions regarding debuginfod.h API]

2022-07-06 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I'm working on GUI applications (hotspot [1], gammaray [2]), people do not > look at the command line output. I want to show the download progress and > status graphically instead. [...] Aha, got it. I'd say a extern debuginfod_client *dwfl_get_debuginfod_client (Dwfl *); type fun

Re: Expanding control over debuginfod usage from dwfl [was: Re: Questions regarding debuginfod.h API]

2022-07-06 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > a) Notifying the user that a download is ongoing. Right now, it feels like > the > tool is frozen as no feedback is given to the user. Right, can you explain how DEBUGINFOD_PROGRESS=1 is not a good fit in your case? - FChE

Re: Expanding control over debuginfod usage from dwfl [was: Re: Questions regarding debuginfod.h API]

2022-07-06 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Thus my proposal, and RFC: > > > > ``` > > /* Let us mirror the debuginfod progressfn for dwfl and forward it to > >the internal debuginfod client, if available. > >This way, dwfl's usage of debuginfod can stay optional and we would not > >need to link to debuginfod directly

Re: [PATCH] config: Remove unnecessary setting/unsetting of prefix in profiles

2022-06-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > In both profile.csh.in and profile.sh.in we set and then unset > prefix, but never use it. It is used, because the autoconf @sysconfdir@ macro expands to a string like "$prefix/...", which requires the shell variable $prefix to be set. - FChE

Re: [PATCH] debuginfod: add --disable-source-scan option.

2022-06-03 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > --disable-source-scan disables scanning of the dwarf source info > of debuginfo sections. The source info is not required in setups > without source code access. Thanks, merged (with a bit of ChangeLoggery added afterwards). - FChE

Re: debuginfod & Debian source packages

2022-06-02 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > OK, this was going to be my next question. Out of curiosity, how would > debuginfod invoke this external program? That's the best part. It doesn't need to. :-) Whatever program you're using to freshen the repository of .deb's that your debuginfod scrapes, could also run this prog

Re: debuginfod & Debian source packages

2022-06-02 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I'm the maintainer of debuginfod.debian.net (currently offline due to a > hardware issue :-/). O no. (And also, please consider upgrading your elfutils version, as later ones have less pessimal behavior with long grooming ops.) > The service provides only debuginfo for now, but I > would

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-05-27 Thread Frank Ch. Eigler via Elfutils-devel
Hi - n-metrics.sh: line 198: 27160 Aborted (core dumped) env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../debuginfod/debuginfod $VERBOSE -d ${DB} -F -U -t0 -g0 -p $PORT1 L D F > vlog$PORT1 2>&1 > [...] > Process 27160 (debuginfod) of user 994 killed by SIGABRT - ignoring (low free

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

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

RFC patch: generated AUTHORS

2022-04-24 Thread Frank Ch. Eigler via Elfutils-devel
Hi - The following patch adds a tool AUTHORS.sh to compute a complete AUTHORS list to cover the entire git history. We do this in systemtap and it's a nice way of showing off the large list of contributors over time. commit 72823322be9a8f0143de21ccfb67a89696a9522f (HEAD -> master2) Author: Fran

Re: run-debuginfod-webapi-concurrency.sh (Was: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure)) (master)

2022-04-23 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > But there is another way to prevent the "Server reached connection > limit. Closing inbound connection." Pass the MHD_USE_ITC flag to > MHD_start_daemon: Yeah, that looked promising to me too. When I was last working on this, that would have been my next thing to try. I can't think of a

Re: run-debuginfod-webapi-concurrency.sh

2022-04-23 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > I think that might be Frank's local experimentation. I also got email > about my workers being unavailable. If you run a buildbot locally it > will not see any workers connect and after an hour it will try to > notify the owners. Sorry about that. After this noisy testing, I pushe

Re: [PATCH 2/2] debuginfod: ensure X-DEBUGINFOD-SIZE contains file size

2022-04-22 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > - add_mhd_response_header (r, "X-DEBUGINFOD-SIZE", > - to_string(fs.st_size).c_str()); > + rc = fstat (fd, &fs); > + if (rc == 0) > +add_mhd_response_header (r, "X-DEBUGINFOD-SIZE", > +

Re: PATCH: testsuite debuginfod

2022-04-22 Thread Frank Ch. Eigler via Elfutils-devel
> Date: Sat, 16 Apr 2022 14:37:23 -0400 > Mark Wielaard writes: > > > I think we should drop this patch for now. Or are you still working on > > it? > > Sure, let's drop it. > Will bring in the xfail "cmd..." based one instead before too long. > > - FChE - FChE

Re: Questions regarding debuginfod.h API

2022-04-16 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > > My `debuginfod.h` also does not show any (useful) inline API > > > documentation for most of that file. Could this please be improved? > > > The doxygen for dwfl is great and can be read directly together with > > > the code, > > > > As they say, patches welcome. :-) The header contain

Re: ☠ Buildbot (Wildebeest Builder): elfutils - failed test (failure) (master)

2022-04-13 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > So maybe corruptin the sqlite database prevents a proper shutdown of > the debuginfod process? Yeah, that test is a bit blunt and unpredictable. (We're literally overwriting a piece of the database file that the process has open and has random parts in cache.) I'm thinking this is not wo

Re: parallel downloads of multiple debuginfo files

2022-04-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > But once again - isn't this a problem that everyone using dwfl is going to > encounter? Should we not try to find a general solution to this problem and > fix it for all consumers of the API? I suspect not many apps are going to have a complete list of files they know they'll need a prio

Re: parallel downloads of multiple debuginfo files

2022-04-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > one more debuginfod question: Would it be possible to extend the API > to allow downloading of multiple debug info files in parallel? The > `debuginfod_find_*` API currently only supports looking at multiple > server urls in parallel. I would like to ask multiple files in > parallel. Spin

Re: caching failed lookups of debuginfo?

2022-04-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > another debuginfod related question, but unrelated to the other thread I > started earlier today. In a work branch I have ported my heaptrack profiler > over to elfutils. I have then run the analyzer that uses elfutils (and thus > debuginfod internally via dwfl) on a recorded data file t

Re: Questions regarding debuginfod.h API

2022-04-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > (See also the DEBUGINFOD_MAXTIME and DEBUGINFOD_MAXSIZE env vars > > that can limit this.) > I did come across those, but what are suggested best practices in > setting those? When using GDB or a profiler on larger non-trivial UI > applications on Linux for the first time, we would start

Re: Questions regarding debuginfod.h API

2022-04-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > now that archlinux is supporting debuginfod, I have finally tried it > out. It's such a game changer, many thanks for everyone involved in > working on this! Our pleasure! > Now to my question: In applications using elfutils, we will now > automatically download debug information when DEB

Re: patch: debuginfod ipv4-ipv6 dual-stack

2022-04-04 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > That IN6_IS_ADDR_V4MAPPED is funny. Is that actually used in practice? Yeah, actually all the time. On a dual-stack socket, an ipv4 connection gets an ipv6 peer-address that renders like :::1.2.3.4. > Too bad this cannot be merged with conninfo above. > But this calculates less inf

patch: debuginfod ipv4-ipv6 dual-stack

2022-04-03 Thread Frank Ch. Eigler via Elfutils-devel
Hi - This little improvement reduces wasted memory from duplicated worker threads for ipv4 vs ipv6 stacks. commit 3a00f412b6554ba70f7b7e3d3aa6f67f278868af (HEAD -> master) Author: Frank Ch. Eigler Date: Sun Apr 3 19:42:48 2022 -0400 debuginfod: use single ipv4+ipv6 microhttpd daemon conf

[PATCH] PR28708 debuginfod testsuite

2022-04-03 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Planning to commit this shortly. commit e646e363e72e06e0ed5574c929236d815ddcbbaf (HEAD -> master) Author: Frank Ch. Eigler Date: Sun Apr 3 12:47:17 2022 -0400 PR28708: debuginfod: use MHD_USE_EPOLL for microhttpd threads Testing on s390x and other architectures indicates th

Re: [PATCH] Avoid dlopen on debuginfod-client when not configured

2022-03-29 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Avoid dlopen() when no debuginfo url is set. > > The patch itself looks right. But I am slightly afraid this > (theoretically?) will break some programs which set DEBUGINFOD_URLS > themselves. We currently have no other way to make libdwfl use > debuginfod-client. Thoughts? I've been th

Re: Signing keys for releases?

2022-02-25 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Could you please point me toward the PGP/GPG public keys necessary to > validate the elfutils release tarballs against their .sig files? Try these: https://sourceware.org/elfutils/ftp/gpgkey-1AA44BE649DE760A.gpg https://sourceware.org/elfutils/ftp/gpgkey-5C1D1AA44BE649DE760A.gpg - FChE

RFC PATCH: debuginfod client doc tweak

2022-01-31 Thread Frank Ch. Eigler via Elfutils-devel
commit c4726913b7766634cc5d8a97624e1b4708452d73 (HEAD -> master) Author: Frank Ch. Eigler Date: Mon Jan 31 18:13:40 2022 -0500 man debuginfod-client-config.7: Elaborate $DEBUGINFOD_URLS Add reference to /etc/profile.d and /etc/debuginfod/*.urls as possible source of default. (

Re: [PATCH] config: simplify profile.*sh.in

2022-01-18 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > 1. Remove needless profile=@profile@ You mean "prefix=@prefix@". And it's not needless, because @sysconfdir@ often expands to "$prefix/something", which requires a prefix var to be set for evaluation. > 2. Simplify needless sh -c "cat glob 2>/dev/null" >into cat glob 2>/dev/null Th

Re: patch rfc: PR28661: debuginfod thread-pool

2021-12-09 Thread Frank Ch. Eigler via Elfutils-devel
Hi, Mark - > So I would recommend to simply add a testcase that just uses no-option, > -C and -C 256 (or take any arbitrary number, 1 might be an interesting > corner case) and see that if you have 4 (8, 16, ...?) debuginfod-find > (or curl metric) processes doing some parallel queries works as >

Re: patch rfc: PR28661: debuginfod thread-pool

2021-12-09 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > If you can use ulimit -u or ulimit -T in the run-test.sh script then > please use that, but that probably requires launching sub-shells and > you quickly end up in shell-hell. A problem I found with that is that ulimit -u appears to be systemwide in the sense that a new process/thr

Re: right, trying --enable-sanitizer-address on armv7l

2021-12-09 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > I was trying the new --enable-sanitizer-address on our armv7l buildbot > worker and it almost works as is, except for... > > debuginfod.cxx:3472:12: runtime error: reference binding to misaligned > address 0x00561ec9 for type '', which requires 2 byte > alignment > [...] > But I don't unde

Re: [PATCH] debuginfod/debuginfod-client.c: use long for cache time configurations

2021-12-09 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > x32, riscv32, arc use 64bit time_t even while they are 32bit > architectures, therefore directly using integer printf formats will not > work portably. > Use a plain long everywhere as the intervals are small enough > that it will not be problematic. lgtm! - FChE

patch rfc: PR28661: debuginfod thread-pool

2021-12-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - While I think this patch itself is fine, and works around the libmicrohttpd bug that motivated it, I don't know how to test it seriously in the testsuite. (We can certainly try few -C options for parsing & operability.) The error edge cases only appear to occur under very high load and task

Re: [PATCH] debuginfod/debuginfod-client.c: correct string format on 32bit arches with 64bit time_t

2021-12-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > We seem to not expect these intervals to be much bigger than a week, > so an int should always be big enough (even when stretched up to a > whole year). Yes, ints are fine for these humane-number-of-seconds kinds of values in the cache configuration. There's no need for maximum le

obv patch: debuginfod concurrency fix

2021-12-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Committing as obvious. Author: Frank Ch. Eigler Date: Wed Dec 8 10:20:58 2021 -0500 debuginfod: correct concurrency bug in fdcache metrics The intern() function called set_metrics() outside a necessary lock being held. helgrind identified this race condition. No QA imp

Re: [PATCHv3] debuginfod: Check result of calling MHD_add_response_header.

2021-12-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Why move the *size assignment in there? > > Because both statements are unnecessary if r == NULL (aka the response > couldn't even be created). [...] > But it is also harmless to do, so if you want I can move it outside the > if statement. OK, whichever, doesn't much matter then. - FChE

Re: [PATCHv3] debuginfod: Check result of calling MHD_add_response_header.

2021-12-08 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Although unlikely the MHD_add_response_header can fail for > various reasons. If it fails something odd is going on. > So check we can actually add a response header and log an > error if we cannot. Sure, if you insist. :-) except: > - *size = os.size(); > - MHD_add_response_header (r

Re: [PATCH] debuginfod: Clear and reset debuginfod_client winning_headers on reuse

2021-12-06 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > gcc address sanitizer detected a leak of the debuginfod_client > winning_headers when the handle was reused. Make sure to free and > reset the winning_headers field before reuse. This is good. (Note we're not actually using these winning_headers bits for anything. That was to be part of

Re: [PATCH v2] libebl: recognize FDO Packaging Metadata ELF note

2021-12-02 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > JSON has been targeted at the Windows/Java UTF-16 world, there is always > going to be a mismatch if you try to represent it in UTF-8 or anything > that doesn't have surrogate pairs. The JSON RFC8259 8.1 mandates UTF-8 encoding for situations like ours. > > Yes, and yet we have had the b

Re: [PATCHv2] debuginfod: Check result of calling MHD_add_response_header.

2021-12-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Although unlikely the MHD_add_response_header can fail for > various reasons. If it fails something odd is going on. > So check we can actually add a response header and log an > error if we cannot. TBH I wouldn't bother even this much checking. It just uglifies the code. If it would ma

Re: [PATCH] debuginfod: Check result of calling MHD_add_response_header.

2021-12-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Although unlikely the MHD_add_response_header can fail for > various reasons. If it fails something odd is going on. > So check we can actually add a response header before using > the response. ISTM it is okay to send the response object (the body), even if something goes wrong with addi

Re: [PATCH v2] libebl: recognize FDO Packaging Metadata ELF note

2021-11-30 Thread Frank Ch. Eigler via Elfutils-devel
Hi - On Tue, Nov 30, 2021 at 12:25:41PM +0100, Mark Wielaard wrote: > [...] > The spec does explain the requirements for JSON numbers, but doesn't > mention any for JSON strings or JSON objects. It would be good to also > explain how to make the strings and objects unambiguous. [...] > For Objects

  1   2   3   >