Bug #74833 [Opn]: Random crashes, seemingly related to DateTimeImmutable and mod_php

From: Date: Fri, 30 Jun 2017 18:32:49 +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-209745@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 User updated by: mike dot fellows at shaw dot ca 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 +Operating System: Windows 7 64 bit, MacOs, Linux -PHP Version: 7.1.6 +PHP Version: 7.0.1 to 7.1.6 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2017-06-29 22:25:57] mike dot fellows at shaw dot ca I just re-reviewed the linked Chronos issue and realized that one user has seen this with Apache and suphp. So the problem is not exclusive to mod_php. ------------------------------------------------------------------------ [2017-06-29 22:12:15] mike dot fellows at shaw dot ca 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 this bug report at https://bugs.php.net/bug.php?id=74833&edit=1

« previous php.bugs (#209745) next »