max_execution_time and async signal handling in apache2handler
| From: | Moriyoshi Koizumi | Date: | Sun, 15 Mar 2009 21:14:21 +0000 |
| Subject: | max_execution_time and async signal handling in apache2handler | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-43354@lists.php.net to get a copy of this message | ||
Hi,
I got a bug report on the Japanese PHP user's list that states free()
aborts within the timer signal handler due to reentrance to the
function when max_execution_time takes effect and the signal occurs
within the same libc function. The reporter also states he uses
apache2handler, which doesn't provide block_interruptions nor
unblock_interruptions SAPI handlers in contrast to the apache1
handler.
Whilst I doubt this happens quite frequently because PHP has its own
memory pool and it's far more rare that the libc's allocators get
called than the emalloc() and efree(), this should be addressed
somehow. A proposed fix is attached but note this greatly compromises
overall performance due to excessive system calls.
Regards,
Moriyoshi
Attachment: [text/x-patch] php-apache2-sigblock-20090316.patch.diff
Attachment: [text/x-patch] php-apache2-sigblock-20090316.patch.diff