Bug #74833 [NEW]: Random crashes, seemingly related to DateTimeImmutable and mod_php
| From: | mike dot fellows at shaw dot ca | Date: | Thu, 29 Jun 2017 22:12:19 +0000 |
| Subject: | Bug #74833 [NEW]: Random crashes, seemingly related to DateTimeImmutable and mod_php | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-209736@lists.php.net to get a copy of this message | ||
From: mike dot fellows at shaw dot ca
Operating system: Windows 7 64 bit
PHP version: 7.1.6
Package: Apache2 related
Bug Type: Bug
Bug description:Random crashes, seemingly related to DateTimeImmutable and mod_php
Description:
------------
The CakePHP project includes a class called Chronos that extends
DateTimeImmutable. It seems to cause occasional random crashes when run
through Apache and mod_php. In all cases described below the same PHP
software would run flawlessly most of the time, with occasional random
crashes (no changes to the PHP software between everything being OK and
crashing).
The crashes have inconsistent symptoms and I have not been able to
capture a backtrace. They are possibly caused by instantiation of the
Chronos class, although this is hard to prove. Symptoms include:
- Complaints about the Chronos class containing abstract methods (when
it doesn't). Once this symptom appears it would continue in this state
on page reload. Eventually Apache usually crashes given enough page
reloads, sometimes witht the zend_mm_heap corrupted mentioned below,
somtimes not.
- Sometimes a "zend_mm_heap corrupted" message is placed in the log file
followed by a crash and Apache being restared.
- Sometimes Apache crashes with no log messages.
In all cases restarted Apache would "fix" the problem page for awhile.
I've run the same software using PHP's built in web server and not
observed any crashes.
I connected Visual Studio 2015's debugger to the Apache process handling
the request - but the symptoms stopped once the debugger was connected.
Any suggestions for capturing backtraces would be welcome BTW. I'm
currently running Apache from Apache Lounge and PHP from php.net.
There is copious amounts of information about this bug found here:
https://github.com/cakephp/chronos/issues/147
It seems to have been reported with PHP version 7.0 and up. My
experience has been on Windows 7, but others have reported similar
symptoms with Linux intalls (again with mod_php).
Test script:
---------------
Code can be inspected here for the Class:
https://github.com/cakephp/chronos/blob/master/src/Chronos.php
and here for its interface:
https://github.com/cakephp/chronos/blob/master/src/ChronosInterface.php
--
Edit bug report at https://bugs.php.net/bug.php?id=74833&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74833&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74833&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74833&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74833&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74833&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74833&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74833&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74833&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74833&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74833&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74833&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74833&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74833&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74833&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74833&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74833&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74833&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74833&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74833&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74833&r=mysqlcfg