Bug #72645 [NEW]: php failed with 500 error 0xfffffffe, "Cannot create mutex" in opcache.log

From: Date: Fri, 22 Jul 2016 07:47:26 +0000
Subject: Bug #72645 [NEW]: php failed with 500 error 0xfffffffe, "Cannot create mutex" in opcache.log
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202498@lists.php.net to get a copy of this message
From: pvasilevich at plesk dot com Operating system: Windows PHP version: 7.0.9 Package: opcache Bug Type: Bug Bug description:php failed with 500 error 0xfffffffe, "Cannot create mutex" in opcache.log Description: ------------ Affected OSes: Windows 7, Windows Server 2012, 2012R2 STEPS TO REPRODUCE: * create user phptest * create 2 IIS application pools (pool1 and pool2), configure these pools to use this common user phptest as identity (pool->Advanced Settings->Process Model->Identity = phptest) * create 2 different sites with php handler 7.0.9 64-bit, first one is working under pool1 and another one under pool2 users. * try to open sample page with phpinfo() for one site - it is working fine * try to open similar sample page with phpinfo() on another site. Got: HTTP Error 500.0 - Internal Server Error D:\php-7.0.9\php-cgi.exe - The FastCGI process exited unexpectedly Error Code 0xfffffffe After some analysis, I have found that in opcache log (if you have enabled it before in php.ini) you can find the following entry: Fri Jul 22 13:15:23 2016 (24780): Fatal Error Cannot create mutex I have checked mutex created by first process php-cgi.exe interesting thing: mutex name contains real user name (phptest) but security attributes of this mutex don't have permissions for this user, but have permissions for special internal IIS pool user (named the same way as pool named). see screenshot. second process is working under the same user phptest, but cannot access to the mutex, because second process is working in another pool. So the error appeared. The same issue is in php5.5 and php5.6 As fast workaround for php 5.5 (which was originally needed for me) I have tried to compile opcache that also checks env variable APP_POOL_ID (set by IIS) and if it is not empty, add this to both mmap base filename and to mutex name. Test script: --------------- <?php phpinfo(); -- Edit bug report at https://bugs.php.net/bug.php?id=72645&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72645&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72645&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72645&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72645&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72645&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72645&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72645&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72645&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72645&r=support Expected behavior: https://bugs.php.net/fix.php?id=72645&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72645&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72645&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72645&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72645&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72645&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72645&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72645&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72645&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72645&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72645&r=mysqlcfg

« previous php.bugs (#202498) next »