Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26299 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73480 invoked by uid 1010); 3 Nov 2006 14:05:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 73465 invoked from network); 3 Nov 2006 14:05:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Nov 2006 14:05:21 -0000 Authentication-Results: pb1.pair.com header.from=list@firehawksystems.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=list@firehawksystems.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain firehawksystems.com from 204.11.219.140 cause and error) X-PHP-List-Original-Sender: list@firehawksystems.com X-Host-Fingerprint: 204.11.219.140 ls6.firehawksystems.com Received: from [204.11.219.140] ([204.11.219.140:58278] helo=ls6.firehawksystems.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/70-02428-F9C4B454 for ; Fri, 03 Nov 2006 09:05:21 -0500 Received: from [10.0.0.2] (adsl-75-46-85-78.dsl.ipltin.sbcglobal.net [75.46.85.78]) (authenticated bits=0) by ls6.firehawksystems.com (8.13.8/8.13.8) with ESMTP id kA3E4wA5011059 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 3 Nov 2006 06:05:00 -0800 (PST) In-Reply-To: <20061103132040.GA20241@redhat.com> References: <20061027115704.5160b509.mba2000@ioplex.com> <3F51F1DD-7B25-4302-975A-2F8E276D5EC9@firehawksystems.com> <20061103132040.GA20241@redhat.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <9D96A44D-3915-4526-9554-AF28A78B58F4@firehawksystems.com> Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Fri, 3 Nov 2006 09:04:54 -0500 To: Joe Orton X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ls6.firehawksystems.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on ls6.firehawksystems.com Subject: Re: [PHP-DEV] What version introduced RTLD_DEEPBIND? From: list@firehawksystems.com ("Brian J. France") 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 unloading issue, our FreeBSD kernel team is looking into it to see if they can help). You can see this issue with RH bug 84372. Look at the comment on "08-30-2006 01:40pm" on how to build open source software and make it happen. I am going to see if removing RTLD_DEEPBIND fixes this issue as well. Brian - bfrance posting as mason on the RH issue tracker