RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2032647 - glibc: ELF dependency sorting improvements
Summary: glibc: ELF dependency sorting improvements
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: glibc
Version: 9.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: rc
: ---
Assignee: Florian Weimer
QA Contact: Sergey Kolosov
URL:
Whiteboard:
Depends On: 1162810
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-14 21:14 UTC by Florian Weimer
Modified: 2023-07-18 14:29 UTC (History)
7 users (show)

Fixed In Version: glibc-2.34-18.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 15:48:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1133521 1 medium CLOSED glibc: Dynamic loader init/fini sorting not correct for objects with symbol dependencies. 2023-09-22 15:18:43 UTC
Red Hat Bugzilla 1159809 1 high CLOSED glibc: Improve performance of dynamic loader for deeply nested DSO dependencies. 2023-12-15 15:50:01 UTC
Red Hat Bugzilla 1305145 1 None None None 2021-12-14 21:27:50 UTC
Red Hat Issue Tracker RHELPLAN-105810 0 None None None 2021-12-14 21:16:33 UTC
Red Hat Product Errata RHBA-2022:3917 0 None None None 2022-05-17 15:49:17 UTC

Internal Links: 1133521 1159809 1305145

Description Florian Weimer 2021-12-14 21:14:34 UTC
I would like to propose to switch to the new dependency sorting algorithm in glibc 2.35 (with a targeted backport).

Backporting (at least) these commits should fix a long-standing performance issue in dlclose/process termination (bug 1159809, bug 1305145):

commit 15a0c5730d1d5aeb95f50c9ec7470640084feae8
Author: Chung-Lin Tang <cltang>
Date:   Thu Oct 21 21:41:22 2021 +0800

    elf: Fix slow DSO sorting behavior in dynamic loader (BZ #17645)

commit 0884724a95b60452ad483dbe086d237d02ba624d
Author: Florian Weimer <fweimer>
Date:   Tue Dec 14 12:37:44 2021 +0100

    elf: Use new dependency sorting algorithm by default

If we also backport the proposed change to disregard relocation dependencies:

[PATCH 0/2] Predictable ELF destructor ordering
<https://sourceware.org/pipermail/libc-alpha/2021-December/134165.html>

we will fix bug 1133521.

I think it would be safer to make these changes at 9 GA, so that Red Hat Enterprise Linux uses the new algorithm from the start.

Comment 1 Carlos O'Donell 2021-12-15 02:45:37 UTC
(In reply to Florian Weimer from comment #0)
> I think it would be safer to make these changes at 9 GA, so that Red Hat
> Enterprise Linux uses the new algorithm from the start.

As PO I approve of this change for RHEL9 GA.

The change improves conformance for ISO C++.

The order of destructors, particularly since no objects are unmapped until after all destructors run, should be possible to have as exactly the reverse order of constructors (as the change proposes).

This has the benefit that it meets customer expectations and the ordering is not changed by the loader.

The change is not an ABI change, so it could be changed if we determine there are customer requirements with existing binaries from RHEL7 and RHEL8.

The only risk would be that specific workloads fail in this case, but we can evaluate that on a per-workload basis and adjust as required.

None of this changes the existing semantics of STB_GNU_UNIQUE for C++.

This is orthogonal to the new DSO sorting improvement upstream.

Comment 3 Florian Weimer 2022-01-14 14:26:09 UTC
The destructor sorting changes have not yet landed upstream. So I'm going with the constructor sorting changes only.

Comment 9 errata-xmlrpc 2022-05-17 15:48:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: glibc), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:3917


Note You need to log in before you can comment on or make changes to this bug.