php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71682 2016.1 TZDB crashing date() PHP 5.6.18/Win64
Submitted: 2016-02-28 06:51 UTC Modified: 2016-03-03 11:42 UTC
From: anrdaemon at freemail dot ru Assigned: ab (profile)
Status: Closed Package: timezonedb (PECL)
PHP Version: 5.6.18 OS: Win7/64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: anrdaemon at freemail dot ru
New email:
PHP Version: OS:

 

 [2016-02-28 06:51 UTC] anrdaemon at freemail dot ru
Description:
------------
phpinfo()
PHP Version => 5.6.18

System => Windows NT DAEMON2 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
Build Date => Feb  3 2016 17:14:39
Compiler => MSVC11 (Visual C++ 2012)
Architecture => x64

date/time support => enabled
"Olson" Timezone Database Version => 2016.1
Timezone Database => external
Default timezone => Europe/Moscow
date.timezone => Europe/Moscow => Europe/Moscow
timezonedb
Alternative Timezone Database => enabled
Timezone Database Version => 2016.1


Test script:
---------------
<?php

print ini_get('date.timezone');
print date(':c');


Expected result:
----------------
Europe/Moscow:2016-02-28T09:46:07+03:00

Actual result:
--------------
Europe/Moscow<crash>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-29 14:05 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-02-29 14:05 UTC] ab@php.net
Thanks for the report. I'm unable to reproduce crash with the code you've supplied. A backtrace is needed. I suspect there is rather an environment issue.

Thanks.
 [2016-02-29 17:54 UTC] anrdaemon at freemail dot ru
-Status: Feedback +Status: Open
 [2016-02-29 17:54 UTC] anrdaemon at freemail dot ru
I would like to provide one, but all tools I have on hand do not recognize PHP as valid executable.
 [2016-03-02 16:52 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-03-02 16:52 UTC] ab@php.net
The usual way to get a backtrace is described here https://bugs.php.net/bugs-generating-backtrace-win32.php

Thanks.
 [2016-03-02 20:40 UTC] anrdaemon at freemail dot ru
-Status: Feedback +Status: Open
 [2016-03-02 20:40 UTC] anrdaemon at freemail dot ru
The link to debug diag tools needs an update.
https://www.microsoft.com/en-us/download/details.aspx?id=49924

Full analysis of two crashed processes there: http://www.rootdir.org/.offload/CrashHangAnalysis.mht

The stack dump:

Thread 0 - System ID 16148Entry point	  php!mainCRTStartup
Create time	  02.03.2016 23:29:52
Time spent in user mode	  0 Days 00:00:00.000
Time spent in kernel mode	  0 Days 00:00:00.015



This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.
	  Source
ntdll!ZwWaitForMultipleObjects+a	  
KERNELBASE!GetCurrentProcess+40	  
kernel32!WaitForMultipleObjectsEx+b3	  
kernel32!WinExec+3b5	  
kernel32!WinExec+537	  
kernel32!WinExec+58f	  
kernel32!UnhandledExceptionFilter+1fc	  
ntdll!EtwEventSetInformation+20d8	  
ntdll!_C_specific_handler+9c	  
ntdll!RtlDecodePointer+ad	  
ntdll!RtlUnwindEx+bbf	  
ntdll!KiUserExceptionDispatcher+2e	  
php5ts!timelib_parse_tzfile+100 [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\lib\parse_tz.c @ 398 + 7]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\lib\parse_tz.c @ 398 + 7
php5ts!php_date_parse_tzfile+cf [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 926 + b]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 926 + b
php5ts!get_timezone_info+4b [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1001 + 1f]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1001 + 1f
php5ts!php_format_date+3b [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1257]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1257
php5ts!php_date+91 [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1241]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1241
php5ts!zif_date+23 [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1371]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\ext\date\php_date.c @ 1371
php5ts!zend_do_fcall_common_helper_SPEC+549 [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend_vm_execute.h @ 559]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend_vm_execute.h @ 559
php5ts!execute_ex+de [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend_vm_execute.h @ 363 + 3a]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend_vm_execute.h @ 363 + 3a
php5ts!zend_execute+4c7 [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend_vm_execute.h @ 389]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend_vm_execute.h @ 389
php5ts!zend_execute_scripts+19c [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend.c @ 1342]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\zend\zend.c @ 1342
php5ts!php_execute_script+234 [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\main\main.c @ 2607]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\main\main.c @ 2607
php!do_cli+9df [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\sapi\cli\php_cli.c @ 995]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\sapi\cli\php_cli.c @ 995
php!main+65a [c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\sapi\cli\php_cli.c @ 1378 + 15]	  c:\php-sdk\php56\vc11\x64\php-5.6.18-ts\sapi\cli\php_cli.c @ 1378 + 15
php!__tmainCRTStartup+10f [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c @ 536 + 19]	  f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c @ 536 + 19
kernel32!BaseThreadInitThunk+d
ntdll!RtlUserThreadStart+21
 [2016-03-03 09:38 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-03-03 09:38 UTC] ab@php.net
Thanks for the backtrace. I think i've figured out the issue. The internal db format has changed as of 5.6.9, but the binaries are built using a lower PHP version. This information is used only at the compilation time, thus producing a php_timezonedb.dll with an incompatible db format. I've retriggered the build using newer PHP sources, please redownload http://windows.php.net/downloads/pecl/releases/timezonedb/2016.1/php_timezonedb-2016.1-5.6-ts-vc11-x64.zip and check.

Thanks.
 [2016-03-03 10:19 UTC] anrdaemon at freemail dot ru
-Status: Feedback +Status: Closed
 [2016-03-03 10:19 UTC] anrdaemon at freemail dot ru
Seems to be fixed, thanks! Just noticed the extension binary size grew 2.5 times. Is that the case of changed database format?

--- php-cli.out 2016-02-29 21:01:53.948024000 +0300
+++ -   2016-03-03 13:14:50.346512200 +0300
@@ -242,8 +242,8 @@
 date

 date/time support => enabled
-"Olson" Timezone Database Version => 2015.7
-Timezone Database => internal
+"Olson" Timezone Database Version => 2016.1
+Timezone Database => external
 Default timezone => Europe/Moscow

 Directive => Local Value => Master Value
@@ -788,6 +788,11 @@
 tidy.clean_output => no value => no value
 tidy.default_config => no value => no value

+timezonedb
+
+Alternative Timezone Database => enabled
+Timezone Database Version => 2016.1
+
 tokenizer

 Tokenizer Support => enabled

Europe/Moscow:2016-03-03T13:15:56+03:00
 [2016-03-03 10:51 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2016-03-03 10:51 UTC] ab@php.net
Thanks for the quick check. Yes, the new DB format adds some more data.

For the future, this means that I'm going to keep building with the newer sources and the bins won't be compatible with PHP lower than 5.4.41, 5.5.25, 5.6.9.

Thanks.
 [2016-03-03 11:42 UTC] anrdaemon at freemail dot ru
It's okay. As I'm closing my current project, I'm moving to 5.6 and 7.0 entirely.

Please don't forget to add heads'up on the package page.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC