From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12050 invoked from network); 24 Sep 2021 12:12:58 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 24 Sep 2021 12:12:58 -0000 Received: (qmail 9620 invoked by uid 550); 24 Sep 2021 12:12:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9595 invoked from network); 24 Sep 2021 12:12:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weka.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/4ADQyPyJ7+I1KvYDeNU7qez1IsL079m4IN0YoxTiJo=; b=l6MTnvW4G0VOp1yfajQPZ6YICYKC61QjIPgM0B+k389UBOriV/EMMAu8pAl6verHaZ rvwD/MqU71LQbAq5yVd056CVip9J2Bz5TALw7IaeU828zUYtl5JRQ/5fOyiLSYoeXd4s USL0gGV0dCzmCdRUFOPp7iEynTN7k//IzVoHQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/4ADQyPyJ7+I1KvYDeNU7qez1IsL079m4IN0YoxTiJo=; b=vflYiTVs5lBXQ6NZU43YDzf9wHpDl7dB7ZQVC1uMwjsod30DyM2eC4eDi0i2UOZucO X18NLyhEJBONQHrNaYmhi8YJvBOJTnvSk50bsNaSUOwkMYdpLz88NR5Uv9kSEzGF0tzB +nBJ1nTRgVrGF1+iwfs4/SHOZV/jbkOBgWPuvO5ktg2s8kVim4UrYsK96SSb6X8YAqYd zn9y51o2+GzKG0lZ5NpFBLD91g9OugRztDlsCu6TSVcH8ppAG8xQBdF0ciUJ9LlR8VBn MRQX724xjKdf68pMM1OJZVKSEwtABk9mAWcCLSgcE4PeYzcmOeOSm8f28clc9hYJR0fB MgJw== X-Gm-Message-State: AOAM533BmS/ZIs7hksLMeKT1tOgbailuoPFawzHPNYMR5z3yOm05DZsp KoBgjO7XVLCbiHNCkMVfc1rDg0cs0rJYOm/wqFwwgwZtSDMfLEMTiazIqW60H8R+Ah01LwsnJ88 4r2rHJ2P6Cf4RiEgT3rWBFC+YzlycYyjMdLqR5WDmPO8+u6Mvs/x4VQXi+hYqVREmv/pVWzxZhC 0//0g+5g4C4ABr62xYW5USQcGAxtriSkjn7Qxs2tyXYMzNyW6rCk/PmUhvM6I6DdmoDoScUDpKr B5/CpF5cJA/pEdCHYZPpCi7HXHm75SWuy1pte2KbTIBhSfmEfeNoEC6YgJSjWjMoDgsUgmEpYbz 7PkVe0VBiPghkn6J84Wj18NN9amIxi/q6hPe0DUQGcZuiW6PEGtYHg== X-Google-Smtp-Source: ABdhPJwAOHOWqeuYvMz+sBI7IevR0CFzqb+exd2608ef/0xs1WDdtBp+eqfP7zNpyhSr8ProPgm3DkwVJVa8GOn0mzk= X-Received: by 2002:ad4:498e:: with SMTP id t14mr9754429qvx.14.1632485563894; Fri, 24 Sep 2021 05:12:43 -0700 (PDT) MIME-Version: 1.0 References: <20210923230914.GW13220@brightrain.aerifal.cx> In-Reply-To: <20210923230914.GW13220@brightrain.aerifal.cx> From: Vince Fleming Date: Fri, 24 Sep 2021 08:12:33 -0400 Message-ID: To: Rich Felker Cc: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000232d5405ccbcaa61" X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: weka,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 Subject: Re: [musl] dlopen() issue --000000000000232d5405ccbcaa61 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 > --=20 Vince Fleming Director, Solutions & Services, WekaIO M 848-220-0041* =C2=AD*E vince@weka.io* =C2=AD*W https://www.weka.io/ * =C2=AD* * =C2=AD* *Join our webinar:*The State of AI and Analytics Infrastructure 2021 --000000000000232d5405ccbcaa61 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, the statically-linked program is calling dlopen() to = dynamically-link in a library.=C2=A0 =C2=A0This works fine with glibc.=C2= =A0 =C2=A0The library in question is libaio, which I've also built with= musl.

And, oddly, I am not rebuilding between runs - I&= #39;m executing the same binary over and over again.=C2=A0 The program is a= disk benchmark (fio).=C2=A0 =C2=A0The 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).=C2=A0 I have a = wrapper that executes fio 6 times.=C2=A0 Repeating the wrapper run produces= errors from dlopen() randomly - sometimes the first fio fails, other times= it works.=C2=A0 Same for 2nd through 6th runs.=C2=A0 It randomly produces = a "no such file", other times the "dynamic loading not suppo= rted".=C2=A0=C2=A0

I'm puzzled by the ran= domness of it, and suspect that the cause is outside of dlopen() but don= 9;t know where to start looking...=C2=A0 any ideas?

On Thu, Sep 23, 20= 21 at 7:09 PM Rich Felker <dalias@lib= c.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.=C2= =A0 =C2=A0It's
> intermittent; it will succeed and work fine, then on the next run it&#= 39;ll
> give "libaio: cannot open shared object file: No such file or dir= ectory",
> or "Dynamic loading not supported", which appear to come fro= m 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


--
<= /table>
= =
= Vince Fleming
Director, Solutions & Services,=C2=A0WekaIO
=
M=C2=A0848-220-0041=E2=80=85=C2=ADE=C2=A0vince@weka.io=E2=80=85=C2=AD<= span style=3D"color:rgb(119,61,190);font-weight:bold;font-family:Arial">W= =C2=A0https://www.weka.io/=E2=80=85=C2=AD=C2=A0=E2=80=85=C2=AD<= /td>
=
3D""
--000000000000232d5405ccbcaa61--