Bug #63172 [Opn->Csd]: Script hangs after max_execution_time (tzset)
Edit report at https://bugs.php.net/bug.php?id=63172&edit=1
ID: 63172
Updated by: nikic@php.net
Reported by: remi@php.net
Summary: Script hangs after max_execution_time (tzset)
-Status: Open
+Status: Closed
Type: Bug
Package: Unknown/Other Function
Operating System: GNU/Linux
PHP Version: 5.4.7
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
If this hasn't been fixed by something else already, this problem should definitely be resolved
in PHP 7.1, as PHP will no longer interrupt internal function calls on timeout.
Previous Comments:
------------------------------------------------------------------------
[2013-07-31 02:52:24] yohgaki@php.net
It seems this is fixed in 5.5, but not in 5.4.
------------------------------------------------------------------------
[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
Thread (3 messages)