Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2007 22:20:43 +0100
From:      "Heiko Wundram (Beenic)" <wundram@beenic.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: threading and dlopen()
Message-ID:  <200712182220.43401.wundram@beenic.net>
In-Reply-To: <18280.11993.211065.843394@yeti.mininet>
References:  <18280.11993.211065.843394@yeti.mininet>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712182220.43401.wundram>