From owner-freebsd-questions@FreeBSD.ORG Tue Dec 18 21:18:48 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD0C016A417 for ; Tue, 18 Dec 2007 21:18:48 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from mail.beenic.net (mail.beenic.net [83.246.72.40]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9A913C442 for ; Tue, 18 Dec 2007 21:18:48 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from phoenix (hnvr-4db3eee7.pool.einsundeins.de [77.179.238.231]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.beenic.net (Postfix) with ESMTP id E59D3A44529 for ; Tue, 18 Dec 2007 22:11:27 +0100 (CET) From: "Heiko Wundram (Beenic)" Organization: Beenic Networks GmbH To: freebsd-questions@freebsd.org Date: Tue, 18 Dec 2007 22:20:43 +0100 User-Agent: KMail/1.9.7 References: <18280.11993.211065.843394@yeti.mininet> In-Reply-To: <18280.11993.211065.843394@yeti.mininet> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712182220.43401.wundram@beenic.net> Subject: Re: threading and dlopen() X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2007 21:18:48 -0000 Am Dienstag, 18. Dezember 2007 21:34:33 schrieb Markus Hoenicka: > My (limited) analysis makes me think this is some sort of a threading > issue aggravated by the fact that the code is dlopen()ed (remember the > same code works ok if compiled into a standalone app). BTW the > firebird client library is the only library supported by libdbi which > uses threads. All other drivers do not use threads and work ok. Have you tried compiling your program with gcc -fpic -pthread ... ? I don't have any more insight into this problem, at least as I'm not using dbi and as such am not able to reproduce it, but I'd guess that if your program doesn't conform to the platform's required thread semantics (which are turned on by -fpic -pthread) but uses code that does require this, you're bound for trouble. -- Heiko Wundram Product & Application Development