From owner-freebsd-database@FreeBSD.ORG Thu Jul 26 01:03:32 2007 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AA5C16A419 for ; Thu, 26 Jul 2007 01:03:32 +0000 (UTC) (envelope-from tsr2600@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id B658513C467 for ; Thu, 26 Jul 2007 01:03:31 +0000 (UTC) (envelope-from tsr2600@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so496316uge for ; Wed, 25 Jul 2007 18:03:30 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PAxd+YwTN+x15qJPRekmmtgcX9mhizVczox8FIXRW4To9A1VwQGfgUs1KuZFCm5V92+uB9FXtOTsDpMYWh5ud7tnJpNdqDL1V0HNukfPwcWXEg8PtiaUcJoTKhYEo43td//HPqS4Qk8GpYruRDl59TrWF0HZNBiRMw1WmJ9Ljew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PYchyfVJ1LqaOyuIZL9gQpRChE4GtRZH0IRnvCuL+RlU2hzHdUGHU4iSFJ5kAyXGUdddG1Bk8c56HzfJOF3k3FUVmaGKZl5NoPhniy4UetHjofgIgxIeHa2BZ+IghE8vloA+gCmAw+lwO+aupC/f8do+TxA7iidtBIhlrA/kDmM= Received: by 10.78.201.15 with SMTP id y15mr304694huf.1185410189619; Wed, 25 Jul 2007 17:36:29 -0700 (PDT) Received: by 10.78.143.19 with HTTP; Wed, 25 Jul 2007 17:36:29 -0700 (PDT) Message-ID: <679088c80707251736r77a9108v422ef86387a3e6ed@mail.gmail.com> Date: Wed, 25 Jul 2007 17:36:29 -0700 From: "Gordon Stratton" To: freebsd-database@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: PHP5 + oci8 consistently segfaults on script exit X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2007 01:03:32 -0000 Hey, I'm running FreeBSD 6.2-RELEASE-p1 and PHP 5.2.2 built with the oci8 extension which is built against the oracle8-client port version 0.1.1_1. Connecting to and working with an Oracle database works well so far, but PHP segfaults whenever any script that uses the oci8 extension is run and exits (regardless of success or failure). The segfault _only_ occurs when PHP is tearing everything down after the script runs. Therefore scripts run successfully, but my kernel logs look like this: Jul 25 16:59:17 kernel: pid 89667 (php), uid 1003: exited on signal 11 Jul 25 17:00:11 kernel: pid 89725 (php), uid 1003: exited on signal 11 Jul 25 17:01:38 kernel: pid 89729 (php), uid 1003: exited on signal 11 Jul 25 17:02:58 kernel: pid 89732 (php), uid 1003: exited on signal 11 ... Using gdb I've tracked the segfault down to a call to dlclose (via the macro DL_UNLOAD in Zend/zend_API.c on line 1916). The module being unloaded when the segfault occurs is the oci extension. So far, I've tried: - Various combinations of environment variables per the PHP documentation - Messing around remapping symbols as outlined in README.PORT that ships with oracle8-client and rebuilding oci8 each time - Not loading other PHP extensions - Loading other PHP extensions in a different order - Googling until I've memorized the 10 or so pages related to my problem The problem has persisted across multiple versions of PHP in the last several months, and pretty much everything I've tried results in a working oci8 with the segfault after the script finishes. Today we experienced some very odd behavior with a large Oracle query and httpd exiting on signal 4 and while they may not be related, I'd like to see if it's at all possible to resolve this issue (in the spirit of ruling things out). Anything is welcome, I've heard of at least one other person with my problem (and nearly identical setup) so I don't think I'm the only one out there. Thanks for your time, Gordon From owner-freebsd-database@FreeBSD.ORG Sat Jul 28 14:46:46 2007 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2D3416A418 for ; Sat, 28 Jul 2007 14:46:46 +0000 (UTC) (envelope-from numisemis@yahoo.com) Received: from web36614.mail.mud.yahoo.com (web36614.mail.mud.yahoo.com [209.191.85.31]) by mx1.freebsd.org (Postfix) with SMTP id B927913C465 for ; Sat, 28 Jul 2007 14:46:46 +0000 (UTC) (envelope-from numisemis@yahoo.com) Received: (qmail 11414 invoked by uid 60001); 28 Jul 2007 14:20:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=gUhNJg+U3gJyTkNao2Hv+yY2gZ1S5IE8M/JSODLOclBJEdE3dCsl2PyD1KbHpIFP8hU0VevPWvAqkxZ1BadUBgKcNQZO0sa/58dMP7rrMx+wIRpsAV8uU89eduBAL2R2ZmPFg5J59hFSLI7XRV1EwXiuN3Wo/QlWSAD2dcMGs2E=; X-YMail-OSG: 98pXahsVM1nLT_U0kY9.qdxpk.AZX7Ah9A7IuxaPG8CuSspZEzROeHYj5DI38Q5FzQ-- Received: from [85.10.60.235] by web36614.mail.mud.yahoo.com via HTTP; Sat, 28 Jul 2007 07:20:04 PDT Date: Sat, 28 Jul 2007 07:20:04 -0700 (PDT) From: Simun Mikecin To: tsr2600@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <876507.10863.qm@web36614.mail.mud.yahoo.com> Cc: freebsd-database@freebsd.org Subject: Re: PHP5 + oci8 consistently segfaults on script exit X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2007 14:46:47 -0000 >I'm running FreeBSD 6.2-RELEASE-p1 and PHP 5.2.2 built with the oci8 >extension which is built against the oracle8-client port version >0.1.1_1. >Connecting to and working with an Oracle database works well so far, but >PHP segfaults whenever any script that uses the oci8 extension is run >and exits (regardless of success or failure). The segfault _only_ >occurs when PHP is tearing everything down after the script runs. >Therefore scripts run successfully, but my kernel logs look like this: >Jul 25 16:59:17 kernel: pid 89667 (php), uid 1003: exited on signal 11 >Jul 25 17:00:11 kernel: pid 89725 (php), uid 1003: exited on signal 11 >Jul 25 17:01:38 kernel: pid 89729 (php), uid 1003: exited on signal 11 >Jul 25 17:02:58 kernel: pid 89732 (php), uid 1003: exited on signal 11 Could you please try these and send feedback: 1) Try the same using PDO_OCI instead of oci8 extension 2) Try with this combination: apache 2.0 (port compiled with WITH_THREADS) + php + oci8 extension 3) Try with this combination: apache 2.0 (port compiled with WITH_THREADS) + php + PDO_OCI 2) and 3) should be triggered by HTTP request. ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ From owner-freebsd-database@FreeBSD.ORG Sat Jul 28 18:59:20 2007 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 517FB16A418 for ; Sat, 28 Jul 2007 18:59:20 +0000 (UTC) (envelope-from tsr2600@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id D0CC413C457 for ; Sat, 28 Jul 2007 18:59:19 +0000 (UTC) (envelope-from tsr2600@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so965544uge for ; Sat, 28 Jul 2007 11:59:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IcGS0B851hEBS/dMqR2b4LLaRwZ5eN+HJtctVBpEJf4P9Vrl6IEMwk3ene77GXOvNQvCnkDZAOkwKgDA5qWqby4Wg2h8TF9auqlifmESyfK3v5ab3ymoX7Zjprn/EDNoEE7V6W6JRu0WbUJNIHzu2yYCkMwtKsh0CIxY8Td1Qgw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=i8PceU+BLFbENJmbqZkqsNq8md6xUd5CSyMMFSPn/GdAHEyYFVWs3P9IEoXTgTNSjZEV14h5ZfbD2kfxkZrtpqEe4LgaaT/HNdwH74B7lZacnhEVEbnQJu9EMosT+E3wWPZFCpCZjsdB6mUQFu6auCASV6sIUk7UutTv3iaHJMk= Received: by 10.78.150.7 with SMTP id x7mr1067867hud.1185649158568; Sat, 28 Jul 2007 11:59:18 -0700 (PDT) Received: by 10.78.143.19 with HTTP; Sat, 28 Jul 2007 11:59:18 -0700 (PDT) Message-ID: <679088c80707281159q2c906b4bn31ca7fcfdd2483a9@mail.gmail.com> Date: Sat, 28 Jul 2007 11:59:18 -0700 From: "Gordon Stratton" To: "Simun Mikecin" , freebsd-database@freebsd.org In-Reply-To: <876507.10863.qm@web36614.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <876507.10863.qm@web36614.mail.mud.yahoo.com> Cc: Subject: Re: PHP5 + oci8 consistently segfaults on script exit X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2007 18:59:20 -0000 On 7/28/07, Simun Mikecin wrote: > Could you please try these and send feedback: > > 1) Try the same using PDO_OCI instead of oci8 extension > 2) Try with this combination: apache 2.0 (port compiled with WITH_THREADS) + php + oci8 extension > 3) Try with this combination: apache 2.0 (port compiled with WITH_THREADS) + php + PDO_OCI > > 2) and 3) should be triggered by HTTP request. Hey Simun, 1) Segfaults on exit, same as oci8. 2) Does not segfault. 3) Does not segfault. In my situation, everything works like a charm up until the module is unloaded via dlclose(3). My guess is that since mod_php doesn't unload/reload PHP modules across requests that this is the reason it is not segfaulting with httpd, but segfaulting with CLI PHP. Thanks, Gordon