Re: [PHP-DEV] What version introduced RTLD_DEEPBIND?
Brian J. France <list <at> firehawksystems.com>
2006-11-03 14:04:54 GMT
On Nov 3, 2006, at 8:20 AM, Joe Orton wrote:
> On Fri, Oct 27, 2006 at 12:12:46PM -0400, Brian J. France wrote:
>> and I plan on removing it from our internal builds as it causes more
>> problems than I think it fixes (on RHEL only).
>
> Hi, what problems do you see from the use of RTLD_DEEPBIND?
Where to start? :)
First issue we have is we build our extension linked with a static
library called apstubs. apstubs is a hack where all exported apache
functions, structs, etc are defined weak (function print a error and
abort). We do this so PHP extensions that are mainly for apache
only, can still load on the command line without issue (assuming weak
code path is not executed). When things are run in apache the strong
symbols from apache override the weak ones in the library.
With RTLD_DEEPBIND we don't get this behavior because that flag and
force it to use the weak symbols even when the strong symbols are
present. I understand the reasoning for this behavior (not being
able to namesapce and having duplicate symbols), but we rely on weak/
strong symbols in a lot of our code and this just causes more problems.
A second issue we have is when RTLD_DEEPBIND is defined the rtld
can't find symbols in a already loaded lib. This one is strange and
I can't figure it out, but if I had to guess I would be it is a
problem with libraries not getting unloaded between the first and
second pass of apache startup (which we are trying to track down now,
expect a new or updated RH bug soon if we find something). But for
some reason turning off RTLD_DEEPBIND fixes the core dump (not the
(Continue reading)