|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-08-20 17:50 UTC] user7 at mailinator dot com
Description: ------------ httpd -k restart Will crash Apache 2.2.19 (on Vista SP1) when using... 1. APC 3.1.9 built with PHP 5.3.7 (configure ... --enable-apc=shared --enable-apc-srwlock-kernel) APC Version 3.1.9 PHP Version 5.3.7 APC Host serverhost (xxx) (127.0.0.1) Server Software Apache/2.2.19 (Win32) mod_ssl/2.2.19 OpenSSL/0.9.8r PHP/5.3.7 Shared Memory 1 Segment(s) with 64.0 MBytes (IPC shared memory, Windows Slim RWLOCK (kernel) locking) Problem signature: Problem Event Name: APPCRASH Application Name: httpd.exe Application Version: 2.2.19.0 Fault Module Name: ntdll.dll 2. Using php_apc-3.1.8-dev+igbinary-1.1.2-dev-20110321-5.3-ts-vc9-x86.zip, php_apc-xp.dll Problem signature: Problem Event Name: APPCRASH Application Name: httpd.exe Application Version: 2.2.19.0 Fault Module Name: ntdll.dll APC Version 3.1.8-dev PHP Version 5.3.7 APC Host serverhost (Q6600) (127.0.0.1) Server Software Apache/2.2.19 (Win32) mod_ssl/2.2.19 OpenSSL/0.9.8r PHP/5.3.7 Shared Memory 1 Segment(s) with 64.0 MBytes (IPC shared memory, Windows Slim RWLOCK (kernel) locking) Will *not* crash Apache 2.2.19 (on Vista SP1) when using... 1. Using pierre's php_apc-3.1.8-dev+igbinary-1.1.2-dev-20110321-5.3-ts-vc9-x86.zip, php_apc-win7.dll APC Version 3.1.8-dev PHP Version 5.3.7 APC Host serverhost (xxx) (127.0.0.1) Server Software Apache/2.2.19 (Win32) mod_ssl/2.2.19 OpenSSL/0.9.8r PHP/5.3.7 Shared Memory 1 Segment(s) with 64.0 MBytes (IPC shared memory, Windows Slim RWLOCK (native) locking) This also happens with PHP 5.3.6, and previous versions of Apache. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 05:00:01 2025 UTC |
This happens because the WINAPI function RtlDeleteResource MUST be called with a valid lock and there is a typo (#ifdef should be #if) in the apc_cache.c so that it always tries to release OS resources used for the non-blocking lock. But since it was never initialized in apc_cache_create there is an exception access violation. The other lock types work whether or not the lock is a valid lock structure. A patch to correct this is attached; however, APC still fails on restart when PHP is run as an Apache module on Windows because of a race condition on shutdown between the parent and child processes. Both processes call DESTROY_LOCK which in is a wrapper for RtlDeleteResource when windows kernel locking is enabled. The first one succeeds, the second one fails for the same reason as above. I have created a patch which fixes that issue and will attach it to a separate bug report. --- W:/TEMP/APC-3.1.9/apc_cache.c Sat May 14 18:14:56 2011 +++ W:/php-sdk/php53dev/vc9/x86/php-5.3.8/ext/apc/apc_cache.c Mon Sep 12 22:00:00 2011 @@ -314,7 +314,7 @@ void apc_cache_destroy(apc_cache_t* cache TSRMLS_DC) { DESTROY_LOCK(cache->header->lock); -#ifdef NONBLOCKING_LOCK_AVAILABLE +#if NONBLOCKING_LOCK_AVAILABLE DESTROY_LOCK(cache->header->wrlock); #endif apc_efree(cache TSRMLS_CC);