This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: malloc->backtrace->dlopen->malloc deadlock
- From: Siddhesh Poyarekar <sid at reserved-bit dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Sat, 9 Jan 2016 09:55:06 +0530
- Subject: Re: malloc->backtrace->dlopen->malloc deadlock
- Authentication-results: sourceware.org; auth=none
- References: <20160108233734 dot 1E2262C3C70 at topped-with-meat dot com>
On Fri, Jan 08, 2016 at 03:37:34PM -0800, Roland McGrath wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=16573 describes a case
> where malloc checking triggering leads to a deadlock because
> malloc_printerr's call to backtrace leads to dlopen for libgcc_s.so and
> that calls into malloc.
>
> I know Carlos was working on making this kind of reentrance work.
> Did that get done? Is there another bug number that 16573 should
> be a dup of?
Based on the backtrace in the bz, this looks like a different (and
new) problem from #16159. The deadlock seems to be happening on the
mtrace-internal LOCK and not the arena lock. We never attempted to
fix that with #16159; our fix was limited to making malloc itself work
and we never got to any use cases beyond that.
Siddhesh