Bug 22040 - dlopen: Provide more information on the root cause of a failure
Summary: dlopen: Provide more information on the root cause of a failure
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.26
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 22039 22041 31143
  Show dependency treegraph
 
Reported: 2017-08-30 11:09 UTC by Florian Weimer
Modified: 2023-12-12 09:26 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2017-08-30 11:09:38 UTC
If dlopen fails, this can be due to a potentially transient issue (like lack of file descriptors or memory), a fatal file system problem (media read error), a file system contents issue (missing file, lack of access privileges), data format issues (corrupted ELF data) or actual linking problems.

Internal use of dlopen within glibc needs to tell these errors apart.  We have several caches which should not treat a failed dlopen due to a transient condition like a missing DSO.  For example, the NSS service module cache should not mark nss_dns as non-existent just because the system temporarily ran out of file descriptors.

Parsing the output of dlerror is not a solution because it is too fragile.