Bug #69233 [Fbk->NoF]: PHP-CGI.EXE and OPCache crash with error code 0xc0000005

From: Date: Sun, 22 Mar 2015 04:22:19 +0000
Subject: Bug #69233 [Fbk->NoF]: PHP-CGI.EXE and OPCache crash with error code 0xc0000005
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191520@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69233&edit=1

 ID:               69233
 Updated by:       php-bugs@lists.php.net
 Reported by:      julientld at free dot fr
 Summary:          PHP-CGI.EXE and OPCache crash with error code
                   0xc0000005
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          opcache
 Operating System: Windows Server 2012
 PHP Version:      5.6.7RC1
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2015-03-13 07:55:58] julientld at free dot fr

Hello,

Thank you for your fast answer.

Ufortunately, I can't provide you a script as I don't have any error in the php log file
when this issue occurs.

When the server reboots and when the php-cgi.exe processes are "killed", there are
potentially hundreds of php scripts which could be in progress. I can't believe, each month for
a year and a half this is exactly the same script which is running when the server reboots.

I don't think this error is related to a script or a function in particular but this is rather
a problem for managing brutal shutdowns of the processes.

The backtrace is not sufficient to investigate this problem ?

Thanks.

Julien

------------------------------------------------------------------------
[2015-03-13 06:58:41] laruence@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.



------------------------------------------------------------------------
[2015-03-12 20:59:33] julientld at free dot fr

Description:
------------
Hello,

Server:
Windows Server 2012
IIS 8.0
PHP x86 NTS VC11 5.6.7-snap r4d8db15
MySQL 5.6.21
WinCache 1.3.7.x

Since I have migrated my server to PHP 5.5 in 09/2013 then to 5.6 in 10/2014, I observe a crash of
the php-cgi.exe process related to the php_opcache.dll extension. The Windows Event Viewer displays
an error code 0xc0000005.

In fact, this error only occurs one time each month for a year and a half. When updates are
installed from Windows Update after the Patch Tuesday, the server is rebooted automatically and it
is at this moment that the error concerning OPCache occurs. I think there is a problem during the
shutdown of active processes. Visibly, I do not have other OPCache errors the rest of the time.

I have catched a few full dump files for this crash and ericsten has exported for me (thanks to him)
the two below backtraces.

Perhaps this bug is linked to #69067 ?

Hope this will help you to make a fix.

Bye

Julien



* Windows Event Viewer


Nom du journal :Application
Source :       Application Error
Date :         12/03/2015 03:24:30
ID de l’événement :1000
Catégorie de la tâche :(100)
Niveau :       Erreur
Mots clés :    Classique
Utilisateur :  N/A
Ordinateur :   SRV1
Description :
Nom de l’application défaillante php-cgi.exe, version : 5.6.7.0, horodatage : 0x54da8130
Nom du module défaillant : php_opcache.dll, version : 5.6.7.0, horodatage : 0x54da8167
Code d’exception : 0xc0000005
Décalage d’erreur : 0x00004fd4
ID du processus défaillant : 0xa94
Heure de début de l’application défaillante : 0x01d05c6b9ec857da
Chemin d’accès de l’application défaillante : C:\php\php-cgi.exe
Chemin d’accès du module défaillant: C:\php\ext\php_opcache.dll
ID de rapport : e90ef187-c85e-11e4-9411-90b11c2fa6ed
Nom complet du package défaillant : 
ID de l’application relative au package défaillant :



* PHP backtraces


[php-cgi.exe.2876.dmp, php-cgi.exe.2708.dmp, php-cgi.exe.2776.dmp, php-cgi.exe.2900.dmp]
0:000> .ecxr
eax=018dca40 ebx=00000001 ecx=74bd6580 edx=00000064 esi=00ff8e20 edi=743df07c
eip=743c4fd4 esp=017ff2d4 ebp=74bd5000 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
php_opcache!accel_startup+0x1d4:
743c4fd4 8b4064          mov     eax,dword ptr [eax+64h] ds:002b:018dcaa4=????????
0:000> k
  *** Stack trace for last set context - .thread/.cxr resets it
 # ChildEBP RetAddr  
00 017ff2e8 7469142f php_opcache!accel_startup+0x1d4
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\ext\opcache\zendaccelerator.c @ 2594]
01 017ff2f4 746aac0a php5!zend_extension_startup+0xf
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\zend\zend_extensions.c @ 154]
02 017ff30c 7469110f php5!zend_llist_apply_with_del+0x1a
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\zend\zend_llist.c @ 178]
03 017ff3b0 77781b89 php5!zend_startup_extensions+0xf
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\zend\zend_extensions.c @ 175]
04 017ff434 77781b47 ntdll!RtlpHeapFindListLookupEntry+0x2a
[d:\win8_gdr\minkernel\ntos\rtl\heapidx.c @ 608]
05 017ff45c 00eedb18 ntdll!RtlpFindEntry+0x49 [d:\win8_gdr\minkernel\ntos\rtl\heapidx.c @ 82]
WARNING: Frame IP not in any known module. Following frames may be wrong.
06 017ff490 7778575f 0xeedb18

0:000> .frame 0
00 017ff2e8 7469142f php_opcache!accel_startup+0x1d4
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\ext\opcache\zendaccelerator.c @ 2594]
0:000> dv
      extension = 0x00f2ca40
           func = 0x00f81510
      ini_entry = 0x74694837
0:000> dt extension
Local var @ 0x17ff2f0 Type _zend_extension*
0x00f2ca40 
   +0x000 name             : 0x743db428  "Zend OPcache"
   +0x004 version          : 0x743db3b4  "7.0.4-dev"
   +0x008 author           : 0x743db3c0  "Zend Technologies"
   +0x00c URL              : 0x743db3d4  "http://www.zend.com/"
   +0x010 copyright        : 0x743db3ec  "Copyright (c) 1999-2015"
   +0x014 startup          : 0x743c4e00     int  php_opcache!accel_startup+0
   +0x018 shutdown         : (null) 
   +0x01c activate         : 0x743c4260     void  php_opcache!accel_activate+0
   +0x020 deactivate       : 0x743c4990     void  php_opcache!accel_deactivate+0
   +0x024 message_handler  : (null) 
   +0x028 op_array_handler : (null) 
   +0x02c statement_handler : (null) 
   +0x030 fcall_begin_handler : (null) 
   +0x034 fcall_end_handler : (null) 
   +0x038 op_array_ctor    : (null) 
   +0x03c op_array_dtor    : (null) 
   +0x040 api_no_check     : (null) 
   +0x044 build_id_check   : (null) 
   +0x048 reserved3        : (null) 
   +0x04c reserved4        : (null) 
   +0x050 reserved5        : (null) 
   +0x054 reserved6        : (null) 
   +0x058 reserved7        : (null) 
   +0x05c reserved8        : (null) 
   +0x060 handle           : 0x743c0000 HINSTANCE__
   +0x064 resource_number  : 0n-1
0:000> dt func
Local var @ 0x17ff2e4 Type _zend_function*
0x00f81510 
   +0x000 type             : 0x16 ''
   +0x000 common           : <unnamed-tag>
   +0x000 op_array         : _zend_op_array
   +0x000 internal_function : _zend_internal_function
0:000> dt ini_entry
Local var @ 0x17ff2e8 Type _zend_ini_entry*
0x74694837 
   +0x000 module_number    : 0n-2096079221
   +0x004 modifiable       : 0n1149830340
   +0x008 name             : 0x01a81424  ""
   +0x00c name_length      : 0xb3840f
   +0x010 on_modify        : 0x0d8b0000     int  +d8b0000
   +0x014 mh_arg1          : 0x74bd680c Void
   +0x018 mh_arg2          : 0x0274c985 Void
   +0x01c mh_arg3          : 0x4e8bd1ff Void
   +0x020 value            : 0x18468b1c  "--- memory read error at address 0x18468b1c ---"
   +0x024 value_length     : 0x574c985
   +0x028 orig_value       : 0xeb184189  "--- memory read error at address 0xeb184189 ---"
   +0x02c orig_value_length : 0x4578b0b
   +0x030 orig_modifiable  : 0n1334515235
   +0x034 modified         : 0n-1861973732
   +0x038 displayer        : 0x85184e8b     void  +ffffffff85184e8b

[php-cgi.exe.2684.dmp, php-cgi.exe.2860.dmp]
0:000> .ecxr
eax=0222d10f ebx=743db4c0 ecx=0222d113 edx=018dca40 esi=0002b5a5 edi=0222d0eb
eip=743c240e esp=00d8f63c ebp=00000001 iopl=0         nv up ei pl nz ac po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010212
php_opcache!accel_new_interned_string+0x20e:
743c240e 894a68          mov     dword ptr [edx+68h],ecx ds:002b:018dcaa8=0222d0eb
0:000> kn
  *** Stack trace for last set context - .thread/.cxr resets it
 # ChildEBP RetAddr  
00 00d8f658 743c2ac0 php_opcache!accel_new_interned_string+0x20e
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\ext\opcache\zendaccelerator.c @ 354]
01 00d8f670 743c5016 php_opcache!accel_use_shm_interned_strings+0x10
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\ext\opcache\zendaccelerator.c @ 397]
02 00d8f68c 7469142f php_opcache!accel_startup+0x216
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\ext\opcache\zendaccelerator.c @ 2604]
03 00d8f698 746aac0a php5!zend_extension_startup+0xf
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\zend\zend_extensions.c @ 154]
04 00d8f6b0 7469110f php5!zend_llist_apply_with_del+0x1a
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\zend\zend_llist.c @ 178]
05 00d8f754 77781b89 php5!zend_startup_extensions+0xf
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\zend\zend_extensions.c @ 175]
06 00d8f7d8 77781b47 ntdll!RtlpHeapFindListLookupEntry+0x2a
[d:\win8_gdr\minkernel\ntos\rtl\heapidx.c @ 608]
07 00d8f800 0144db18 ntdll!RtlpFindEntry+0x49 [d:\win8_gdr\minkernel\ntos\rtl\heapidx.c @ 82]
WARNING: Frame IP not in any known module. Following frames may be wrong.
08 00d8f834 7778575f 0x144db18
0:000> dv
          arKey = <Memory access error>
     nKeyLength = <Memory access error>
       free_src = <Memory access error>
0:000> .frame 1
01 00d8f670 743c5016 php_opcache!accel_use_shm_interned_strings+0x10
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\ext\opcache\zendaccelerator.c @ 397]
0:000> dv
0:000> .frame 2
02 00d8f68c 7469142f php_opcache!accel_startup+0x216
[c:\php-sdk\snap_5_6\vc11\x86\nts-windows-vc11-x86\ext\opcache\zendaccelerator.c @ 2604]
0:000> dv
      Unable to load c:\debuggersx86\Visualizers\Windows.Devices.Geolocation.natvis. Skipping...
extension = 0x0148ca40
           func = 0x014e16d0
      ini_entry = 0x74694837
0:000> dt extension
Local var @ 0xd8f694 Type _zend_extension*
0x0148ca40 
   +0x000 name             : 0x743db428  "Zend OPcache"
   +0x004 version          : 0x743db3b4  "7.0.4-dev"
   +0x008 author           : 0x743db3c0  "Zend Technologies"
   +0x00c URL              : 0x743db3d4  "http://www.zend.com/"
   +0x010 copyright        : 0x743db3ec  "Copyright (c) 1999-2015"
   +0x014 startup          : 0x743c4e00     int  php_opcache!accel_startup+0
   +0x018 shutdown         : (null) 
   +0x01c activate         : 0x743c4260     void  php_opcache!accel_activate+0
   +0x020 deactivate       : 0x743c4990     void  php_opcache!accel_deactivate+0
   +0x024 message_handler  : (null) 
   +0x028 op_array_handler : (null) 
   +0x02c statement_handler : (null) 
   +0x030 fcall_begin_handler : (null) 
   +0x034 fcall_end_handler : (null) 
   +0x038 op_array_ctor    : (null) 
   +0x03c op_array_dtor    : (null) 
   +0x040 api_no_check     : (null) 
   +0x044 build_id_check   : (null) 
   +0x048 reserved3        : (null) 
   +0x04c reserved4        : (null) 
   +0x050 reserved5        : (null) 
   +0x054 reserved6        : (null) 
   +0x058 reserved7        : (null) 
   +0x05c reserved8        : (null) 
   +0x060 handle           : 0x743c0000 HINSTANCE__
   +0x064 resource_number  : 0n-1



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69233&edit=1


Thread (19 messages)

« previous php.bugs (#191520) next »