From owner-freebsd-questions@FreeBSD.ORG Wed Oct 8 13:12:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F7711065697 for ; Wed, 8 Oct 2008 13:12:50 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [76.96.30.16]) by mx1.freebsd.org (Postfix) with ESMTP id 6585F8FC14 for ; Wed, 8 Oct 2008 13:12:50 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA08.emeryville.ca.mail.comcast.net ([76.96.30.12]) by QMTA01.emeryville.ca.mail.comcast.net with comcast id QADn1a0020FhH24A1DCGey; Wed, 08 Oct 2008 13:12:16 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA08.emeryville.ca.mail.comcast.net with comcast id QDCo1a00c2P6wsM8UDCpwb; Wed, 08 Oct 2008 13:12:49 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=JZuKH2X98dxnk6PaD3EA:9 a=UkUxQPdxJthEHoVWRXgA:7 a=BbxKeMMBBiFd_vpqXYG1k9-jlYAA:4 a=yDQxzi2QZewA:10 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id D6CE9C9419; Wed, 8 Oct 2008 06:12:48 -0700 (PDT) Date: Wed, 8 Oct 2008 06:12:48 -0700 From: Jeremy Chadwick To: Laszlo Nagy Message-ID: <20081008131248.GA77388@icarus.home.lan> References: <48ECACB4.8080103@shopzeus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48ECACB4.8080103@shopzeus.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: php5 segfault X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 13:12:50 -0000 On Wed, Oct 08, 2008 at 02:51:00PM +0200, Laszlo Nagy wrote: > uname -a: > > FreeBSD shopzeus.com 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #3: Mon Oct > 6 07:50:31 EDT 2008 > gandalf@shopzeus.chello.hu:/usr/obj/usr/src/sys/SHOPZEUS amd64 > > when compiling /usr/ports/php5 I see messages like: > > bin/sh /usr/ports/lang/php5/work/php-5.2.6/libtool --silent > --preserve-dup-deps --mode=compile cc -IZend/ > -I/usr/ports/lang/php5/work/php-5.2.6/Zend/ -DPHP_ATOM_INC > -I/usr/ports/lang/php5/work/php-5.2.6/include > -I/usr/ports/lang/php5/work/php-5.2.6/main > -I/usr/ports/lang/php5/work/php-5.2.6 -I/usr/local/include/libxml2 > -I/usr/local/include -I/usr/ports/lang/php5/work/php-5.2.6/ext/date/lib > -I/usr/ports/lang/php5/work/php-5.2.6/TSRM > -I/usr/ports/lang/php5/work/php-5.2.6/Zend -O2 -fno-strict-aliasing > -pipe -c /usr/ports/lang/php5/work/php-5.2.6/Zend/zend_API.c -o > Zend/zend_API.lo > > So it is using -O2 and -pipe. Is this something that I can disable? If you want. "make config" in /usr/ports/lang/php5 will give you a menu option for DEBUG; turn it on. I'm not sure what the compile options you're showing have *anything* to do with the segfault you're reporting. I don't see any backtraces or details of the segfault. > It might be because we are using postgresql connections. For pages without > pgsql connection, there is no segfault. I've personally used PHP5 (as a CGI only, not as an Apache module) with PostgreSQL and experienced no segfaults. > It must be noted that the segfault happens on cleanup. E.g. all web > sites are working fine, except that we are getting many many segfault > messages in the logs all the time. Many people have found that re-ordering the "extensions" lines in /usr/local/etc/php/extensions.ini has solved odd segfaults. I personally have never seen this, nor have ever needed to adjust that file, but it has worked for others. Also, you cannot use a threaded Apache (e.g. threaded MPMs) with PHP since not all extensions support threading. Your Apache needs to be built without threads and use a non-thread model (e.g. prefork). I've also had success with Apache-ITK-mpm. Search the mailing lists for this situation, try the recommendations, and then if nothing fixes it, provide a backtrace. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |