Bug #63172 [Opn]: Script hangs after max_execution_time (tzset)
| From: | yohgaki@php.net | Date: | Wed, 31 Jul 2013 02:52:24 +0000 |
| Subject: | Bug #63172 [Opn]: Script hangs after max_execution_time (tzset) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180601@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63172&edit=1
ID: 63172
Updated by: yohgaki@php.net
Reported by: remi@php.net
Summary: Script hangs after max_execution_time (tzset)
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: GNU/Linux
PHP Version: 5.4.7
Block user comment: N
Private report: N
New Comment:
It seems this is fixed in 5.5, but not in 5.4.
Previous Comments:
------------------------------------------------------------------------
[2012-09-27 14:30:09] remi@php.net
Description:
------------
As tzset functions is not async-signal-safe, nor safe to be longjmp'ed out, If a timeout occurs
during soem glib call, with a lock set, the PHP script will hangs.
tzset should not be called during timeout management.
Attached patch solves this.
Test script:
---------------
<?php
ini_set('max_execution_time', '1');
echo "Playing with env. and tzset";
$tabs = timezone_identifiers_list();
while (true) {
foreach ($tabs as $tab) {
putenv("TZ=$tab");
}
echo ".";
}
Must be run various time to reproduce
Expected result:
----------------
Script output "PHP Fatal error: Maximum execution time of 1 second exceeded in..." and
exit.
Actual result:
--------------
Script hangs after "PHP Fatal error: Maximum execution time of 1 second exceeded in..."
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63172&edit=1