php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56355 Apache2 with worker APC RELEASE_2_0_4
Submitted: 2005-03-21 10:00 UTC Modified: 2005-08-16 07:26 UTC
From: ihanic at yahoo dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 4.3.10 OS: Gentoo Base System version 1.4.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ihanic at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-03-21 10:00 UTC] ihanic at yahoo dot com
Description:
------------
All works fine in prefork apache mode, BUT

cat error_log
apache2: /home/ihanic/cvs/apc/pecl/apc/apc_stack.c:50: apc_stack_clear: Assertion `stack != ((void *)0)' failed

apache2 -V       
Server version: Apache/2.0.53
Server built:   Mar 21 2005 15:52:20
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/conf/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/conf/apache2.conf"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-21 10:23 UTC] rasmus@php.net
I have no plans to make this work under a threaded MPM.  If someone else feels like doing so, great.
 [2005-04-08 13:12 UTC] xuefer at 21cn dot com
i did some changes long ago.
there's so much TSRM relatived to fix, so i wonder how you compiled it.

i mixed my modification by my other changes, which can't be accepted.

i'd like to see apc for php5 rather than TSRM support :)

this is part of the modify, just for example.

Index: php_apc.c
===================================================================
RCS file: /repository/pecl/apc/php_apc.c,v
retrieving revision 3.41
diff -u -r3.41 php_apc.c
--- php_apc.c   14 Nov 2004 18:07:25 -0000  3.41
+++ php_apc.c   8 Apr 2005 17:02:42 -0000
@@ -56,16 +56,18 @@
 
 /* {{{ ZEND_DECLARE_MODULE_GLOBALS(apc) */
 
-PHPAPI ZEND_DECLARE_MODULE_GLOBALS(apc)
+ZEND_DECLARE_MODULE_GLOBALS(apc)
+apc_cache_t* apc_cache;     /* the global compiler cache */
+apc_cache_t* apc_user_cache;  /* the global user content cache */
 
 static void php_apc_init_globals(zend_apc_globals* apc_globals TSRMLS_DC)
 {
     apc_globals->filters = NULL;
     apc_globals->initialized = 0;
-    apc_globals->cache = NULL;
-    apc_globals->cache_stack = NULL;
     apc_globals->compiled_filters = NULL;
     apc_globals->cache_by_default = 1;
+    apc_globals->cache_stack = apc_stack_create(0);
+    apc_globals->user_cache_stack = apc_stack_create(0);
     apc_globals->slam_defense = 0;
 }
 
@@ -81,6 +83,8 @@
         apc_efree(apc_globals->filters);
     }
 
+   apc_stack_destroy(apc_globals->cache_stack);
+   apc_stack_destroy(apc_globals->user_cache_stack);
     /* the rest of the globals are cleaned up in apc_module_shutdown() */
 }
 #endif
@@ -92,6 +96,7 @@
 [2005-04-08 13:34 UTC] rasmus@php.net
Do you have a full patch with just your TSRM fixes?  I can have a look.
 [2005-08-15 10:12 UTC] edink at emini dot dk
The latest CVS version should be better worker mpm citizen. Could you check to see if it helps?
 [2005-08-16 07:26 UTC] ihanic at yahoo dot com
worked: APC-3.0.7-dev (20050816)
php-5.0.4/4.4 apache-2.0.54
Thanks. it's realy helpful
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 20:01:55 2025 UTC