mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Vince Fleming <vince@weka.io>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] dlopen() issue
Date: Fri, 24 Sep 2021 08:12:33 -0400	[thread overview]
Message-ID: <CANKoP_CEvz6OrBxbpXUNKrSr9uAyo_S4CMye9sXNBC7TyRYP=Q@mail.gmail.com> (raw)
In-Reply-To: <20210923230914.GW13220@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 2384 bytes --]

Yes, the statically-linked program is calling dlopen() to dynamically-link
in a library.   This works fine with glibc.   The library in question is
libaio, which I've also built with musl.

And, oddly, I am not rebuilding between runs - I'm executing the same
binary over and over again.  The program is a disk benchmark (fio).   The
errors are very random, so it's not dependent on the input to fio, which is
nearly identical anyway (reads vs writes with all other parameters the
same, for example).  I have a wrapper that executes fio 6 times.  Repeating
the wrapper run produces errors from dlopen() randomly - sometimes the
first fio fails, other times it works.  Same for 2nd through 6th runs.  It
randomly produces a "no such file", other times the "dynamic loading not
supported".

I'm puzzled by the randomness of it, and suspect that the cause is outside
of dlopen() but don't know where to start looking...  any ideas?

On Thu, Sep 23, 2021 at 7:09 PM Rich Felker <dalias@libc.org> wrote:

> On Thu, Sep 23, 2021 at 05:47:37PM -0400, Vince Fleming wrote:
> > Hi all;
> >
> > I seem to be having a problem with dynamically loading a library.   It's
> > intermittent; it will succeed and work fine, then on the next run it'll
> > give "libaio: cannot open shared object file: No such file or directory",
> > or "Dynamic loading not supported", which appear to come from dlerror()
> in
> > musl, not the application I'm porting to musl.
> >
> > Has anyone else seen such behavior?
>
> The error means your program is static linked. It's not clear why
> you're not seeing it other times; presumably you're rebuilding (or at
> least relinking) the program between runs, or else running different
> versions of it each time.
>
> Rich
>


-- 
Vince Fleming
Director, Solutions & Services, WekaIO
M 848-220-0041* ­*E vince@weka.io* ­*W https://www.weka.io/
<https://www.weka.io/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>*
­* * ­*
<https://www.weka.io/promo/the-state-of-ai-and-analytics-infrastructure-2021/>
*Join
our webinar:*The State of AI and Analytics Infrastructure 2021
<https://www.weka.io/promo/the-state-of-ai-and-analytics-infrastructure-2021/>
<https://www.weka.io/press-releases/weka-named-to-fast-companys-annual-list-of-the-worlds-most-innovative-companies-for-2021/>

[-- Attachment #2: Type: text/html, Size: 7393 bytes --]

  reply	other threads:[~2021-09-24 12:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23 21:47 Vince Fleming
2021-09-23 23:09 ` Rich Felker
2021-09-24 12:12   ` Vince Fleming [this message]
2021-09-24 12:42     ` Rich Felker

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='CANKoP_CEvz6OrBxbpXUNKrSr9uAyo_S4CMye9sXNBC7TyRYP=Q@mail.gmail.com' \
    --to=vince@weka.io \
    --cc=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).