This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11941] New: destructor called after shared library relelase (crash in dl_close())
- From: "sbrabec at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 23 Aug 2010 16:44:00 -0000
- Subject: [Bug libc/11941] New: destructor called after shared library relelase (crash in dl_close())
- Reply-to: sourceware-bugzilla at sourceware dot org
This crash appear in pstoedit:
Inconsistency detected by ld.so: dl-close.c: 731: _dl_close: Assertion
`map->l_init_called' failed!
I have verified, that dlopen() and dlclose() calls in the program are well paired.
Debugging the behavior, following things happen:
Program runs, loads shared library modules. These C++ modules have dlclose() in its destructor.
The program then runs its helper using execvp() and then exits.
While processing exit, program crashes.
Debugging the crash, libraries opened by dlopen() are released early in exit processing in
__run_exit_handlers(). As part of this release process, map->l_init_called is set back to zero.
Destructors of libraries opened by dlopen() are called later and cause upper mentioned crash
"Assertion `map->l_init_called' failed!". l_init_called is really zero, as it was set to zero in the previos
step.
This bug is also known:
in openSUSE as https://bugzilla.novell.com/show_bug.cgi?id=622977 (look for detailed backtraces
there)
in Redhat as https://bugzilla.redhat.com/show_bug.cgi?id=507035
in Arch Linux as http://bugs.archlinux.org/task/19221
The same problem was observed in some versions of OpenAL package:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551935
--
Summary: destructor called after shared library relelase (crash
in dl_close())
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: sbrabec at suse dot cz
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: x86_64-suse-linux
GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=11941
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.