Bug 1475501 - glibc: [RFE] Fix link namespace coordination issues e.g. static vs. dynamic vs. dlmopen.
Summary: glibc: [RFE] Fix link namespace coordination issues e.g. static vs. dynamic v...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1283710 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-26 19:31 UTC by Carlos O'Donell
Modified: 2019-10-15 13:45 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-10-15 13:45:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 19341 0 None None None 2019-03-07 19:34:08 UTC

Description Carlos O'Donell 2017-07-26 19:31:57 UTC
A statically linked application (the static namespace), and the dynamically loaded libraries (the dynamic namespace), and any dlmopen'd libraries (newly created link namespace), all need to coordinate in some minimal way to avoid some of the following problems:

* Don't double initialize the same global variable if it has a non-default value.
* If threads are loaded, then each of the namespace must be informed of this and act accordingly.
* If a function touches errno, this errno has to be shared across the namespaces, and all other global state variables that need to be shared between the static "namespace" and the dynamic "namespace."

Fixing this is going to be quit a bit of work and it won't get fixed soon. We'll need some kind of collected shared global state we can pass to the new namespace which allows the implementation to behave sensibly.

The conclusion at Red Hat was to continue to investigate the issue upstream, but that statically linked applications would be very very small and not likely to use any of the features which trigger this problem.

Comment 1 Carlos O'Donell 2017-07-26 19:32:30 UTC
*** Bug 1283710 has been marked as a duplicate of this bug. ***

Comment 2 Florian Weimer 2017-07-27 12:13:34 UTC
Your implication that static dlopen and dlmopen face the same problem is incorrect.  Some aspects are similar, the static dlopen problems are simply bugs.  The dlmopen issue is more of a design problem.

Comment 3 Jan Kurik 2017-08-15 07:10:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 4 Florian Weimer 2018-01-12 10:22:14 UTC
Upstream deprecates static dlopen in glibc 2.27.

Comment 5 Florian Weimer 2019-10-15 13:45:46 UTC
See comment 2.  I'm going to close this bug as too broad.  Static dlopen issues will be fixed once we do not use static dlopen for NSS and gconv.  dlmopen isuses are quite different, as I said, and it remains to be seen what we can do there.


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