public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Vitaly Chikunov <vt@altlinux.org>, elfutils-devel@sourceware.org
Subject: Re: [PATCH] libdwfl: Do not dlopen libdebuginfod if DEBUGINFOD_URLS is unset or empty
Date: Mon, 09 Nov 2020 14:49:43 +0100	[thread overview]
Message-ID: <95de2e2cf1dff241f0a5ce0828b17df654d05a94.camel@klomp.org> (raw)
In-Reply-To: <20201105144452.30409-1-vt@altlinux.org>

Hi Vitaly,

On Thu, 2020-11-05 at 17:44 +0300, Vitaly Chikunov wrote:
> Avoid calling expensive dlopen at the cost of an extra getenv check when
> we already know it would not be needed.
> 
> This mirrors the getenv check from debuginfod_query_server.

I am sympathetic to this. It would have been a nicer way to fix the
valgrind issue I recently had with dlopen having unsuppressible errors
on some older glibc versions. But it also makes it so that an
application can never use the debuginfod support afterwards. The
current debuginfod_query_server check is late enough that an
application could set DEBUGINFOD_URLS just before a Dwarf lookup.

What do you think? Is that a valid use case?

Should we maybe introduce setting debuginfod_urls on Dwfls so that an
application can explicitly indicate they want to use debuginfod lookups
and then dlopen libdebuginfod late? The problem with doing the dlopen
late is that we also need libcurl and initializing libcurl (as done by
libdebuginfod) is not thread-safe.

Cheers,

Mark

  reply	other threads:[~2020-11-09 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 14:44 Vitaly Chikunov
2020-11-09 13:49 ` Mark Wielaard [this message]
2020-11-09 14:57   ` Frank Ch. Eigler
2020-12-09 15:35     ` Dmitry V. Levin
2020-12-09 16:42       ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95de2e2cf1dff241f0a5ce0828b17df654d05a94.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=vt@altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).