From owner-freebsd-bugs@FreeBSD.ORG Wed May 14 18:10:39 2008 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57191106564A for ; Wed, 14 May 2008 18:10:39 +0000 (UTC) (envelope-from noisex@apollo.lv) Received: from smtp1.apollo.lv (smtp1.apollo.lv [80.232.168.211]) by mx1.freebsd.org (Postfix) with ESMTP id DB7188FC0C for ; Wed, 14 May 2008 18:10:38 +0000 (UTC) (envelope-from noisex@apollo.lv) X-Cloudmark-Score: 0.000000 [] X-Virusscan: Clamd Received: from [195.122.14.116] (HELO dreamwork) by smtp1.apollo.lv (CommuniGate Pro SMTP 5.1.12) with ESMTP id 378873294 for freebsd-bugs@FreeBSD.org; Wed, 14 May 2008 20:10:35 +0300 From: "Noisex" To: References: <200805140900.m4E90DGo049817@freefall.freebsd.org> In-Reply-To: <200805140900.m4E90DGo049817@freefall.freebsd.org> Date: Wed, 14 May 2008 20:10:34 +0300 Message-ID: <004601c8b5e5$6c3303c0$44990b40$@lv> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1257" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Aci1oP1acEeM42TyQ/6xSTLhAKaWxwAQEyew Content-Language: lv Cc: Subject: PHP5-OCI8 on script exit problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2008 18:10:39 -0000 Hallo! Maybe about this problem is discussed before and maybe this is not FreeBSD but PHP/Oracle client problem - if YES...you could provide me if = you know a solution of this problem because on GOOGLE I didn't find a good answer how to solve the problem. FreeBSD 7.0; PHP 5.2.6; PHP5-OCI8 1.2.5; Oracle 8 client 0.2.0_1. Every time when PHP-CLI or PHP-CGI script exits from command line PHP = die with segmentation fault 11 (core dumped).=20 Program terminated with signal 11, Segmentation fault. #0 0=D788f18acc in ?? () from /usr/local/lib/php/20060613-debug/oci8.so >From GDB debugger I traced that it was made by PHP/oci8.so unloading of = the OCI8 library to a (DL_UNLOAD) which calls dlclose...maybe oracle = extension is doing something incorrectly such as registering a function to be = called at exit via atexit? In that case, we would call dlclose after the function(s) are registered, but then when we exit and those registered functions get called, we get a segmentation fault as we=92ve unmapped = the memory they live in! While that may not be precisely what is happening = in this case, as far as I can tell I=92m dealing with a bug in the Oracle library. OCI8 connections made through httpd and mod_php were unaffected as the = PHP module and extensions get loaded into memory, and unloaded during the = normal course of execution. * Everything is compiled from ports. In PHP-OCI8 compile time all = $ORACLE environments was set up correct. Regards Gatis Rumbens =20