Edit report at http://bugs.php.net/bug.php?id=52501&edit=1
ID: 52501 Patch added by: f...@php.net Reported by: marekroman1 at gmail dot com Summary: Misconfigured Sendmail sends PHP-FPM into an infinite loop Status: Feedback Type: Bug Package: FPM related Operating System: DebianLenny2.6.26-2-openvz-amd64 PHP Version: 5.3.3 Assigned To: fat Block user comment: N New Comment: The following patch has been added/updated: Patch Name: fpm-nomorelibevent.v5.patch Revision: 1284709749 URL: http://bugs.php.net/patch-display.php?bug=52501&patch=fpm-nomorelibevent.v5.patch&revision=1284709749 Previous Comments: ------------------------------------------------------------------------ [2010-09-14 17:37:55] f...@php.net Can you please test the following patch ? This patch removes libevent from FPM. A simple select base event mechanism has been made instead. It should prevent the forking problem when using libevent. ------------------------------------------------------------------------ [2010-09-14 17:36:23] f...@php.net The following patch has been added/updated: Patch Name: fpm-nomorelibevent.v2.patch Revision: 1284478582 URL: http://bugs.php.net/patch-display.php?bug=52501&patch=fpm-nomorelibevent.v2.patch&revision=1284478582 ------------------------------------------------------------------------ [2010-07-31 21:46:46] marekroman1 at gmail dot com Oh, thanks fat. ------------------------------------------------------------------------ [2010-07-31 17:25:58] f...@php.net the problem does not exist when using kqueue,poll or select on openbsd (and certainely on freebsd also). the problem exists on linux when using epoll,poll or select. It's all the problem of the libevent when forking. ------------------------------------------------------------------------ [2010-07-31 03:23:51] f...@php.net when calling the mail() function on unix, there is a fork to run the sendmail command. If the sendmail does not return quickly and FPM tries to kill the process because of request_terminate_timeout the bug happens. Here is a sample C code to simulate a bug sendmail config: // sendmail_bug.c #include <stdio.h> int main() { char buf[11]; while (1) { read(0, buf, 10); } return 0; } gcc -o /tmp/sendmail_bug sendmail_bug.c then configure your php.ini this way: sendmail_path = /tmp/sendmail_bug set request_terminate_timeout to a 5s and load a page with the mail function. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52501 -- Edit this bug report at http://bugs.php.net/bug.php?id=52501&edit=1