php5 segfault
Jeremy Chadwick
koitsu at FreeBSD.org
Wed Oct 8 13:12:50 UTC 2008
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 at 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 |
More information about the freebsd-questions
mailing list