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

From: Date: Sat, 01 Jul 2017 18:06:36 +0000
Subject: Bug #74833 [Com]: Random crashes, seemingly related to DateTimeImmutable and mod_php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209764@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 Comment 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: Feedback Type: Bug Package: Apache2 related Operating System: Windows 7 64 bit, MacOs, Linux PHP Version: 7.0.1 to 7.1.6 Assigned To: ab Block user comment: N Private report: N New Comment: @nikic definitely not using opcache then as nothing was showing in php_info, and I have not enabled it. I can capture more backtraces if you change your minds, it is not a big deal to do. Are they any recommendations for avoiding this problem in 7.1? Or is the only option to use 7.2? For 7.2 The only extension I would need beyond the standard PHP ones is the Microsoft SQL Server driver for PHP: https://github.com/Microsoft/msphpsql No 7.2 support yet (https://github.com/Microsoft/msphpsql/issues/444). I can't imagine that much has changed between 7.1 to 7.2 though. I'll see about building it next week for 7.2 and see what happens. I'm not really in a jam with this yet, but I will need to have some kind of workaround ready in about 8-10 weeks - I think a 7.2 PHP beta would be fine. Right now this problem is just a (very minor) development headache. Thx again for your help with this. Previous Comments: ------------------------------------------------------------------------ [2017-07-01 16:47:58] ab@php.net Ah, i see i've overseen the backtraces already there. Yeah, the part like this 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 looks very much like the issue already fixed in 7.2. No further backtrace needed. Thanks. ------------------------------------------------------------------------ [2017-07-01 16:44:10] ab@php.net @nikic, looks pretty much like the topic. TS SAPI, sporadic fails, very much like in many other bugs. @mike dot fellows at shaw dot ca which exact extension do you need to be present to test your code under 7.2? If it builds with 7.2, i can provide it so you can have the exact constellation. It'd be great also if you could provide a backtrace, even a minidump from WER, etc. Thanks. ------------------------------------------------------------------------ [2017-07-01 08:54:24] nikic@php.net 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? ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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

« previous php.bugs (#209764) next »