Bug #74833 [Opn]: Random crashes, seemingly related to DateTimeImmutable and mod_php
| From: | nikic@php.net | Date: | Sat, 01 Jul 2017 08:54:26 +0000 |
| Subject: | Bug #74833 [Opn]: Random crashes, seemingly related to DateTimeImmutable and mod_php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209756@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74833&edit=1
ID: 74833
Updated by: nikic@php.net
Reported by: mike dot fellows at shaw dot ca
Summary: Random crashes, seemingly related to
DateTimeImmutable and mod_php
Status: Open
Type: Bug
Package: Apache2 related
Operating System: Windows 7 64 bit, MacOs, Linux
PHP Version: 7.0.1 to 7.1.6
-Assigned To:
+Assigned To: ab
Block user comment: N
Private report: N
New Comment:
Opcache is not loaded by default, so if you did not explicitly enable the extension, you're not
using opcache (though you can double check using e.g. phpinfo()).
@ab: Can you please check whether this looks like a persistent string issue to you that will be
resolved by 7.2?
Previous Comments:
------------------------------------------------------------------------
[2017-07-01 00:56:57] mike dot fellows at shaw dot ca
Thanks for taking time to look and comment on this problem.
The PHP_ZTS constant is set to 1 (so yes to ZTS build?). It is the thread safe windows build from
php.net.
I am not setting any opcache configuration items in PHP.ini, so if I understand the docs correctly
that means I am getting opcache.enable = 1 by default? Please correct me if I'm wrong on this.
So yes to ZTS and yes to opcache enabled (I think).
My database driver (SQL server) does not support PHP 7.2 yet so I'm not sure if I can test 7.2
or not. I will try.
Will disabling opcache with 7.1 fix the problem as well?
------------------------------------------------------------------------
[2017-06-30 23:34:20] nikic@php.net
Are you using opcache? Are you using ZTS builds?
If the answers are no and yes, this sounds like it might be a persistent string corruption issue, in
which case you should check whether using a PHP 7.2 alpha resolves the issue.
------------------------------------------------------------------------
[2017-06-30 23:09:32] mike dot fellows at shaw dot ca
FWIW here is the Visual Studio:
The thread 0x346c has exited with code 0 (0x0).
The thread 0x359c has exited with code 0 (0x0).
The thread 0x804 has exited with code 0 (0x0).
'httpd.exe' (Win32): Unloaded 'C:\Windows\System32\security.dll'
Unhandled exception at 0x0000000077346789 (ntdll.dll) in httpd.exe: 0xC0000005: Access violation
reading location 0x00000AEE2AF79F18.
The thread 0x37e0 has exited with code 0 (0x0).
'httpd.exe' (Win32): Unloaded 'C:\Windows\System32\1033\msodbcsqlr13.rll'
Exception thrown at 0x0000000077346789 (ntdll.dll) in httpd.exe: 0xC0000005: Access violation
reading location 0x00000AEE2AF79F18.
Unhandled exception at 0x0000000077346789 (ntdll.dll) in httpd.exe: 0xC0000005: Access violation
reading location 0x00000AEE2AF79F18.
Exception thrown at 0x0000000077346789 (ntdll.dll) in httpd.exe: 0xC0000005: Access violation
reading location 0x00000AEE2AF79F18.
Unhandled exception at 0x0000000077346789 (ntdll.dll) in httpd.exe: 0xC0000005: Access violation
reading location 0x00000AEE2AF79F18.
Exception thrown at 0x0000000077346789 (ntdll.dll) in httpd.exe: 0xC0000005: Access violation
reading location 0x00000AEE2AF79F18.
... (repeating many times)
------------------------------------------------------------------------
[2017-06-30 22:58:27] mike dot fellows at shaw dot ca
I have managed to gather a Call Stack when Apache crashes. Here are the messages from the Apache
error log immediately before the crash:
[Fri Jun 30 15:44:18.309323 2017] [php7:error] [pid 3444:tid 2756] [client ::1:10998] PHP Fatal
error: Class Cake\\Chronos\\MutableDateTime contains 1 abstract method and must therefore be
declared abstract or implement the remaining methods (Cake\\Chronos\\ChronosInterface::__wakeup) in
C:\\genesis\\vendor\\cakephp\\chronos\\src\\MutableDateTime.php on line 51, referer: <snip>
[Fri Jun 30 15:44:18.310323 2017] [php7:error] [pid 3444:tid 2764] [client ::1:10995] PHP Fatal
error: Class Cake\\Chronos\\MutableDateTime contains 1 abstract method and must therefore be
declared abstract or implement the remaining methods (Cake\\Chronos\\ChronosInterface::__wakeup) in
C:\\genesis\\vendor\\cakephp\\chronos\\src\\MutableDateTime.php on line 51, referer: <snip>
[Fri Jun 30 15:44:18.328325 2017] [php7:error] [pid 3444:tid 2772] [client ::1:10997] PHP Fatal
error: Class Cake\\Chronos\\MutableDate contains 2 abstract methods and must therefore be declared
abstract or implement the remaining methods (Cake\\Chronos\\ChronosInterface::getTimezone,
Cake\\Chronos\\ChronosInterface::__wakeup) in
C:\\genesis\\vendor\\cakephp\\chronos\\src\\MutableDate.php on line 50, referer: <snip>
Here is the Call Stack from Visual Studio:
ntdll.dll!RtlSizeHeap() Unknown
AcXtrnal.dll!NS_FaultTolerantHeap::APIHook_RtlFreeHeap(void *,unsigned long,void *) Unknown
ucrtbase.dll!free() Unknown
php7ts.dll!zend_hash_reverse_apply(_zend_array * ht, int(*)(_zval_struct *) apply_func) Line 1603 C
php7ts.dll!shutdown_executor() Line 376 C
php7ts.dll!zend_deactivate() Line 1001 C
php7ts.dll!php_request_shutdown(void * dummy) Line 1880 C
php7apache2_4.dll!php_handler(request_rec * r) Line 725 C
libhttpd.dll!000000007475e9e5() Unknown
libhttpd.dll!000000007475d7e0() Unknown
libhttpd.dll!000000007475a1e6() Unknown
mod_rewrite.so!00000000743753c8() Unknown
libhttpd.dll!000000007475e9e5() Unknown
libhttpd.dll!000000007475d7e0() Unknown
libhttpd.dll!000000007475a49a() Unknown
libhttpd.dll!000000007475a527() Unknown
libhttpd.dll!0000000074753b73() Unknown
libhttpd.dll!0000000074761885() Unknown
libhttpd.dll!0000000074761675() Unknown
libhttpd.dll!0000000074771734() Unknown
[External Code]
------------------------------------------------------------------------
[2017-06-30 18:32:46] mike dot fellows at shaw dot ca
Re-examining the Chronos issue linked and just improved the description of the PHP versions and OSes
impacted.
Please note that despite the Chronos issue being opened a couple of days ago, the original CakePHP
issue was opened almost a year ago. This has been a problem for some time.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74833
--
Edit this bug report at https://bugs.php.net/bug.php?id=74833&edit=1