From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 12 11:40:55 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 EF0101065672 for ; Fri, 12 Sep 2008 11:40:55 +0000 (UTC) (envelope-from titanandrews@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id 8B1188FC0A for ; Fri, 12 Sep 2008 11:40:55 +0000 (UTC) (envelope-from titanandrews@gmail.com) Received: by gxk10 with SMTP id 10so18543219gxk.19 for ; Fri, 12 Sep 2008 04:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=fLJf9ue1XGX2LC2qrEdmB6+5juyezzVOo0znKWUSaSE=; b=gciOKvJLJu8U/36CDrtMhk1d7og1E2sBsuDhiLiEnhhIMY166VoNenz9ekydbNFs16 zCiu/F4qriRNztWDh5O8OvHuymKffEXK2xPzBBX5v9UfmadnAi9nWRimWCIPgXK7DqZl q49lxUgNZHCAAMNP9bg1mEGUG0yfH5myBj9aI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=KA+dV8ORRd9Vx8SfbQ2yk+vBqQuZNwVNm2X5Oudc3YfJem/1k4POPNSh3S39yGprIi 34nS4OXqvpPPrhm8Qeuani6TFnyuMfeAOCcUQIPODAnglNVvdMp3aT2jwAuPRwTSYJIe lHF3iuRNLac87vwxdKJIGJp18ykJar/RsMrFc= Received: by 10.100.229.14 with SMTP id b14mr5032258anh.43.1221219654335; Fri, 12 Sep 2008 04:40:54 -0700 (PDT) Received: from ?192.168.3.101? ( [71.0.189.248]) by mx.google.com with ESMTPS id 66sm12925028wra.33.2008.09.12.04.40.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Sep 2008 04:40:53 -0700 (PDT) Message-ID: <48CA555A.4050104@gmail.com> Date: Fri, 12 Sep 2008 07:41:14 -0400 From: Barry Andrews User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 11:40:56 -0000 Do you know if this is documented in Release Notes or Known Issues or somewhere? thanks, B Daniel Eischen wrote: > 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. >