[Bug tools/27351] New: please add a debugedit binary to elfutils

2021-02-05 Thread doko at debian dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27351

Bug ID: 27351
   Summary: please add a debugedit binary to elfutils
   Product: elfutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: tools
  Assignee: unassigned at sourceware dot org
  Reporter: doko at debian dot org
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

please consider adding a debugedit binary to elfutils. Currently this is
shipped within the rpm sources, however distribution as a separate tool would
also benefit people not requiring rpm, like https://bugs.debian.org/981245

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug tools/27351] please add a debugedit binary to elfutils

2021-02-05 Thread ldv at sourceware dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27351

--- Comment #1 from Dmitry V. Levin  ---
I second this.

The only technical complication I see is that debugedit uses Autotest for
testing while the rest of elfutils uses tests driven by Automake.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [PATCH v2] libdwfl: use GNU strerror_r only when available.

2021-02-05 Thread Mark Wielaard
On Tue, 2021-02-02 at 05:56 +0300, Dmitry V. Levin wrote:
> On Mon, Feb 01, 2021 at 09:16:56PM -0300, Érico Nogueira via Elfutils-devel 
> wrote:
> [...]
> > I'm not sure if it's a bug in this configure.ac or this macro, but
> > _GNU_SOURCE wasn't defined and lead to XSI strerror_r being used on
> > glibc until I added the trick with CFLAGS and old_CFLAGS. It's still way
> > slimmer than the previous version :)
> > 
> > I see that -D_GNU_SOURCE is passed to the build via config/eu.am, maybe
> > it could somehow be plugged into configure.ac earlier? I'm not entirely
> > sure what's best.
> 
> I wonder why don't we just use AC_USE_SYSTEM_EXTENSIONS
> instead of all these dances with -D_GNU_SOURCE.

Probably because it was only introduced in autoconf 2.60 and we didn't
require that till 2009. We could now use it. But we'll have to be
careful to keep supporting BAD_FTS:

dnl Older glibc had a broken fts that didn't work with Large File Systems.
dnl We want the version that can handler LFS, but include workaround if we
dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to
dnl check it before including config.h (which might define _FILE_OFFSET_BITS).

I am not sure how AC_USE_SYSTEM_EXTENSIONS would interact with this and
config.h inclusion.

Lets think about updating configure.ac after the release (and maybe
update our automake and autoconf version dependencies too?).

For now I'll integrate Érico's patch as is.

Thanks,

Mark


[Bug general/21010] Incompatible with MUSL libc: strerror_r

2021-02-05 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=21010

Mark Wielaard  changed:

   What|Removed |Added

 CC||mark at klomp dot org
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from Mark Wielaard  ---
commit 8db222e36ae777e6aec8c61c616838a86258e99f
Author: Érico Rolim 
Date:   Mon Feb 1 21:16:56 2021 -0300

libdwfl: use GNU strerror_r only when available.

Some C libraries don't provide the GNU version of strerror_r, only the
XSI-compliant one. We use the GNU version when available, since it fits
the code better, and otherwise use the XSI-compliant one.

https://sourceware.org/bugzilla/show_bug.cgi?id=21010

Signed-off-by: Érico Rolim 

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug general/21002] Incompatible with MUSL libc

2021-02-05 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=21002
Bug 21002 depends on bug 21010, which changed state.

Bug 21010 Summary: Incompatible with MUSL libc: strerror_r
https://sourceware.org/bugzilla/show_bug.cgi?id=21010

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [PATCH v2] libdwfl: use GNU strerror_r only when available.

2021-02-05 Thread Dmitry V. Levin
On Fri, Feb 05, 2021 at 03:46:42PM +0100, Mark Wielaard wrote:
> On Tue, 2021-02-02 at 05:56 +0300, Dmitry V. Levin wrote:
> > On Mon, Feb 01, 2021 at 09:16:56PM -0300, Érico Nogueira via Elfutils-devel 
> > wrote:
> > [...]
> > > I'm not sure if it's a bug in this configure.ac or this macro, but
> > > _GNU_SOURCE wasn't defined and lead to XSI strerror_r being used on
> > > glibc until I added the trick with CFLAGS and old_CFLAGS. It's still way
> > > slimmer than the previous version :)
> > > 
> > > I see that -D_GNU_SOURCE is passed to the build via config/eu.am, maybe
> > > it could somehow be plugged into configure.ac earlier? I'm not entirely
> > > sure what's best.
> > 
> > I wonder why don't we just use AC_USE_SYSTEM_EXTENSIONS
> > instead of all these dances with -D_GNU_SOURCE.
> 
> Probably because it was only introduced in autoconf 2.60 and we didn't
> require that till 2009. We could now use it. But we'll have to be
> careful to keep supporting BAD_FTS:
> 
> dnl Older glibc had a broken fts that didn't work with Large File Systems.
> dnl We want the version that can handler LFS, but include workaround if we
> dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to
> dnl check it before including config.h (which might define _FILE_OFFSET_BITS).
> 
> I am not sure how AC_USE_SYSTEM_EXTENSIONS would interact with this and
> config.h inclusion.

Well, AC_USE_SYSTEM_EXTENSIONS != AC_SYS_LARGEFILE, the latter indeed
wouldn't work with old glibc, but the former has nothing to do with it.


-- 
ldv


Re: [PATCH v2] backends/ppc_initreg.c: include .

2021-02-05 Thread Mark Wielaard
Hi,

On Tue, 2021-02-02 at 06:22 +0300, Dmitry V. Levin wrote:
> Said that, I think it's safe to include  right before
>  on powerpc since in glibc the latter includes the former.

So that would move the  include after the 
include. Érico, would that work in your case?

Thanks,

Mark


Re: [PATCH] readelf: Remove show_op_index variable

2021-02-05 Thread Mark Wielaard
Hi Timm,

On Tue, 2021-02-02 at 11:23 +0100, Timm Bäder via Elfutils-devel wrote:
> advance_pc() uses show_op_index to save whether the current op_index
> is
> > 0 OR the new op_index is > 0.
> 
> The new op index is calculated via
> 
> new_op_index = (op_index + op_advance) % max_ops_per_instr;
> 
> since all of the variables involved are unsigned,
> new_op_index >= op_index is always true.
> 
> So...
> 
> if op_index > 0, then new_op_index > 0
> if op_index == 0, then new_op_index >= 0
> 
> and if the new_op_index is > 0, then the old one was as well.
> 
> In any case, we only need to check the new_op_index, since show_op_index
> used to OR the two comparisons.
> 
> In other words:
> 
>  op_index > 0  |  new_op_index > 0  || show_op_index
>  
>   true   truetrue
>  false   truetrue
>   true  falsetrue xx
>  false  falsefalse
> 
> ... but since the third line (marked with xx) is not possible,
> the table becomes:
> 
>  op_index > 0  |  new_op_index > 0  || show_op_index
>  
>   true   truetrue
>  false   truetrue
>  false  falsefalse
> 
> ... and show_op_index is equal to (new_op_index > 0).
> So, remove the show_op_index variable and simply replace it by comparing
> the new op_index > 0.

Very nice simplification. Thanks for the extensive commit message.

In most cases max_ops_per_instr is actually 1. In which case op_index
will always be zero.

Pushed to trunk.

Thanks,

Mark


[Bug tools/27351] please add a debugedit binary to elfutils

2021-02-05 Thread christian.morales.vega at gmail dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27351

christian.morales.vega at gmail dot com changed:

   What|Removed |Added

 CC||christian.morales.vega@gmai
   ||l.com

--- Comment #2 from christian.morales.vega at gmail dot com ---
I would like that, and more. I would like something doing everything
rpm/debugedit do so I can run something similar to

./extract_debuginfo_to_use_with_debuginfod -d 

So debugedit + find-debuginfo.sh +
https://github.com/rpm-software-management/rpm/commit/bbfe1f86b2e4b5c0bd499d9f3dd9de9c9c20fff2

If I could

./extract_debuginfo_to_use_with_debuginfod -d  -u


to directly extract+upload the debug information to my debuginfod server it
would be my ideal workflow.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: PATCH PR27323 debuginfod concurrency++

2021-02-05 Thread Mark Wielaard
Hi Frank,

On Tue, 2021-02-02 at 16:59 -0500, Frank Ch. Eigler via Elfutils-devel wrote:
> PR27323 debuginfod: improve query concurrency with grooming
> 
> Start using a second sqlite3 database connection for webapi query
> servicing.  This allows much better concurrency when long-running
> grooming operations are in progress.
> 
> No testsuite impact.  Grooming times are too short to try to hit with
> concurrent requests.  OTOH the existing tests did show some
> interesting regressions that needed fixing, like needing not to
> dual-wield db and dbq when doing rpm-dwz-related lookups from during
> scanning, and the way in which corrupted databases are reported.
> These needed some automated invocations of gdb on the running
> debuginfod binaries that just failed their testing, for in-situ
> debugging.
> 
> Hand-tested for function on a huge 20GB index file.  Allowed webapi
> queries to be run throughout random points of the grooming process,
> including especially the long count(*) report loops before & after.
> 
> [...]
> +2021-02-02  Frank Ch. Eigler 
> +
> + PR27323
> + * debuginfod.cxx (dbq): New read-only database connection for queries
> + only.
> + (signal_handler): Interrupt it.
> + (main): Open / close it.
> + (handle_buildid): Use it for webapi queries only.
> + (database_stats_report): Make more interruptible.  Report sqlite3
> + operation times to the prometheus metrics.
> + (groom): Make more interruptible.
> + (thread_main_fts_source_paths, thread_main_groom): Ensure
> + state/progress metrics are fresh even in case of exceptions.

This does make sense to me. Looks good.

Thanks,

Mark


Re: PATCH: PR27092 debuginfod improve low-memory operations

2021-02-05 Thread Mark Wielaard
Hi Frank,

On Thu, 2021-02-04 at 20:45 -0500, Frank Ch. Eigler via Elfutils-devel wrote:
> 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.

This part looks fine.

Maybe this is a general question about exposing metrics. But does this
help people who want to do denial of service attacks? I mean by seeing
what effect some queries might have on freespace/errors?

Not a showstopper, but maybe something to think about before
encouraging people to expose their metrics?

> - Frequent checking of $TMPDIR freespace, to trigger fdcache
>   emergency flushes.

This too looks fine.

> - Switch to floating point prometheus metrics, to communicate
>   fractions - and short time intervals - accurately.

You move all metrics to use doubles. Including the metrics that use
integral values using inc_metric (the threads, _total and _count ones).
I cannot tell how that looks on the Prometheus side. Isn't it better to
keep those as integrals? Aka maybe inc_metric shouldn't call through to
add_metric? Or maybe have two metric maps, one for counts and one for
values/durations?

> - Fix startup-time pthread-creation error handling.

OK, so these are now fatal errors, which makes sense. If some of the
threads cannot be created there is not much sense in trying to carry
on.

> 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.
[...]
> +2021-02-04  Frank Ch. Eigler 
> +
> + PR27092 low-memory handling
> + * debuginfod.cxx (fdcache_mintmp): New parameter, with cmd-line option.
> + (parse_opt): Parse it.
> + (main): Default it.
> + (statfs_free_enough_p): New function.
> + (libarchive_fdcache::*): Call it to trigger emergency fdcache flush.
> + (thread_main_scanner): Call it to report filesystem fullness metrics.
> + (groom): Ditto.
> + (set/add_metric): Take double rather than int64_t values.
> + (archive_exception): Propagate suberror to metric label.
> + (main): Detect pthread creation fatal errors properly.

All code changes look fine. Please feel free to push if you think my
questions above are a little silly :) The actual changes seem to do
what you intended.

Thanks,

Mark


[Bug debuginfod/27323] concurrency during grooming/scanning

2021-02-05 Thread fche at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27323

Frank Ch. Eigler  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Frank Ch. Eigler  ---
commit 6362941714548d93a348239ca8b8038005bd57cd
Author: Frank Ch. Eigler 
Date:   Tue Feb 2 16:49:19 2021 -0500

PR27323 debuginfod: improve query concurrency with grooming

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug debuginfod/27092] handle low memory conditions better

2021-02-05 Thread fche at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27092

Frank Ch. Eigler  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Frank Ch. Eigler  ---
commit aa121ea7f19e002c5e4738616342cd1d7be1bfd2
Author: Frank Ch. Eigler 
Date:   Thu Feb 4 20:31:56 2021 -0500

PR27092: debuginfod low-memory handling

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [PATCH v2] backends/ppc_initreg.c: include .

2021-02-05 Thread Érico Nogueira via Elfutils-devel




Em 05/02/2021 12:06, Mark Wielaard escreveu:

Hi,

On Tue, 2021-02-02 at 06:22 +0300, Dmitry V. Levin wrote:

Said that, I think it's safe to include  right before
 on powerpc since in glibc the latter includes the former.


So that would move the  include after the 
include. Érico, would that work in your case?


It seems to build correctly, and struct pt_regs will have been defined 
before any of its fields are used. I can send a v3 with this change, then.


Thank you both :)



Thanks,

Mark



Re: [PATCH] ar: Pull should_truncate_fname() into file scope

2021-02-05 Thread Mark Wielaard
Hi Timm,

On Wed, 2021-02-03 at 15:44 +0100, Timm Bäder via Elfutils-devel wrote:
> Get rid of a nested function this way.

I must say I still don't fully understand this code. But at least I can
see that the reworked code does the same thing as the original. So I
added a ChangeLog entry and pushed.

Thanks,

Mark


[PATCH v3] backends/ppc_initreg.c: include .

2021-02-05 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim 

Necessary on musl for struct pt_regs definition, doesn't affect the
build on glibc, since  includes the same header.

Signed-off-by: Érico Rolim 
---
 backends/ChangeLog | 4 
 backends/ppc_initreg.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/backends/ChangeLog b/backends/ChangeLog
index f22cd57f..eb15c81d 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,7 @@
+2021-02-01  Érico Nogueira  
+
+   * ppc_initreg.c: Also include .
+
 2020-12-12  Dmitry V. Levin  
 
* aarch64_retval.c (aarch64_return_value_location): Fix spelling typo
diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
index 0e0d3599..e5cca7e1 100644
--- a/backends/ppc_initreg.c
+++ b/backends/ppc_initreg.c
@@ -33,6 +33,7 @@
 #include 
 #if defined(__powerpc__) && defined(__linux__)
 # include 
+# include 
 # include 
 #endif
 
-- 
2.30.0



Re: [PATCH v3] backends/ppc_initreg.c: include .

2021-02-05 Thread Dmitry V. Levin
On Fri, Feb 05, 2021 at 02:52:06PM -0300, Érico Nogueira via Elfutils-devel 
wrote:
> From: Érico Rolim 
> 
> Necessary on musl for struct pt_regs definition, doesn't affect the
> build on glibc, since  includes the same header.
> 
> Signed-off-by: Érico Rolim 
> ---
>  backends/ChangeLog | 4 
>  backends/ppc_initreg.c | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/backends/ChangeLog b/backends/ChangeLog
> index f22cd57f..eb15c81d 100644
> --- a/backends/ChangeLog
> +++ b/backends/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-02-01  Érico Nogueira  
> +
> + * ppc_initreg.c: Also include .
> +
>  2020-12-12  Dmitry V. Levin  
>  
>   * aarch64_retval.c (aarch64_return_value_location): Fix spelling typo
> diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
> index 0e0d3599..e5cca7e1 100644
> --- a/backends/ppc_initreg.c
> +++ b/backends/ppc_initreg.c
> @@ -33,6 +33,7 @@
>  #include 
>  #if defined(__powerpc__) && defined(__linux__)
>  # include 
> +# include 
>  # include 
>  #endif
>  

LGTM, thanks.


-- 
ldv


Re: [PATCH v3] backends/ppc_initreg.c: include .

2021-02-05 Thread Mark Wielaard
On Fri, 2021-02-05 at 21:00 +0300, Dmitry V. Levin wrote:
> On Fri, Feb 05, 2021 at 02:52:06PM -0300, Érico Nogueira via
> Elfutils-devel wrote:
> > 
> > diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
> > index 0e0d3599..e5cca7e1 100644
> > --- a/backends/ppc_initreg.c
> > +++ b/backends/ppc_initreg.c
> > @@ -33,6 +33,7 @@
> >  #include 
> >  #if defined(__powerpc__) && defined(__linux__)
> >  # include 
> > +# include 
> >  # include 
> >  #endif
> >  
> 
> LGTM, thanks.

Actually tested against some older ppc, ppc64 and ppc64le setups and
things look fine. Pushed.

Thanks,

Mark


[PATCH] Prepare for 0.183

2021-02-05 Thread Mark Wielaard
Set version to 0.183
Update NEWS and elfutils.spec.in.
Set copyright year in configure.ac and printversion.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard 
---
 ChangeLog   |6 +
 NEWS|   16 +
 config/ChangeLog|4 +
 config/elfutils.spec.in |   12 +
 configure.ac|4 +-
 lib/ChangeLog   |4 +
 lib/printversion.c  |2 +-
 po/ChangeLog|4 +
 po/de.po| 1431 +++---
 po/es.po| 1447 +++---
 po/ja.po| 1447 +++---
 po/pl.po| 1449 ---
 po/uk.po| 1449 ---
 13 files changed, 3668 insertions(+), 3607 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c8f921a5..d379e713 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-05  Mark Wielaard  
+
+   * configure.ac (AC_INIT): Set version to 0.183.
+   (AC_COPYRIGHT): Update Copyright year.
+   * NEWS: Add 0.183 section.
+
 2021-02-01  Érico Nogueira  
 
* configure.ac: Check for GNU strerror_r.
diff --git a/NEWS b/NEWS
index caf20dd4..dccea28b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,19 @@
+Version 0.183
+
+debuginfod: New thread-busy metric and more detailed error metrics.
+New --fdcache-mintmp and tracking of filesystem freespace.
+
+debuginfod-client: DEBUGINFOD_SONAME macro added to debuginfod.h which
+   can be used to dlopen the libdebuginfod.so library.
+   New function debuginfod_set_verbose_fd and
+   DEBUGINFOD_VERBOSE environment variable.
+
+config: profile.sh and profile.csh won't export DEBUGINFOD_URLS unless
+configured --enable-debuginfod-urls[=URLS]
+
+elflint, readelf: Recognize SHF_GNU_RETAIN.
+  Handle SHT_X86_64_UNWIND as valid relocation target.
+
 Version 0.182
 
 backends: Support for tilegx has been removed.
diff --git a/config/ChangeLog b/config/ChangeLog
index 441a36f8..d84d38c3 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2021-02-05  Mark Wielaard  
+
+   * elfutils.spec.in: Update for 0.183.
+
 2020-12-20  Dmitry V. Levin  
 
* .gitignore: New file.
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index a8b63517..46b404f9 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -332,6 +332,18 @@ exit 0
 %systemd_postun_with_restart debuginfod.service
 
 %changelog
+* Fri Feb  5 2021 Mark Wielaard  0.183-1
+- debuginfod: New thread-busy metric and more detailed error metrics.
+  New --fdcache-mintmp and tracking of filesystem freespace.
+- debigonfod-client: DEBUGINFOD_SONAME macro added to debuginfod.h can
+  be used to dlopen the libdebuginfod.so library.
+  New function debuginfod_set_verbose_fd and DEBUGINFOD_VERBOSE
+  environment variable.
+- config: profile.sh and profile.csh won't export DEBUGINFOD_URLS
+  unless configured --enable-debuginfod-urls[=URLS]
+- elflint, readelf: Recognize SHF_GNU_RETAIN.
+  Handle SHT_X86_64_UNWIND as valid relocation target type.
+
 * Sat Oct 31 2020 Mark Wielaard  0.182-1
 - backends: Support for tilegx has been removed.
 - config: New /etc/profile.d files to provide default $DEBUGINFOD_URLS.
diff --git a/configure.ac b/configure.ac
index 47db8472..d345495d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ dnl  GNU General Public License for more details.
 dnl
 dnl  You should have received a copy of the GNU General Public License
 dnl  along with this program.  If not, see .
-AC_INIT([elfutils],[0.182],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
+AC_INIT([elfutils],[0.183],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
 
 dnl Workaround for older autoconf < 2.64
 m4_ifndef([AC_PACKAGE_URL],
@@ -44,7 +44,7 @@ fi
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_FILES([config/Makefile])
 
-AC_COPYRIGHT([Copyright (C) 1996-2020 The elfutils developers.])
+AC_COPYRIGHT([Copyright (C) 1996-2021 The elfutils developers.])
 AC_PREREQ(2.63)dnl Minimum Autoconf version required.
 
 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 3b603bd0..371e2133 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2021-02-05  Mark Wielaard  
+
+   * printversion.c (print_version): Update copyright year.
+
 2020-12-16  Dmitry V. Levin  
 
* color.c (parse_opt): Replace gettext(...) and
diff --git a/lib/printversion.c b/lib/printversion.c
index 1f3f3d19..adf127d6 100644
--- a/lib/printversion.c
+++ b/lib/printversion.c
@@ -41,5 +41,5 @@ print_version (FILE *stream, struct argp_state *state)
 Copyright (C) %s The elfutils developers <%s>.\n\
 This is free software; see the source for copying conditions.  There 

Re: PATCH: PR27092 debuginfod improve low-memory operations

2021-02-05 Thread Mark Wielaard
Hi,

Just for the list to have it archived.
We did briefly discuss this on irc.
The changes have already been pushed.

On Fri, 2021-02-05 at 18:24 +0100, Mark Wielaard wrote:
> On Thu, 2021-02-04 at 20:45 -0500, Frank Ch. Eigler via Elfutils-
> devel wrote:
> > - New prometheus metrics to track filesystem freespace, and more
> >   details about some errors.
> 
> This part looks fine.
> 
> Maybe this is a general question about exposing metrics. But does this
> help people who want to do denial of service attacks? I mean by seeing
> what effect some queries might have on freespace/errors?
> 
> Not a showstopper, but maybe something to think about before
> encouraging people to expose their metrics?

yeah hypothetically, and yet at the same time one needs that info more
to detect problems early

> > - Frequent checking of $TMPDIR freespace, to trigger fdcache
> >   emergency flushes.
> 
> This too looks fine.
> 
> > - Switch to floating point prometheus metrics, to communicate
> >   fractions - and short time intervals - accurately.
> 
> You move all metrics to use doubles. Including the metrics that use
> integral values using inc_metric (the threads, _total and _count ones).
> I cannot tell how that looks on the Prometheus side. Isn't it better to
> keep those as integrals? Aka maybe inc_metric shouldn't call through to
> add_metric? Or maybe have two metric maps, one for counts and one for
> values/durations?

doubles are the native type for prometheus consumers, the textual form
doesn't really matter (and ieee doubles propagate 40+bit integers
exactly so that's okay)
might tweak the formatting to add all the digits of precision rather
than the c++ default, easily

> All code changes look fine. Please feel free to push if you think my
> questions above are a little silly :) The actual changes seem to do
> what you intended.

Cheers,

Mark


Re: elfutils 0.183 release planning - next week (Monday Feb 8)

2021-02-05 Thread Mark Wielaard
Hi all,

On Mon, 2021-02-01 at 16:04 +0100, Mark Wielaard wrote:
> I believe I reviewed all pending patches, please yell and scream if I
> missed something.
> 
> It has been 3 months since 0.182. There have been almost 100 commits.
> Various bug fixes. And some issues, like recognizing SHF_GNU_RETAIN,
> needed for clean results on gcc11 + binutils 2.36.
> 
> So I was hoping to do a 0.183 release next week (Monday Feb 8).

I just pushed the Prepare for 0.183 commit.
If the buildbots give the green light and nobody finds a major issue
over the weekend I'll announce the 0.183 on Monday.

Cheers,

Mark


Golang binary dwarf

2021-02-05 Thread Manoj Kumar via Elfutils-devel
Hi,Using dyninst, I am trying to access local variables and arguments of a 
function which is part of a go binary.To get local variables, dyninst uses 
libdw to find all the modules. It uses dwarf_nextcu function of libdw to find 
all the modules of binary.When I compile a go binary using "go build 
filename.go" then dwarf_nextcu finds all the modules (almost 118) and dyninst 
is able to access local variables and arguments of any function.But when I 
compile a go binary with linkshared option  "go build -linkshared filename.go" 
then dwarf_nextcu finds only 5 modules. Due to that, dyninst is not able to 
access any variable of a function.
Does go binary with linkshared option has different version of dwarf? Could you 
please suggest how to use libdw for go binary with linkshared option.
Thanks