public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/15686] New: Shared-object static constructors called with a lock held
@ 2013-06-26 22:43 macro@linux-mips.org
2014-06-13 13:30 ` [Bug dynamic-link/15686] " fweimer at redhat dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: macro@linux-mips.org @ 2013-06-26 22:43 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15686
Bug ID: 15686
Summary: Shared-object static constructors called with a lock
held
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: macro@linux-mips.org
CC: macro@linux-mips.org
Target: *-*-*
Shared-object static constructors are user code that the C library has no
control of. They are called with the GL(dl_load_lock) lock held and are
therefore prone to a deadlock if they call back into the wrong part of
ld.so. The exact call sequence is:
_dl_open -> dl_open_worker -> _dl_init -> call_init -> user code
and in the sequence above _dl_open takes the GL(dl_load_lock) lock before
calling dl_open_worker. This affects all targets.
See also:
http://sourceware.org/ml/libc-alpha/2013-06/msg00802.html
http://sourceware.org/ml/libc-alpha/2013-06/msg00828.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug dynamic-link/15686] Shared-object static constructors called with a lock held
2013-06-26 22:43 [Bug dynamic-link/15686] New: Shared-object static constructors called with a lock held macro@linux-mips.org
@ 2014-06-13 13:30 ` fweimer at redhat dot com
2021-09-13 12:41 ` nsz at gcc dot gnu.org
2021-09-21 13:21 ` nsz at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 13:30 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15686
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug dynamic-link/15686] Shared-object static constructors called with a lock held
2013-06-26 22:43 [Bug dynamic-link/15686] New: Shared-object static constructors called with a lock held macro@linux-mips.org
2014-06-13 13:30 ` [Bug dynamic-link/15686] " fweimer at redhat dot com
@ 2021-09-13 12:41 ` nsz at gcc dot gnu.org
2021-09-21 13:21 ` nsz at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: nsz at gcc dot gnu.org @ 2021-09-13 12:41 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15686
Szabolcs Nagy <nsz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nsz at gcc dot gnu.org
--- Comment #3 from Szabolcs Nagy <nsz at gcc dot gnu.org> ---
note: deadlock can happen without thread creation from ctors:
thread 1: dlopen -> dl_load_lock -> ctor -> user_lock
thread 2: user_lock -> dlsym/dlopen/dlclose -> dl_load_lock
if calling dlsym/dlopen/dlclose/.. from a ctor is allowed
then i'd expect this to work too, but now it deadlocks.
the fix for bug 19329 added the same lock to pthread_create
so now this problem affects more code.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug dynamic-link/15686] Shared-object static constructors called with a lock held
2013-06-26 22:43 [Bug dynamic-link/15686] New: Shared-object static constructors called with a lock held macro@linux-mips.org
2014-06-13 13:30 ` [Bug dynamic-link/15686] " fweimer at redhat dot com
2021-09-13 12:41 ` nsz at gcc dot gnu.org
@ 2021-09-21 13:21 ` nsz at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: nsz at gcc dot gnu.org @ 2021-09-21 13:21 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15686
--- Comment #4 from Szabolcs Nagy <nsz at gcc dot gnu.org> ---
i opened bug 28357 for the deadlock with pthread_create.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-21 13:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26 22:43 [Bug dynamic-link/15686] New: Shared-object static constructors called with a lock held macro@linux-mips.org
2014-06-13 13:30 ` [Bug dynamic-link/15686] " fweimer at redhat dot com
2021-09-13 12:41 ` nsz at gcc dot gnu.org
2021-09-21 13:21 ` nsz at gcc dot gnu.org
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).