From owner-freebsd-hackers@freebsd.org Fri Jun 3 16:27:47 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AD97B687DC; Fri, 3 Jun 2016 16:27:47 +0000 (UTC) (envelope-from papowell@astart.com) Received: from astart2.astart.com (wsip-72-214-30-30.sd.sd.cox.net [72.214.30.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6179D1C0C; Fri, 3 Jun 2016 16:27:46 +0000 (UTC) (envelope-from papowell@astart.com) Received: from laptop_103.private (localhost [127.0.0.1]) by astart2.astart.com (8.14.9/8.14.9) with ESMTP id u53GRjKE075914; Fri, 3 Jun 2016 09:27:46 -0700 (PDT) (envelope-from papowell@astart.com) Reply-To: papowell@astart.com To: freebsd-apache@freebsd.org, "freebsd-hackers@freebsd.org" From: Patrick Powell Subject: Apache and Dynamic Loading Modules Problems. Organization: Astart Technologies Message-ID: <9b77907e-70fc-16f3-c389-0e79239b9206@astart.com> Date: Fri, 3 Jun 2016 09:27:45 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2016 16:27:47 -0000 This is a bit complicated. I have filed a bug report: Bug 209585 - www/apache24 dynamic loading of MySQL client library generates errors with mod_perl CGI I suspect that the problem I am seeing is the symptom of something more serious. I want to do some further investigation but I have run into a couple of roadblocks. Before I reinvent the round rolling thing I thought I would ask the experts for some advice. It appears (from my limited tests) that the problem happens when Apache loads a module which has duplicate references to the same set of modules. In this case it appears to be the MySQL library. From my limited reading, on FreeBSD Apache uses the dynamic loadable library facilities. Note that this problem does not occur on FreeBSD 9.3 but it does occur on 10.X. This indicates that there is some change in the support for this between 9.3 and 10.X. (But I could be wrong. Just guessing here.) Just to confuse the issue here, the two Apache modules which appear to cause the problem are mod_perl + Perl DBD + Mysql support mod_dbd + APR1 + Mysql via /usr/local/lib/apr-util-1/apr_dbd_mysql-1.so Can somebody point me to some UP TO DATE or definitive documentation on the dynamic loading facility? There is lots of references to loadable kernel modules but not much on how Apache uses dynamic loading. Secondly, can somebody suggest a way to try to try to see what is happening as Apache loads these modules? I was thinking about seeing what the difference is between loading only one module (no problem) and loading two modules (problem) and trying to track down the issue. -- Patrick Powell Astart Technologies papowell@astart.com 1530 Jamacha Rd, Suite X Network and System San Diego, CA 92019 Consulting 858-874-6543 FAX 858-751-2435 Web: www.astart.com