Bug #79464 [Com]: ZTS builds do not properly respect max_execution_time

From: Date: Sat, 20 Jan 2024 08:52:01 +0000
Subject: Bug #79464 [Com]: ZTS builds do not properly respect max_execution_time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246298@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79464&edit=1 ID: 79464 Comment by: njmcdirectproject at gmail dot com Reported by: maroszek at gmx dot net Summary: ZTS builds do not properly respect max_execution_time Status: Open Type: Bug Package: *General Issues Operating System: Linux, MacOS PHP Version: master-Git-2020-04-10 (Git) Block user comment: N Private report: N New Comment: Thanks... Nice information . www.njmcdirect.com ticket payment online to new jersey court Previous Comments: ------------------------------------------------------------------------ [2020-05-11 14:12:08] maroszek at gmx dot net Unfortunately SIGEV_THREAD_ID seems to be Linux-specific (http://man7.org/linux/man-pages/man2/timer_create.2.html) and we would need to find another solution for Mac OS. Do you think it is worth the effort to fix the problem for Linux only at the moment and leave it open for Mac OS? Thanks for looking into it! ------------------------------------------------------------------------ [2020-05-11 14:01:25] nikic@php.net On Linux the timeout functionality is based on setitimer, which is a per-process mechanism. That seems fundamentally incompatible with ZTS. A possible alternative might be to use timer_create() with SIGEV_THREAD_ID. ------------------------------------------------------------------------ [2020-04-28 10:43:21] maroszek at gmx dot net Hi! Can i provide any more details to reproduce the problem? Do you have any hints on how a fix could look like? I would be willing to try to build a fix/patch if you could point me into the right direction. Thanks in advance! ------------------------------------------------------------------------ [2020-04-10 10:19:38] maroszek at gmx dot net Description: ------------ Tested against today's master. Also affects 7.x Only affects Linux and MacOS. Windows builds work fine. Please see my simple ZTS example: https://gist.github.com/paresy/3cbd4c6a469511ac7479aa0e7c42fea7 Compile: g++ php.cpp -Imain -ITSRM -IZend -I. --std=c++11 -Llibs -lphp -lresolv -ldl -pthread I used a minimal PHP build: ./configure '--disable-fpm' '--disable-cgi' '--disable-cli' '--enable-embed=static' '--enable-maintainer-zts' '--disable-all' Adding '--disable-zend-signals' does not change the result. Might correlate with this issue: https://bugs.php.net/bug.php?id=16820 Test script: --------------- <?php set_time_limit(2); for (;;) ; // Busy wait Expected result: ---------------- Fatal error: Maximum execution time of 2 seconds exceeded in /home/symcon/Downloads/php-src/test.php on line 3 FINISHED Fatal error: Maximum execution time of 2 seconds exceeded in /home/symcon/Downloads/php-src/test.php on line 3 FINISHED Fatal error: Maximum execution time of 2 seconds exceeded in /home/symcon/Downloads/php-src/test.php on line 3 FINISHED Fatal error: Maximum execution time of 2 seconds exceeded in /home/symcon/Downloads/php-src/test.php on line 3 FINISHED Fatal error: Maximum execution time of 2 seconds exceeded in /home/symcon/Downloads/php-src/test.php on line 3 FINISHED Actual result: -------------- Fatal error: Maximum execution time of 2 seconds exceeded in /home/symcon/Downloads/php-src/test.php on line 3 FINISHED (The remaining 4 threads hang indefinitely) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79464&edit=1

« previous php.bugs (#246298) next »