RE: [PECL-DEV] apc causing segmentation fault?

From: Date: Tue, 03 Aug 2004 20:29:18 +0000
Subject: RE: [PECL-DEV] apc causing segmentation fault?
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1084@lists.php.net to get a copy of this message
Actually, the patch doesn't completely solve the problem. If you have functions or classes defined in include files and the SIGTERM comes after the opcodes for that included file have been executed and it drops off of the cache entry stack, then the function and class pointers won't be cleaned up and you end up with the same crash. Here is an additional patch that addresses this by delaying popping these files off of the stack until request shutdown. Index: apc_main.c =================================================================== RCS file: /CVSROOT/apc/apc_main.c,v retrieving revision 1.11 diff -u -r1.11 apc_main.c --- apc_main.c 30 Jul 2004 17:23:08 -0000 1.11 +++ apc_main.c 3 Aug 2004 20:26:43 -0000 @@ -203,7 +203,7 @@ static void my_execute(zend_op_array* op_array TSRMLS_DC) { old_execute(op_array TSRMLS_CC); - +#if 0 if (apc_stack_size(APCG(cache_stack)) > 0) { apc_cache_entry_t* cache_entry = (apc_cache_entry_t*) apc_stack_top(APCG(cache_stack)); @@ -214,6 +214,7 @@ apc_cache_release(APCG(cache), cache_entry); } } +#endif } /* }}} */ So my_execute() just calls old_execute() now which makes it rather redundant. George, do you see any nasties introduced by delaying the pop and release to request shutdown here? -Rasmus On Tue, 3 Aug 2004, Shannon Werb wrote: > > I manually applied the patch on one of my systems, rebuilt and restarted > apache. > So I am running with the new code now, have been for a few hours, no > problems yet. > > I'll let you know if I begin seeing it, the httpd.core files it dumps don't > seem to have any backtrace info in them when I do a gdb > /usr/local/apache/httpd.core (file created on dump) then do a bt at the > (gdb) prompt, any idea why that would be? It just says No stack info > available or something like that... > > Regards, > Shannon > > > > > > -- > PECL development discussion Mailing List (http://pecl.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.pecl.dev (#1084) next »