public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Chung-Lin Tang <chunglin_tang@mentor.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,  <cltang@codesourcery.com>
Subject: Re: [PATCH 1/2][RFC] #17645, fix slow DSO sorting behavior in dynamic loader
Date: Tue, 23 Jul 2019 13:21:00 -0000	[thread overview]
Message-ID: <87h87crimv.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <bb13d870-a1f2-94fa-cf9e-9d78ad1fe4ee@mentor.com> (Chung-Lin Tang's message of "Sun, 21 Jul 2019 01:50:53 +0800")

* Chung-Lin Tang:

> Hi, this patch is our attempt at resolving the slow shared object sorting
> situation in #17645, #15310, and some effort at #15311.  I realize this is
> pretty unsuitable timing to be submitting a patch of such nature now (probably
> way too late to be included into 2.30), but still sending now anyways as this
> will probably need quite some discussion before being approved.
>
> Prior attempts at solving this slow sorting behavior appeared to have failed
> due to inadequate proposed testing, therefore cannot convince reviewers to
> touch what seems to be perceived as a sensitive and easy to break part of ld.so.

Thanks for working on this!

>         * elf/Makefile (test_dso_ordering): New make function.
>         (tst-dso-ordering[123456789]): Define new DSO sorting tests.
>         (tst-bz15311): Testcase from #15311.
>         * scripts/dso-ordering-test.py: New script.

I have not looked at the script in detail yet, sorry.  But I have some
early questions.

Is => intended to cover the case of run-time dependencies added late due
to lazy binding?

Currently, those late dependencies have two effects, I think: They keep
around the referenced libraries longer than before (so that dlclose
would not remove an object which is still in used solely due to lazy
binding).  And the ELF destructors are reordered to reflect these added
run-time dependencies.

Can your test framework test both cases?  What's your position on the
second effect?  I think it sometimes results in destructors running not
in the opposite order of constructors, due to the new topological sort.
(This also happens with the current implementation.)

Thanks,
Florian

  reply	other threads:[~2019-07-23 13:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-20 17:51 Chung-Lin Tang
2019-07-23 13:21 ` Florian Weimer [this message]
2019-07-25 18:46   ` Chung-Lin Tang
2019-07-29  9:48     ` Florian Weimer
2019-08-05 10:39       ` Chung-Lin Tang
2019-08-05 10:45         ` Florian Weimer
2019-08-10 11:49           ` Chung-Lin Tang
2019-09-17  9:55 ` Ping " Chung-Lin Tang
2019-10-08  6:22   ` Ping x2 " Chung-Lin Tang
2019-10-08 17:41     ` Adhemerval Zanella
2019-10-31 13:13     ` Carlos O'Donell
2019-11-14  9:58       ` Chung-Lin Tang
2019-11-25  9:19         ` Chung-Lin Tang
2019-11-25 19:08           ` Carlos O'Donell
2019-11-26  8:19             ` Chung-Lin Tang
2019-11-27 15:20               ` Carlos O'Donell

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=87h87crimv.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=chunglin_tang@mentor.com \
    --cc=cltang@codesourcery.com \
    --cc=libc-alpha@sourceware.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).