From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9734 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: dlopen deadlock Date: Wed, 23 Mar 2016 11:55:36 +0100 Message-ID: <20160323105536.GG9862@port70.net> References: <20160113110937.GE13558@port70.net> <20160114224115.GW238@brightrain.aerifal.cx> <20160115003148.GH13558@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1458730552 28991 80.91.229.3 (23 Mar 2016 10:55:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 10:55:52 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9747-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 23 11:55:51 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aigS7-0006XB-BD for gllmg-musl@m.gmane.org; Wed, 23 Mar 2016 11:55:51 +0100 Original-Received: (qmail 11291 invoked by uid 550); 23 Mar 2016 10:55:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 11273 invoked from network); 23 Mar 2016 10:55:47 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20160115003148.GH13558@port70.net> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9734 Archived-At: * Szabolcs Nagy [2016-01-15 01:31:49 +0100]: > * Rich Felker [2016-01-14 17:41:15 -0500]: > > On Wed, Jan 13, 2016 at 12:09:37PM +0100, Szabolcs Nagy wrote: > > > This bug i reported against glibc also affects musl: > > > https://sourceware.org/bugzilla/show_bug.cgi?id=19448 > > > > > > in case of musl it's not the global load lock, but the > > > init_fini_lock that causes the problem. > > > > The deadlock happens when a ctor makes a thread that calls dlopen and > > does not return until the new thread's dlopen returns, right? > > > > yes > (not a common scenario) more general deadlock case: ctor waits for another thread that is in dlopen waiting for the init_fini_lock. this actually happened on glibc, but through interposed malloc instead of a ctor https://sourceware.org/ml/libc-alpha/2016-03/msg00594.html