Bug #78125 [Asn]: Persistent php-cgi.exe access fault

From: Date: Fri, 14 Jun 2019 21:41:00 +0000
Subject: Bug #78125 [Asn]: Persistent php-cgi.exe access fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221325@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78125&edit=1 ID: 78125 User updated by: aschmidt at anamera dot net Reported by: aschmidt at anamera dot net Summary: Persistent php-cgi.exe access fault Status: Assigned Type: Bug Package: opcache Operating System: Win x64 PHP Version: 7.2.21-dev Assigned To: cmb Block user comment: N Private report: N New Comment: PS: The phpinfo() error results in php-cgi ending with Windows error ERROR_INVALID_DATA (0x8007000D) Previous Comments: ------------------------------------------------------------------------ [2019-06-14 21:21:53] aschmidt at anamera dot net Problem 1 (persistent): <?php phpinfo( $_GET[ 'i' ] ?? INFO_ALL ); ?> Will work in IIS for all INFO_* values EXCEPT for INFO_MODULES. phpinfo( 8 ) will fail in PHP. However, opcache.php will work fine - and my own scripts seem to work. Also, executing same phpinfo() in CLI runs without apparent problems. Problem 2 (one-time): Initially, after installing 7.2.21-dev, I had restarted the PHP-CLI background application is running first (as a Windows Service) and THEN IIS PHP. This result in FASTCGI crashing with these event log entries occur: Zend OPcache, Event ID 2: Unable to open base address file The system cannot find the file specified. Problem 3 (persistent): If I REBOOT Windows Server, then IIS will start and run (with the exception of phpinfo() ), BUT, I am now unable to start the PHP-CLI service. If I STOP IIS, THEN I can start the PHP-CLI service. This problem can be circumvented with opcache.enable_cli=0. In summary: There STILL appears to be a concurrency problem with OPcache FastCGI and CLI active at the same time. And I there is a problem with OPcache and phpinfo(8) in IIS. ------------------------------------------------------------------------ [2019-06-14 18:07:49] cmb@php.net Can you please try the latest snapshot[1]? [1] <https://windows.php.net/downloads/snaps/php-7.2/r28808ca/> ------------------------------------------------------------------------ [2019-06-09 12:38:10] aschmidt at anamera dot net The problem occurs when a minimal "phpinfo();" script is executed in IIS. However it APPEARS to only occur when both a CLI and a FastCGI application are running at the same time under 7.2.19 with OpCache enabled. I have a CLI application running as a Windows Service. After upgraded to 7.2.19 I first started IIS to get my site running again, but then the Windows Service would not start the CLI app. Baffled, I rebooted the server, which automatically starts the service. I confirmed that NOW the service WAS running. I then started IIS by hand - and whenever I run a basic phpinfo() THAT would now crash. I then stopped the service and IIS, reverted to 7.2.18 (without rebooting) and was aber to start both without problems. With that knowledge, I downloaded 7.2.19 one more time (in case of any download errors), copied it over 7.2.18 again, started the service by hand, and reproduced the IIS error. Finally, I disabled OPcache in 7.2.19 and NOW IIS was successfully running FastCGI in parallel with the CLI Service. Here the most relevant of my PHP.INI settings: precision = 14 zlib.output_compression = Off serialize_precision = -1 zend.enable_gc = On report_memleaks = On auto_globals_jit = On enable_dl = Off zend.assertions = -1 opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=256 opcache.interned_strings_buffer=16 opcache.max_accelerated_files=3907 opcache.revalidate_freq=30 ;(per IIS .user.ini: opcache.revalidate_freq=0 ) opcache.enable_file_override=1 opcache.log_verbosity_level=2 opcache.file_cache=C:\Windows\Temp\PHP\OpCache opcache.file_update_protection=10 cgi.force_redirect=0 cgi.fix_pathinfo=1 fastcgi.impersonate=1 fastcgi.logging=1 [ExtensionList] extension=php_mysqli.dll extension=php_mbstring.dll extension=php_gd2.dll extension=php_gettext.dll extension=php_intl.dll extension=php_curl.dll extension=php_exif.dll extension=php_xmlrpc.dll extension=php_openssl.dll extension=php_soap.dll extension=php_pdo_mysql.dll extension=php_pdo_sqlite.dll extension=php_imap.dll extension=php_tidy.dll extension=php_xsl.dll extension=php_yaml.dll extension=php_fileinfo.dll extension=php_componere.dll extension=php_win32service.dll zend_extension=php_opcache.dll [XDebug] ; Must be loaded after OpCache ! zend_extension = "C:\Program Files\PHP\v7.2\ext\php_xdebug-2.7.2-7.2-vc15-nts-x86_64.dll" xdebug.coverage_enable=0 [PHP_WINCACHE] extension=php_wincache.dll wincache.reroute_enabled=1 wincache.fcachesize=32 wincache.maxfilesize=512 session.save_handler=wincache ------------------------------------------------------------------------ [2019-06-08 07:32:55] krakjoe@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2019-06-07 19:45:34] aschmidt at anamera dot net Description: ------------ After upgrading from 7.2.18 to 7.2.19: "php-cgi.exe - Application Error : The instruction at 0xa522405a referenced memory at 0xffffffff. The memory could not be read." in event log. This can be circumvented by: a) Disabling OPcache for 7.2.19 b) Reverting 7.2.18 (with OPcache running) Version=1 EventType=APPCRASH EventTime=132044083798735470 ReportType=2 Consent=1 UploadTime=132044083800926965 ReportIdentifier=43296537-8958-11e9-8115-000c29fea50b IntegratorReportIdentifier=43296536-8958-11e9-8115-000c29fea50b NsAppName=php-cgi.exe Response.BucketId=71ba2ba01cc178505d2a5f4840151c51 Response.BucketTable=4 Response.LegacyBucketId=2101596940039167057 Response.type=4 Sig[0].Name=Application Name Sig[0].Value=php-cgi.exe Sig[1].Name=Application Version Sig[1].Value=7.2.19.0 Sig[2].Name=Application Timestamp Sig[2].Value=5cee90f4 Sig[3].Name=Fault Module Name Sig[3].Value=php7.dll Sig[4].Name=Fault Module Version Sig[4].Value=7.2.19.0 Sig[5].Name=Fault Module Timestamp Sig[5].Value=5cee9854 Sig[6].Name=Exception Code Sig[6].Value=c0000005 Sig[7].Name=Exception Offset Sig[7].Value=000000000004405a DynamicSig[1].Name=OS Version DynamicSig[1].Value=6.3.9600.2.0.0.400.8 DynamicSig[2].Name=Locale ID DynamicSig[2].Value=1033 DynamicSig[22].Name=Additional Information 1 DynamicSig[22].Value=9d04 DynamicSig[23].Name=Additional Information 2 DynamicSig[23].Value=9d04afd8fe818683e8ff19df16b47b8a DynamicSig[24].Name=Additional Information 3 DynamicSig[24].Value=300e DynamicSig[25].Name=Additional Information 4 DynamicSig[25].Value=300ed11c1f854278d1457f50e24df3a6 UI[2]=C:\Program Files\PHP\v7.2\php-cgi.exe LoadedModule[0]=C:\Program Files\PHP\v7.2\php-cgi.exe LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll LoadedModule[2]=C:\Windows\system32\KERNEL32.DLL LoadedModule[3]=C:\Windows\system32\KERNELBASE.dll LoadedModule[4]=C:\Program Files\PHP\v7.2\php7.dll LoadedModule[5]=C:\Windows\system32\WS2_32.dll LoadedModule[6]=C:\Windows\system32\ADVAPI32.dll LoadedModule[7]=C:\Windows\SYSTEM32\VCRUNTIME140.dll LoadedModule[8]=C:\Windows\SYSTEM32\api-ms-win-crt-stdio-l1-1-0.dll LoadedModule[9]=C:\Windows\SYSTEM32\api-ms-win-crt-environment-l1-1-0.dll LoadedModule[10]=C:\Windows\SYSTEM32\api-ms-win-crt-heap-l1-1-0.dll LoadedModule[11]=C:\Windows\SYSTEM32\api-ms-win-crt-string-l1-1-0.dll LoadedModule[12]=C:\Windows\SYSTEM32\api-ms-win-crt-runtime-l1-1-0.dll LoadedModule[13]=C:\Windows\SYSTEM32\api-ms-win-crt-convert-l1-1-0.dll LoadedModule[14]=C:\Windows\SYSTEM32\api-ms-win-crt-filesystem-l1-1-0.dll LoadedModule[15]=C:\Windows\SYSTEM32\api-ms-win-crt-math-l1-1-0.dll LoadedModule[16]=C:\Windows\SYSTEM32\api-ms-win-crt-locale-l1-1-0.dll LoadedModule[17]=C:\Windows\system32\ole32.dll LoadedModule[18]=C:\Windows\SYSTEM32\DNSAPI.dll LoadedModule[19]=C:\Windows\SYSTEM32\bcrypt.dll LoadedModule[20]=C:\Windows\SYSTEM32\api-ms-win-crt-time-l1-1-0.dll LoadedModule[21]=C:\Windows\SYSTEM32\api-ms-win-crt-utility-l1-1-0.dll LoadedModule[22]=C:\Windows\system32\NSI.dll LoadedModule[23]=C:\Windows\system32\RPCRT4.dll LoadedModule[24]=C:\Windows\system32\msvcrt.dll LoadedModule[25]=C:\Windows\SYSTEM32\sechost.dll LoadedModule[26]=C:\Windows\SYSTEM32\combase.dll LoadedModule[27]=C:\Windows\system32\GDI32.dll LoadedModule[28]=C:\Windows\system32\USER32.dll LoadedModule[29]=C:\Windows\system32\SspiCli.dll LoadedModule[30]=C:\Windows\SYSTEM32\ucrtbase.DLL LoadedModule[31]=C:\Windows\system32\bcryptprimitives.dll LoadedModule[32]=C:\Program Files\PHP\v7.2\ext\php_opcache.dll LoadedModule[33]=C:\Program Files\PHP\v7.2\ext\php_xdebug-2.7.2-7.2-vc15-nts-x86_64.dll LoadedModule[34]=C:\Program Files\PHP\v7.2\ext\php_mysqli.dll LoadedModule[35]=C:\Program Files\PHP\v7.2\ext\php_mbstring.dll LoadedModule[36]=C:\Program Files\PHP\v7.2\ext\php_gd2.dll LoadedModule[37]=C:\Program Files\PHP\v7.2\ext\php_gettext.dll LoadedModule[38]=C:\Program Files\PHP\v7.2\ext\php_intl.dll LoadedModule[39]=C:\Program Files\PHP\v7.2\icuuc63.dll LoadedModule[40]=C:\Program Files\PHP\v7.2\icuin63.dll LoadedModule[41]=C:\Program Files\PHP\v7.2\icuio63.dll LoadedModule[42]=C:\Windows\SYSTEM32\MSVCP140.dll LoadedModule[43]=C:\Program Files\PHP\v7.2\icudt63.dll LoadedModule[44]=C:\Windows\SYSTEM32\api-ms-win-crt-multibyte-l1-1-0.dll LoadedModule[45]=C:\Program Files\PHP\v7.2\ext\php_curl.dll LoadedModule[46]=C:\Program Files\PHP\v7.2\libcrypto-1_1-x64.dll LoadedModule[47]=C:\Program Files\PHP\v7.2\libssl-1_1-x64.dll LoadedModule[48]=C:\Windows\system32\WLDAP32.dll LoadedModule[49]=C:\Windows\system32\Normaliz.dll LoadedModule[50]=C:\Program Files\PHP\v7.2\libssh2.dll LoadedModule[51]=C:\Program Files\PHP\v7.2\nghttp2.dll LoadedModule[52]=C:\Windows\system32\CRYPT32.dll LoadedModule[53]=C:\Windows\system32\MSASN1.dll LoadedModule[54]=C:\Program Files\PHP\v7.2\ext\php_exif.dll LoadedModule[55]=C:\Program Files\PHP\v7.2\ext\php_xmlrpc.dll LoadedModule[56]=C:\Program Files\PHP\v7.2\ext\php_openssl.dll LoadedModule[57]=C:\Program Files\PHP\v7.2\ext\php_soap.dll LoadedModule[58]=C:\Program Files\PHP\v7.2\ext\php_pdo_mysql.dll LoadedModule[59]=C:\Program Files\PHP\v7.2\ext\php_pdo_sqlite.dll LoadedModule[60]=C:\Program Files\PHP\v7.2\ext\php_imap.dll LoadedModule[61]=C:\Windows\SYSTEM32\WINMM.dll LoadedModule[62]=C:\Windows\SYSTEM32\Secur32.dll LoadedModule[63]=C:\Windows\SYSTEM32\api-ms-win-crt-conio-l1-1-0.dll LoadedModule[64]=C:\Windows\SYSTEM32\WINMMBASE.dll LoadedModule[65]=C:\Windows\SYSTEM32\cfgmgr32.dll LoadedModule[66]=C:\Windows\SYSTEM32\DEVOBJ.dll LoadedModule[67]=C:\Program Files\PHP\v7.2\ext\php_tidy.dll LoadedModule[68]=C:\Program Files\PHP\v7.2\ext\php_xsl.dll LoadedModule[69]=C:\Program Files\PHP\v7.2\ext\php_yaml.dll LoadedModule[70]=C:\Program Files\PHP\v7.2\ext\php_fileinfo.dll LoadedModule[71]=C:\Program Files\PHP\v7.2\ext\php_componere.dll LoadedModule[72]=C:\Program Files\PHP\v7.2\ext\php_win32service.dll LoadedModule[73]=C:\Program Files\PHP\v7.2\ext\php_wincache.dll LoadedModule[74]=C:\Windows\system32\mswsock.dll LoadedModule[75]=C:\Windows\System32\rasadhlp.dll LoadedModule[76]=C:\Windows\SYSTEM32\IPHLPAPI.DLL LoadedModule[77]=C:\Windows\SYSTEM32\WINNSI.DLL LoadedModule[78]=C:\Windows\System32\fwpuclnt.dll State[0].Key=Transport.DoneStage1 State[0].Value=1 FriendlyEventName=Stopped working ConsentKey=APPCRASH AppName=CGI // FastCGI AppPath=C:\Program Files\PHP\v7.2\php-cgi.exe NsPartner=windows NsGroup=windows8 ApplicationIdentity=9C05B8417893E8F29D519DF0DFA49EA3 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78125&edit=1

« previous php.bugs (#221325) next »