Date: Mon, 6 Dec 2004 17:38:24 GMT From: Peter Jeffery <peterj@qubesoft.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/74780: [patch] php5 crashes with threaded apache2 Message-ID: <200412061738.iB6HcONn065015@www.freebsd.org> Resent-Message-ID: <200412061740.iB6HeKiR079735@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 74780 >Category: ports >Synopsis: [patch] php5 crashes with threaded apache2 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 06 17:40:20 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Peter Jeffery >Release: 5.3-Stable >Organization: Qube Software >Environment: FreeBSD poblano.qubesoft.com 5.3-STABLE FreeBSD 5.3-STABLE #8: Tue Nov 30 19:38:43 GMT 2004 root@poblano.qubesoft.com:/usr/obj/usr/src/sys/PETE i386 >Description: (Sorry if this is a duplicate, but I think the original didn't make it using command line send-pr) When using the php5 module in apache2 (apache-worker-2.0.52_3) it regularly crashes when trying to process non-trivial php files. After some experimentation it seemed that this was due to stack overflow problems and to back that up I found this: http://www.phpbuilder.com/lists/php-developer-list/2003072/0051.php Which is a patch for HPUX which also has 64k thread stack sizes. This seems to have fixed the problem >How-To-Repeat: compile apache2 WITH_MPM=worker and then php5 so that it builds itself in threaded mode. I don't have any specific php files to provide as they are not yet public, but a normal 650 line file with a bunch of functions in it crashed httpd everytime. Also compiling Smarty templates would pretty much always crash httpd. This patch fixes that. >Fix: --- Zend/zend.h.orig Mon Dec 6 15:42:56 2004 +++ Zend/zend.h Mon Dec 6 15:46:40 2004 @@ -176,7 +176,7 @@ #endif -#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(__darwin__) && !defined(__APPLE__) +#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(__darwin__) && !defined(__APPLE__) && !(defined(ZTS) && defined(__FreeBSD__)) # define do_alloca(p) alloca(p) # define free_alloca(p) #else >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412061738.iB6HcONn065015>