From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 11 20:42:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2E951065674 for ; Thu, 11 Sep 2008 20:42:49 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8A46C8FC18 for ; Thu, 11 Sep 2008 20:42:49 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id m8BKMc4k029952; Thu, 11 Sep 2008 16:22:38 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Thu, 11 Sep 2008 16:22:38 -0400 (EDT) Date: Thu, 11 Sep 2008 16:22:38 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Barry Andrews In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: loading multi threaded library into executable enabled for single thread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2008 20:42:49 -0000 On Thu, 11 Sep 2008, Barry Andrews wrote: > Hi All, > > I have a multi-threaded library that is linked against libpthread. When I > load this lib into a tclsh process on FreeBSD, I get this error, "Recurse on > private mutex". and crash. I understand that I can have this issue when the > executable is not linked against libpthread but one of the loaded libs is. > Basically, it thinks it's in single threaded mode. This must be an older version of FreeBSD. I think you must link your application (tclsh or whatever) against libpthread in order for this to work. The libc functions won't get properly overloaded by their equivalents in libpthread unless you do this. -- DE