ports/74780: [patch] php5 crashes with threaded apache2
Peter Jeffery
peterj at qubesoft.com
Mon Dec 6 17:40:21 UTC 2004
>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 at 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:
More information about the freebsd-ports-bugs
mailing list