Bug #74093 [NEW]: Maximum execution time of n+2 seconds exceed not written in error_log

From: Date: Mon, 13 Feb 2017 14:48:13 +0000
Subject: Bug #74093 [NEW]: Maximum execution time of n+2 seconds exceed not written in error_log
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207370@lists.php.net to get a copy of this message
From:             rainer-phpbugs at 7val dot com
Operating system: Linux
PHP version:      7.1.1
Package:          FPM related
Bug Type:         Bug
Bug description:Maximum execution time of n+2 seconds exceed not written in error_log

Description:
------------
If a Library call does not return within 2s after the max_execution_time
has been exceeded, zend_timeout_handler() in Zend/zend_execute_API.c
approx. Line 1201 emits the error message to STDERR instead of writing
it into the error_log and then kills the child. As a result, the
following message, without any further explanation, is logged in
error_log:

child 23444 exited with code 1 after 360.705768 seconds from start

If catch_workers_output is enabled, the "Maximum execution [...]
exceeded" message is logged in error_log, prefixed with "said into
stderr".

This is a regression from PHP 7.0. (tested with 7.0.15, which logs a
message in error_log, while 7.1.1 does not with the default
configuration).

Test script:
---------------
<?php
/* generate an image with lots of colors using imagemagick:
convert -size 4096x4096 -define gradient:direction=east
gradient:red-green PNG48:hor_gradient.png
convert hor_gradient.png -rotate 90 gradient_h.png
convert -size 4096x4096 gradient: PNG48:linear_gradient.png
composite linear_gradient.png -compose Multiply gradient_h.png grad.png

or download from http://can avan.de/lots_of_colors.png
*/

$i = new imagick();
$i->readimage('grad.png');
print($i->getImageColors()."\n");


Expected result:
----------------
"Fatal error: Maximum execution time of 30+2 seconds" should be logged
in the configured error_log, just like the "Fatal error: Maximum
execution time of 30 seconds" message. 

This should be independent of the catch_workers_output setting.

Actual result:
--------------
Only "child 1903 exited with code 1 after 68.983009 seconds from start"
is logged.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=74093&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74093&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74093&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74093&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74093&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74093&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74093&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74093&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74093&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74093&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74093&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74093&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74093&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74093&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74093&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74093&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74093&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74093&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74093&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74093&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74093&r=mysqlcfg



Thread (7 messages)

« previous php.bugs (#207370) next »