Bug #60629 [Asn->Fbk]: memory corruption when web server closed the fcgi fd(?)
Edit report at https://bugs.php.net/bug.php?id=60629&edit=1 ID: 60629 Updated by: f...@php.net Reported by:phpbugs at oops dot mooo dot com Summary:memory corruption when web server closed the fcgi fd(?) -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Debian Squeeze PHP Version:5.3.9RC4 Assigned To: fat Block user comment: N Private report: N New Comment: Can you please test and validate the attached patch please ? thx ++ jerome Previous Comments: [2012-01-03 18:02:55] f...@php.net The following patch has been added/updated: Patch Name: fpm-bugs-60629.patch Revision: 1325613774 URL: https://bugs.php.net/patch-display.php?bug=60629&patch=fpm-bugs-60629.patch&revision=1325613774 [2012-01-03 12:13:34] f...@php.net it's on my todo list. I'll try to take time to look at this bugs this week. ++ jerome [2012-01-03 12:12:09] larue...@php.net fat, could you plz look at this? thanks [2011-12-30 23:40:43] phpbugs at oops dot mooo dot com I think it might've been introduced in this commit (~line 270). http://svn.php.net/viewvc/php/php-src/tags/php_5_3_9RC4/sapi/fpm/fpm/fpm_main.c?r1=317894&r2=317897 It looks like write() might have the same problem, since it returns a ssize_t that's casted to size_t. Fix might be to use ssize_t instead? [2011-12-30 23:12:00] phpbugs at oops dot mooo dot com Description: I tried php5.3.9RC4 today and got a few core dumps. I think b)fcgi_flush() returns false, making fcgi_write return -1. Then sapi_cgibin_single_write will make it positive because ret is unsigned in c). As a result, the comparison in d) will fail. In debugger it looks like PHP is looping over open_packet() in an infinite loop. Each time out_pos gets increased a little. Finally, after overwriting the whole stack, it will SIGSEGV. === https://svn.php.net/repository/php/php-src/tags/php_5_3_9RC4/sapi/fpm/fpm/fastcgi.c === int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len) { int limit, rest; if (len <= 0) { return 0; } if (req->out_hdr && req->out_hdr->type != type) { close_packet(req); } /* Optimized version */ limit = sizeof(req->out_buf) - (req->out_pos - req->out_buf); if (!req->out_hdr) { limit -= sizeof(fcgi_header); if (limit < 0) limit = 0; } if (len < limit) { if (!req->out_hdr) { open_packet(req, type); } memcpy(req->out_pos, str, len); req->out_pos += len; } else if (len - limit < sizeof(req->out_buf) - sizeof(fcgi_header)) { if (!req->out_hdr) { a) open_packet(req, type); } if (limit > 0) { memcpy(req->out_pos, str, limit); req->out_pos += limit; } if (!fcgi_flush(req, 0)) { b) return -1; } === https://svn.php.net/repository/php/php-src/tags/php_5_3_9RC4/sapi/fpm/fpm/fpm_main.c === static inline size_t sapi_cgibin_single_write(const char *str, uint str_length TSRMLS_DC) { c) size_t ret; /* sapi has started which means everyhting must be send through fcgi */ if (fpm_is_running) { fcgi_request *request = (fcgi_request*) SG(server_context); ret = fcgi_write(request, FCGI_STDOUT, str, str_length); d) if (ret <= 0) { return 0; } return ret; } -- Edit this bug report at https://bugs.php.net/bug.php?id=60629&edit=1
Bug #60629 [Fbk->Csd]: memory corruption when web server closed the fcgi fd(?)
Edit report at https://bugs.php.net/bug.php?id=60629&edit=1 ID: 60629 Updated by: f...@php.net Reported by:phpbugs at oops dot mooo dot com Summary:memory corruption when web server closed the fcgi fd(?) -Status: Feedback +Status: Closed Type: Bug Package:FPM related Operating System: Debian Squeeze PHP Version:5.3.9RC4 Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-01-03 22:25:44] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=321734 Log: - Fixed bug #60629 (memory corruption when web server closed the fcgi fd) [2012-01-03 19:44:15] phpbugs at oops dot mooo dot com Looks good to me, I don't understand a) Why was fcgi_write's return value changed to ssize_t b) Why the explicit (size_t) casts was added but I can't see any problem with them either :) (I only did this part.) - size_t ret; + ssize_t ret [2012-01-03 18:03:28] f...@php.net Can you please test and validate the attached patch please ? thx ++ jerome [2012-01-03 18:02:55] f...@php.net The following patch has been added/updated: Patch Name: fpm-bugs-60629.patch Revision: 1325613774 URL: https://bugs.php.net/patch-display.php?bug=60629&patch=fpm-bugs-60629.patch&revision=1325613774 [2012-01-03 12:13:34] f...@php.net it's on my todo list. I'll try to take time to look at this bugs this week. ++ jerome 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 https://bugs.php.net/bug.php?id=60629 -- Edit this bug report at https://bugs.php.net/bug.php?id=60629&edit=1
Bug #60659 [Opn->Csd]: FPM does not clear auth_user on request accept
Edit report at https://bugs.php.net/bug.php?id=60659&edit=1 ID: 60659 Updated by: f...@php.net Reported by:bonbons at linux-vserver dot org Summary:FPM does not clear auth_user on request accept -Status: Open +Status: Closed Type: Bug Package:FPM related Operating System: Linux PHP Version:5.3.8 -Assigned To: +Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Thanks you very much for this fix. Previous Comments: [2012-01-04 21:19:28] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=321771 Log: - Fixed credits for bug #60659 [2012-01-04 21:17:59] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=321770 Log: - Fixed bug #60659 (FPM does not clear auth_user on request accept) [2012-01-04 20:14:12] bonbons at linux-vserver dot org Description: Multiple requests hitting the same FPM worker process will get logged (by php-fpm) with the last authenticated user seen instead of empty when there is no authenticated user for the current request. Attached patch clears auth_user field (and also clears query_string), those two being the only char arrays not seeing initialization in fpm_request_accepting(). Test script: --- # configure php-fpm to use only one worker and log access restart php-fpm curl -u user $php_fpm_page_via_nginx curl $php_fpm_page_via_nginx curl $php_fpm_page_via_nginx # All logged access lines will show remote user to be "user" -- Edit this bug report at https://bugs.php.net/bug.php?id=60659&edit=1
Bug #60670 [Opn->Fbk]: When under load, PHP-FPM master process silently crashes
Edit report at https://bugs.php.net/bug.php?id=60670&edit=1 ID: 60670 Updated by: f...@php.net Reported by:gwenmael dot rouxel at neovote dot com Summary:When under load, PHP-FPM master process silently crashes -Status: Open +Status: Feedback Type: Bug Package:FPM related Operating System: Debian Lenny PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: [2012-01-06 13:35:41] gwenmael dot rouxel at neovote dot com Description: I ran some load tests on a virtual machine which has 16GB ram and four 8Ghz VCores. The tests were run using JMeter. When ~300 simultaneous connections (10 request loop per connection) to FPM exist (through NGinx), The master process crashes and I get 502 errors. The remaining child processes continue executing their scripts then terminate. I use a static pool configuration, and no matter what the child processes number is, it crashes. -- Edit this bug report at https://bugs.php.net/bug.php?id=60670&edit=1
Bug #51983 [Asn->Ana]: [fpm sapi] pm.status_path not working when cgi.fix_pathinfo=1
Edit report at https://bugs.php.net/bug.php?id=51983&edit=1 ID: 51983 Updated by: f...@php.net Reported by:konstantin at symbi dot org Summary:[fpm sapi] pm.status_path not working when cgi.fix_pathinfo=1 -Status: Assigned +Status: Analyzed Type: Bug Package:FPM related Operating System: Any PHP Version:5.3SVN-2010-06-03 (snap) Assigned To: fat Block user comment: N Private report: N New Comment: After having analyzing comments, apache behaviour, here is what I propose for this case. 1- add a fpm configuration directive for each pool named "fastcgi_client". Possible values are "rfc3875", "apache_mod_fastcgi", "apache_mod_proxy_fcgi" or "backward_compatibility". Defaults to "rfc3875". 2- add a fpm configuration directive for each pool named "document_root". It can be set to a directory. Defaults to (null). 3- add a fpm configuration directive for each pool named "always_run_script". It can be set to a php file. Defaults to (null) When a request is received: /* * Use a custom script to do some routage and other stuf * In this case FPM does nothing but to passthrough fastcgi variables */ if (fpm.ini[always_run_script] is set) { return execute_php(fpm.ini[always_run_script]) } /* * override DOCUMENT_ROOT if document_root is set in the FPM config * otherwise check the DOCUMENT_ROOT sent is a valid directory */ if (fpm_ini[document_root] is set) { DOCUMENT_ROOT = fpm.ini[document_root] // no need to check if DIR exits as it's been done at conf check } else { if (DOCUMENT_ROOT is not set) { return error500 "document root not set" } if (!is_dir(DOCUMENT_ROOT)) { return error500 "Documentroot not found or not a directory" } } if (fpm.ini[fastcgi_client] == "backward_compatibility") { /* * Use the same code as before (with microsoft clean up) * Will maybe be removed in a later release. */ see fpm_main.c in function init_request_info() }else if (fpm.ini[fastcgi_client] == "apache_mod_fastcgi" or "apache_mod_proxy_fcgi") { /* * *** mod_fastcgi *** * * SCRIPT_NAME is invalid (/php5-fcgi) * PATH_INFO is set to /test.php/more * SCRIPT_FILENAME is invalid (/tmp/php5-fcgi) * DOCUMENT_ROOT is set correctly * PATH_TRANSLATED = DOCUMENT_ROOT + PATH_INFO * REQUEST_URI is set correctly * QUERY_STRING is set correctly * * ==> use DOCUMENT_ROOT + PATH_INFO */ /* * *** mod_proxy_fcgi *** * * everything is buggy in mod_proxy_fcgi * PATH_TRANSLATED is set only if proxy-fcgi-pathinfo is set * PATH_TRANSLATED is set to "proxy:fcgi://host:port" + PATH_INFO * sometimes PATH_TRANSLATED is set to "proxy:fcgi://host:port" + PATH_INFO*2 * --> we can rely on PATH_TRANSLATED no matter what * * PATH_INFO is set only if proxy-fcgi-pathinfo is set * PATH_INFO is set to /test.php/more * SCRIPT_NAME is empty if proxy-fcgi-pathinfo is set * SCRIPT_NAME has the same value as PATH_INFO when proxy-fcgi-pathinfo is set * --> we can rely on one of those value. They are the same depending on * proxy-fcgi-pathinfo * * SCRIPT_FILENAME value is consistent and set to * "proxy:fcgi://host:port" + PATH_INFO * * DOCUMENT_ROOT is set correctly * QUERY_STRING is set correctly * * ==> we will use PATH_INFO or SCRIPT_NAME and DOCUMENT_ROOT */ if (fpm.ini[fastcgi_client] == "apache_mod_fastcgi") { unset SCRIPT_NAME /* will use PATH_INFO instead */ } /* automatic detection for mod_proxy_fcgi */ if (SCRIPT_NAME null or empty) { SCRIPT_NAME = PATH_INFO unset PATH_INFO } if (SCRIPT_NAME is empty) { return error500("SCRIPT_NAME or PATH_INFO not set") } /* override PATH_TRANSLATED */ PATH_TRANSLATED = DOCUMENT_ROOT + SCRIPT_NAME if (php.ini[fix_pathinfo] == 1) { /* * Try to determine SCRIPT_FILENAME and PATH_INFO from PATH_TRANSLATED */ For each '/' in PATH_TRANSLATED begining from the end of the string { SCRIPT_FILENAME = path before the '/' PATH_INFO = path after the '/' (with the '/' included) if SCRIPT_FILENAME is a valid file { PATH_TRANSLATED = DOCUMENT_ROOT + PATH_INFO return execute_php(SCRIPT_FILENAME) } return error404 "file not found" } } else { /* * Suppose PATH_TRANSLATED is DOCUMENT_ROOT + SCRIPT_NAME * ignore PATH_TRANSLATED and PATH_INFO */ SCRIPT_FILENAME = PATH_TRANSLATED unset PATH_TRANSLATED return execu
Bug #61045 [Asn->Ana]: fpm don't send error log to fastcgi clients(nginx)
Edit report at https://bugs.php.net/bug.php?id=61045&edit=1 ID: 61045 Updated by: f...@php.net Reported by:lxlight at gmail dot com Summary:fpm don't send error log to fastcgi clients(nginx) -Status: Assigned +Status: Analyzed Type: Bug Package:FPM related Operating System: Linux PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: I've released 2 patches (for 5.3 and 5.4) . Can you please test them and validate them on your side so that I can push them ? I've enhanced the zlog sublibrary to add the possibility to set an "external logger". In our case, the new function sapi_cgi_log_fastcgi() in fpm_main.c will send any messages (PHP and FPM) back to the fastcgi client no matter what the debug level is. thx Previous Comments: [2012-05-05 15:53:15] f...@php.net The following patch has been added/updated: Patch Name: bug61045-5.4.patch Revision: 1336233195 URL: https://bugs.php.net/patch-display.php?bug=61045&patch=bug61045-5.4.patch&revision=1336233195 [2012-05-05 15:53:02] f...@php.net The following patch has been added/updated: Patch Name: bug61045-5.3.patch Revision: 1336233182 URL: https://bugs.php.net/patch-display.php?bug=61045&patch=bug61045-5.3.patch&revision=1336233182 [2012-05-05 01:00:40] arohter at gmail dot com This is a showstopper for us; we've had to revert back to 5.3.8 so that we can trace and debug our application in both production and development. [2012-04-23 19:29:19] silvio dot ventres at gmail dot com The link to the patch got mangled: http://git.php.net/?p=php- src.git;a=commitdiff;h=7fc36a5210e3066ad9b1ddff2e142e7a971ae1e9 http://goo.gl/11Whb [2012-04-23 19:27:40] silvio dot ventres at gmail dot com Tracked the change through git/svn. There is a zlog facility in php-fpm which provides output of operational errors, while fastcgi error logging facility is used to output application level errors. You can see how merging those into a single zlog which works on both seems like a good idea, but currently zlog does not even know what fpm is, having no access to fpm/fcgi variables or functions. So then, a patch "generalized" the behavior, and now all logs go through zlog. Unfortunately, zlog has no means of transporting the errors through fastcgi interface, and so fastcgi logging was lost. This is the patch in question: http://git.php.net/?p=php- src.git;a=commitdiff;h=7fc36a5210e3066ad9b1ddff2e142e7a971ae1e9 The solution is either to revert this patch, or, which was probably the goal of the patch submitter, complete the zlog facility so it supports FastCGI natively. Since it doesn't seem like anyone fixed the zlog facility for half a year (since October 2011), it does seem simpler to revert the patch, or at least set it up as an option... 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 https://bugs.php.net/bug.php?id=61045 -- Edit this bug report at https://bugs.php.net/bug.php?id=61045&edit=1
Bug #61045 [Ana->Csd]: fpm don't send error log to fastcgi clients(nginx)
Edit report at https://bugs.php.net/bug.php?id=61045&edit=1 ID: 61045 Updated by: f...@php.net Reported by:lxlight at gmail dot com Summary:fpm don't send error log to fastcgi clients(nginx) -Status: Analyzed +Status: Closed Type: Bug Package:FPM related Operating System: Linux PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-05-22 06:47:44] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=dce259099df6505bb82b63700e4d14832b74e8c1 Log: - Fixed bug #61045 (fpm don't send error log to fastcgi clients) [2012-05-22 06:43:08] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=dce259099df6505bb82b63700e4d14832b74e8c1 Log: - Fixed bug #61045 (fpm don't send error log to fastcgi clients) [2012-05-22 06:43:07] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=faca4e08b4dffbf00b1bc20fc5d4e310b3f99c13 Log: - Fixed bug #61045 (fpm don't send error log to fastcgi clients) [2012-05-06 02:13:27] arohter at gmail dot com I applied the patch against 5.3.12, and it appears to be working. [2012-05-05 15:56:19] f...@php.net I've released 2 patches (for 5.3 and 5.4) . Can you please test them and validate them on your side so that I can push them ? I've enhanced the zlog sublibrary to add the possibility to set an "external logger". In our case, the new function sapi_cgi_log_fastcgi() in fpm_main.c will send any messages (PHP and FPM) back to the fastcgi client no matter what the debug level is. thx 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 https://bugs.php.net/bug.php?id=61045 -- Edit this bug report at https://bugs.php.net/bug.php?id=61045&edit=1
Bug #60156 [Opn->Nab]: Segmentation fault at _zend_mm_alloc_int
Edit report at https://bugs.php.net/bug.php?id=60156&edit=1 ID: 60156 Updated by: f...@php.net Reported by:dbetz at df dot eu Summary:Segmentation fault at _zend_mm_alloc_int -Status: Open +Status: Not a bug Type: Bug Package:FPM related Operating System: Gentoo PHP Version:5.3.8 -Assigned To: +Assigned To: fat Block user comment: N Private report: N New Comment: it was a bug in a custom PHP patch Previous Comments: [2011-11-25 13:52:21] dbetz at df dot eu sorry. i found the solution in an self-made patch for php. You can close this. Thank you. [2011-10-31 12:46:53] dbetz at df dot eu Hello, i cant reproduce this with php-cgi and php-fpm with --enable-debug When i compile php-fpm w/o --enable-debug i hit this segfault. With php <= 5.3.7rc3-dev i always get an segfault in zend_assign_to_variable See https://bugs.php.net/bug.php?id=54488 It is always the same procedure to reproduce this segfaults. [2011-10-31 10:56:23] f...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. It does not seem to be a problem related to FPM but to core. Can you reproduce the bug with php-cgi, php-cli or mod_php ? [2011-10-28 06:43:44] dbetz at df dot eu Description: Hello, when posting in vBulletin Board the PHP-FPM receives an segfault. Program received signal SIGSEGV, Segmentation fault. _zend_mm_alloc_int (heap=0x8a3aa30, size=52) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_alloc.c:1835 1835/root/compile/php-5.3/latest/php-5.3.8/Zend/zend_alloc.c: No such file or directory. in /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_alloc.c (gdb) bt full #0 _zend_mm_alloc_int (heap=0x8a3aa30, size=52) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_alloc.c:1835 bitmap = best_fit = true_size = 60 block_size = remaining_size = segment_size = segment = keep_rest = #1 0x0842ea0c in _zend_hash_quick_add_or_update (ht=0x90dc2f0, arKey=0x90d8b78 "plaintext_parser", nKeyLength=17, h=3773187690, pData=0x90d8b64, nDataSize=4, pDest=0xba7522a8, flag=1) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_hash.c:315 p = 0x0 #2 0x0842ef06 in zend_hash_copy (target=0x90dc2f0, source=0x8e88318, pCopyConstructor=0x84216f0 , tmp=0xba7522e8, size=4) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_hash.c:788 p = 0x90d8b58 new_entry = 0x90d8a40 #3 0x084217df in _zval_copy_ctor_func (zvalue=0x9003c60) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_variables.c:134 tmp = 0x5b original_ht = 0x8e88318 #4 0x084226a0 in _zval_copy_ctor (type=8, format=0x898f84c "Use of undefined constant %s - assumed '%s'") at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_variables.h:45 No locals. #5 zend_error (type=8, format=0x898f84c "Use of undefined constant %s - assumed '%s'") at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend.c:1103 retval = z_error_type = 0x90054d4 z_error_message = 0x90da358 z_error_filename = 0x90082a0 z_error_lineno = 0x90082f4 z_context = 0x9003c60 error_filename = 0x90d5b34 "/home/user/testforen/domaingo/includes/functions_newpost.php(668) : eval()'d code" error_lineno = 43 orig_user_error_handler = in_compilation = saved_class_entry = #6 0x08448926 in ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER (execute_data=0x8b92abc) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_vm_execute.h:17844 actual = 0x90dafe4 "postid" opline = 0x90de7e0 #7 0x0844d33e in execute (op_array=0x8e90548) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend_vm_execute.h:107 ret = execute_data = 0x8b92abc nested = 1 '\001' original_in_execution = 0 '\000' #8 0x08421b46 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/compile/php-5.3/latest/php-5.3.8/Zend/zend.c:1236 i = 1 file_handle = 0xba7568a0 orig_op_array = 0x0 orig_retval_ptr_ptr = 0x0 #9 0x083cf596 in php_execute_script (primary_file=0xba7568a0) at /root/compile/php-5.3/latest/php-5.3.8/main/main.c:2284 realfile = "ø4
Bug #61026 [Asn]: Separate pools on same port
Edit report at https://bugs.php.net/bug.php?id=61026&edit=1 ID: 61026 Updated by: f...@php.net Reported by:flatline at hardwired dot hu Summary:Separate pools on same port Status: Assigned Type: Bug Package:FPM related Operating System: Debain Squeeze x64 PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: it not normal for sure. I'll look to this issue, thx Previous Comments: [2012-02-09 09:49:52] flatline at hardwired dot hu Description: It's maybe a feature, but if I define two pools and accidentally set them to listen on the same address/ports and I do a multiple file upload, some of the files will be handled by pool X, some others by pool Y. Hence their users will be mixed too. user = X listen = 127.0.0.1:9000 user = Y listen = 127.0.0.1:9000 Test script: --- - Expected result: Php fpm should warn about using two pools with the same listen directive. Actual result: -- - -- Edit this bug report at https://bugs.php.net/bug.php?id=61026&edit=1
Bug #61067 [Opn->Nab]: free() from signal handler leads to deadlock
Edit report at https://bugs.php.net/bug.php?id=61067&edit=1 ID: 61067 Updated by: f...@php.net Reported by:phpbugs at oops dot mooo dot com Summary:free() from signal handler leads to deadlock -Status: Open +Status: Not a bug Type: Bug Package:FPM related Operating System: Debian Squeeze PHP Version:5.3.10 Block user comment: N Private report: N New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Previous Comments: [2012-02-23 10:06:28] phpbugs at oops dot mooo dot com You're correct it looks like the same bug. Sorry for not searching well enough. [2012-02-14 12:11:21] jpa...@php.net Seems related to #31749 [2012-02-12 22:59:18] phpbugs at oops dot mooo dot com Description: Using PHP-FPM-5.3.10+APC-3.1.9. I just discovered 30 PHP processes that's been running for 22 hours. Further inspection revealed all of them (except one) are waiting to flock() a session file. The process holding the flock() is doing: futex(0x7f21238f9e40, FUTEX_WAIT_PRIVATE, 2, NULL (gdb) info threads Id Target Id Frame * 1Thread 0x7f2126114720 (LWP 4271) __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97 (gdb) bt #0 __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97 #1 0x7f2123614558 in _L_lock_9590 () from /lib/libc.so.6 #2 0x7f2123612941 in *__GI___libc_free (mem=0x7f21238f9e40) at malloc.c:3737 #3 0x7f21263f5820 in php_error_cb (type=1, error_filename=0x7f2121088fd8 "", error_lineno=154, format=, args=) at /build/php-5.3.10/main/main.c:931 #4 0x7f2126446d7c in zend_error (type=1, format=0x7f2126902028 "Maximum execution time of %d second%s exceeded") at /build/php-5.3.10/Zend/zend.c:1127 #5 #6 0x7f2123612a1d in *__GI___libc_malloc (bytes=50) at malloc.c:3658 #7 0x7f2123617a22 in *__GI___strdup (s=0x7f2121088fd8 "") at strdup.c:43 #8 0x7f21263f587a in php_error_cb (type=8, error_filename=0x7f2121088fd8 "", error_lineno=154, format=, args=) at /build/php-5.3.10/main/main.c:943 #9 0x7f2126446d7c in zend_error (type=8, format=0x7f2126907356 "Undefined index: %s") at /build/php-5.3.10/Zend/zend.c:1127 #10 0x7f21264b2f89 in zend_fetch_dimension_address_inner (type=, dim=, ht=) at /build/php-5.3.10/Zend/zend_execute.c:820 #11 zend_fetch_dimension_address_read (result=0x7f2127f17930, container_ptr=, dim=0x7f2126bf25c8, dim_is_tmp_var=, type=0) at /build/php-5.3.10/Zend/zend_execute.c:1043 #12 0x7f21264b4059 in ZEND_FETCH_DIM_R_SPEC_CV_VAR_HANDLER (execute_data=0x7f2127f17678) at /build/php-5.3.10/Zend/zend_vm_execute.h:26962 #13 0x7f212646ee30 in execute (op_array=0x7f2127efe020) at /build/php-5.3.10/Zend/zend_vm_execute.h:107 #14 0x7f212644654f in zend_execute_scripts (type=8, retval=, file_count=3) at /build/php-5.3.10/Zend/zend.c:1308 #15 0x7f21263f2bc7 in php_execute_script (primary_file=) at /build/php-5.3.10/main/main.c:2323 #16 0x7f21264db7c8 in main (argc=669766600, argv=) at /build/php-5.3.10/sapi/fpm/fpm/fpm_main.c:1875 It looks like PHP caught a signal inside malloc(), causing glibc to take some lock, and that free() wants the same lock, leading to deadlock. I'm not sure if malloc/free is safe to use in signal handlers. http://linux.derkeiler.com/Newsgroups/comp.os.linux.development.apps/2005-07/0323.html seems to suggest it's not. -- Edit this bug report at https://bugs.php.net/bug.php?id=61067&edit=1
Bug #62033 [Asn->Fbk]: php-fpm exits with status 0 on some failures to start
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1 ID: 62033 Updated by: f...@php.net Reported by:js at justinsamuel dot com Summary:php-fpm exits with status 0 on some failures to start -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Linux (Ubuntu 12.04) PHP Version:5.4.3 Assigned To: fat Block user comment: N Private report: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. I can't reproduce the problem. On my side with both up2date sources for 5.3 and 5.4: root@dev:/home/fat/dev/php-git/php-5.4# ./sapi/fpm/php-fpm ; echo $? [23-May-2012 09:32:03] ERROR: [pool direct] cannot get uid for user 'fatprout' [23-May-2012 09:32:03] ERROR: FPM initialization failed 255 root@dev:/home/fat/dev/php-git/php-5.4# ./sapi/fpm/php-fpm ; echo $? [23-May-2012 09:32:29] ERROR: [pool direct] cannot get gid for group 'fatprout' [23-May-2012 09:32:29] ERROR: FPM initialization failed 255 which version of PHP are you using ? (sources from php.net you have compiled or a package from a distro ?) Can you send me the result of php-fpm --version php-fpm -tt thx Previous Comments: [2012-05-14 22:00:38] js at justinsamuel dot com Description: When the php-fpm command fails because the 'user' value of a pool specifies a nonexistent user, php-fpm exits with 0 rather than a non-zero status. This is incorrect and causes problems with init scripts, for example. This happens with both php 5.3 and 5.4. Test script: --- Snippet of a pool configuration which will trigger the bug: [example.com] user = fakeuser ... Expected result: php-fpm should exit with a non-zero status in all cases where there is an error which causes it to fail to start (including, but not limited to, nonexistent users). Actual result: -- $ php-fpm [14-May-2012 14:39:40] ERROR: [pool example.com] cannot get uid for user 'fakeuser' [14-May-2012 14:39:40] ERROR: FPM initialization failed $ echo $? 0 -- Edit this bug report at https://bugs.php.net/bug.php?id=62033&edit=1
Req #61835 [Opn->Csd]: php-fpm is not allowed to run as root
Edit report at https://bugs.php.net/bug.php?id=61835&edit=1 ID: 61835 Updated by: f...@php.net Reported by:william88 at gmail dot com Summary:php-fpm is not allowed to run as root -Status: Open +Status: Closed Type: Feature/Change Request Package:FPM related Operating System: FreeBSD PHP Version:5.3.10 -Assigned To: +Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-05-23 08:38:16] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=06c7c3674b5e205023de7a150d29d78c313143f8 Log: - Fixed bug #61835 (php-fpm is not allowed to run as root) [2012-05-23 08:38:15] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=7b396c078cc8fef18f37cc9a22c437f13921e375 Log: - Fixed bug #61835 (php-fpm is not allowed to run as root) [2012-04-24 12:16:32] william88 at gmail dot com Description: Hi, Yes, I know the risks about running php as root. However there are situations where one would _need_ to do it, like appliances, accessing operating system resources or even for testing purposes. It seems correct to warn and disallow it by default, but I think it is reasonable to have a "force" option that allows php-fpm running as root, as long there is a big message warning about the risks. Expected result: Allow to run as root Actual result: -- Not able to run as root, no force option available. -- Edit this bug report at https://bugs.php.net/bug.php?id=61835&edit=1
Bug #62038 [Asn->Nab]: apache2 + fpm is incompatible with mod_cache, mod_mem_cache
Edit report at https://bugs.php.net/bug.php?id=62038&edit=1 ID: 62038 Updated by: f...@php.net Reported by:Tamaraxo3 at gmail dot com Summary:apache2 + fpm is incompatible with mod_cache, mod_mem_cache -Status: Assigned +Status: Not a bug Type: Bug Package:FPM related Operating System: Linux PHP Version:5.3.13 Assigned To: fat Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. This has nothing to do with FPM. It's a misconfiguration of apache mod_cache or a bug in apache mod_cache somehow. FPM is standalone and communicate with apache though fastcgi protocol. Previous Comments: [2012-05-15 15:43:21] Tamaraxo3 at gmail dot com Description: when you install apache2 and configure php5-fpm and now so execute a2enmod mem_cache modul will be loaded but apache cache didn't work with FPM (all request will be handeled by FPM... none where use mem_cache) Test script: --- after setup try this -- Edit this bug report at https://bugs.php.net/bug.php?id=62038&edit=1
Bug #61295 [Opn->Ana]: php-fpm should not fail with commented 'user' for non-root start
Edit report at https://bugs.php.net/bug.php?id=61295&edit=1 ID: 61295 Updated by: f...@php.net Reported by:s...@php.net Summary:php-fpm should not fail with commented 'user' for non-root start -Status: Open +Status: Analyzed Type: Bug Package:FPM related Operating System: Linux PHP Version:5.4.0 -Assigned To: +Assigned To:fat Block user comment: N Private report: N Previous Comments: [2012-03-05 22:37:23] s...@php.net Description: For non-root users: 1. if php-fpm.config has the default 'user = nobody' then php-fpm starts with: "WARNING: [pool www] 'user' directive is ignored when FPM is not running as root" 2. But if the 'user' directive is commented out then php-fpm fails to start and gives "ALERT: [pool www] user has not been defined" Php-fpm should not fail to start for non root users when 'user' (and probably 'group') are commented out of php-fpm.conf -- Edit this bug report at https://bugs.php.net/bug.php?id=61295&edit=1
Bug #61295 [Ana->Csd]: php-fpm should not fail with commented 'user' for non-root start
Edit report at https://bugs.php.net/bug.php?id=61295&edit=1 ID: 61295 Updated by: f...@php.net Reported by:s...@php.net Summary:php-fpm should not fail with commented 'user' for non-root start -Status: Analyzed +Status: Closed Type: Bug Package:FPM related Operating System: Linux PHP Version:5.4.0 Assigned To:fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-05-23 09:32:16] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=a07d76c0ba57e6471ac5869af0aaa26206baa284 Log: - Fixed bug #61295 (php-fpm should not fail with commented 'user' for non-root start) [2012-05-23 09:32:14] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=812d2481935185eeeabb2c1fe2d7eafd76fc7359 Log: - Fixed bug #61295 (php-fpm should not fail with commented 'user' for non-root start) [2012-03-05 22:37:23] s...@php.net Description: For non-root users: 1. if php-fpm.config has the default 'user = nobody' then php-fpm starts with: "WARNING: [pool www] 'user' directive is ignored when FPM is not running as root" 2. But if the 'user' directive is commented out then php-fpm fails to start and gives "ALERT: [pool www] user has not been defined" Php-fpm should not fail to start for non root users when 'user' (and probably 'group') are commented out of php-fpm.conf -- Edit this bug report at https://bugs.php.net/bug.php?id=61295&edit=1
Bug #61839 [Asn->Csd]: [patch] Unable to cross-compile PHP with --enable-fpm
Edit report at https://bugs.php.net/bug.php?id=61839&edit=1 ID: 61839 Updated by: f...@php.net Reported by:bos at je-eigen-domein dot nl Summary:[patch] Unable to cross-compile PHP with --enable-fpm -Status: Assigned +Status: Closed Type: Bug Package:FPM related Operating System: Cross compiled Linux PHP Version:5.4.0 Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. thx for the patch Previous Comments: [2012-05-23 09:41:37] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=0b44f16ea2f18a08eb1249db6621840527eab5e0 Log: - Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm) [2012-05-23 09:41:09] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=0b44f16ea2f18a08eb1249db6621840527eab5e0 Log: - Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm) [2012-04-24 15:12:48] bos at je-eigen-domein dot nl Description: When cross-compiling PHP for a different architecture, configure fails if you specify the --enable-fpm option: == checking for ptrace... yes checking whether ptrace works... configure: error: in `/hdd/max/dev/raspberry/buildroot-berryserver/output/build/php-5.4.0': configure: error: cannot run test program while cross compiling See `config.log' for more details. == Obviously it is impossible to execute a test program when the system you are compiling on is not the target system. Attached a patch that skips running the test programs when cross-compiling. -- Edit this bug report at https://bugs.php.net/bug.php?id=61839&edit=1
Bug #61026 [Asn->Csd]: FPM pools can listen on the same address
Edit report at https://bugs.php.net/bug.php?id=61026&edit=1 ID: 61026 Updated by: f...@php.net Reported by:flatline at hardwired dot hu Summary:FPM pools can listen on the same address -Status: Assigned +Status: Closed Type: Bug Package:FPM related Operating System: Debain Squeeze x64 PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-05-23 09:53:36] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=1299503936597ea873a3eb8272aa4deec2f31e5b Log: - Fixed bug #61026 (FPM pools can listen on the same address) [2012-05-23 09:53:35] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=5d61e56dd7e19b82abde23f83b203449a48cc91a Log: - Fixed bug #61026 (FPM pools can listen on the same address) [2012-05-22 16:05:09] f...@php.net it not normal for sure. I'll look to this issue, thx [2012-02-09 09:49:52] flatline at hardwired dot hu Description: It's maybe a feature, but if I define two pools and accidentally set them to listen on the same address/ports and I do a multiple file upload, some of the files will be handled by pool X, some others by pool Y. Hence their users will be mixed too. user = X listen = 127.0.0.1:9000 user = Y listen = 127.0.0.1:9000 Test script: --- - Expected result: Php fpm should warn about using two pools with the same listen directive. Actual result: -- - -- Edit this bug report at https://bugs.php.net/bug.php?id=61026&edit=1
Bug #61370 [Opn->Fbk]: Segmentation fault
Edit report at https://bugs.php.net/bug.php?id=61370&edit=1 ID: 61370 Updated by: f...@php.net Reported by:floren at yqed dot com Summary:Segmentation fault -Status: Open +Status: Feedback Type: Bug Package:FPM related Operating System: CentOS 5.8 64bits PHP Version:5.4.0 Block user comment: N Private report: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. can you please provide a complete stack trace ? I see APC is loaded, can you disable it to ensure the bugs does not come from APC. thx Previous Comments: [2012-04-26 19:58:58] roeitell at gmail dot com Backtrace link doesn't work, can you provide another one? [2012-03-13 09:35:23] floren at yqed dot com Description: Starting php-fpm as service generates a segfault. Backtrace: http://pastie.org/3584157 -- Edit this bug report at https://bugs.php.net/bug.php?id=61370&edit=1
Bug #62126 [Asn->Fbk]: php-fpm segfaults when encoutering # in php.ini
Edit report at https://bugs.php.net/bug.php?id=62126&edit=1 ID: 62126 Updated by: f...@php.net Reported by:i dot galic at brainsware dot org Summary:php-fpm segfaults when encoutering # in php.ini -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Ubuntu 12.04 PHP Version:5.4.3 Assigned To: fat Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ it's already been fixed Previous Comments: [2012-05-23 15:51:22] i dot galic at brainsware dot org Description: When php-fpm encounters a '#' while parsing php.ini, it will abort with a Segmentation fault. Actual result: -- Core was generated by `/opt/bw/sbin/php-fpm --help'. Program terminated with signal 11, Segmentation fault. #0 0x7fbcdd57576f in sapi_cgi_log_message ( message=0x7fbcdd1001b8 "PHP Deprecated: Comments starting with '#' are deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:651 651 if (CGIG(fcgi_logging)) { (gdb) bt #0 0x7fbcdd57576f in sapi_cgi_log_message ( message=0x7fbcdd1001b8 "PHP Deprecated: Comments starting with '#' are deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:651 #1 0x7fbcdd43cf0a in php_log_err ( log_message=0x7fbcdd1001b8 "PHP Deprecated: Comments starting with '#' are deprecated in /etc/bw/php/php.ini on line 713 in Unknown on line 0", tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/main/main.c:647 #2 0x7fbcdd43d463 in php_error_cb (type=8192, error_filename=0x7fbcdd57e135 "Unknown", error_lineno=0, format=, args=) at /build/php/php-5.4.3/main/main.c:1057 #3 0x7fbcdd4b1549 in zend_error (type=8192, format=0x7fbcdd90c118 "Comments starting with '#' are deprecated in %s on line %d") at /build/php/php-5.4.3/Zend/zend.c:1091 #4 0x7fbcdd47d65c in ini_lex (ini_lval=, tsrm_ls=0x7fbcddd68090) at Zend/zend_ini_scanner.l:564 #5 0x7fbcdd47c290 in ini_parse (tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/Zend/zend_ini_parser.c:1572 #6 0x7fbcdd47c8e2 in zend_parse_ini_file (fh=0x7fffbb5e5c40, unbuffered_errors=, scanner_mode=, ini_parser_cb=, arg=, tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/Zend/zend_ini_parser.c:319 #7 0x7fbcdd446f6a in php_init_config (tsrm_ls=0x7fbcddd68090) at /build/php/php-5.4.3/main/php_ini.c:579 #8 0x7fbcdd440276 in php_module_startup (sf=, additional_modules=0x7fbcddc1acc0, num_additional_modules=1) at /build/php/php-5.4.3/main/main.c:2137 #9 0x7fbcdd5752e5 in php_cgi_startup (sapi_module=) at /build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:823 #10 0x7fbcdd236c38 in main (argc=2, argv=0x7fffbb5ea798) at /build/php/php-5.4.3/sapi/fpm/fpm/fpm_main.c:1642 -- Edit this bug report at https://bugs.php.net/bug.php?id=62126&edit=1
Bug #61689 [Asn->Fbk]: php-fpm children crashes on exit
Edit report at https://bugs.php.net/bug.php?id=61689&edit=1 ID: 61689 Updated by: f...@php.net Reported by:eugene at zhegan dot in Summary:php-fpm children crashes on exit -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: FreeBSD 9.0-RELEASE PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. I can't do anything w/o a coredump. You should check your ulimits configuration, the directory where FPM children process are in (chdir FPM parameter), the rights of this directory and ensure rlimit_core FPM parameter is not set (to use default ulimit values). Previous Comments: [2012-04-10 14:54:02] eugene at zhegan dot in Description: I use an nginx + php-fpm installation. Php-fpm is installed form ports. The problem is, that php-fpm children sometimes (not always) got signal 11 when the master process attempts to rotate em: [10-Apr-2012 20:46:30.072189] DEBUG: pid 14165, fpm_got_signal(), line 72: received SIGCHLD [10-Apr-2012 20:46:30.072278] WARNING: pid 14165, fpm_children_bury(), line 252: [pool www] child 14590 exited on signal 11 (SIGSEGV) after 121.434207 seconds from start Seems like this doesn't affect the production process, but anyway this bothers me and I think you will agree that bugs should be attempted to be fixed. I would be really glad to present you a backtrace, but unfortunately I don't see any corefiles anywhere. Core dumps are enabled, even for suid/gid processes: # sysctl -a | grep core kern.corefile: %N.core kern.nodump_coredump: 0 kern.coredump: 1 kern.sugid_coredump: 1 debug.elf64_legacy_coredump: 0 debug.ncores: 5 debug.elf32_legacy_coredump: 0 But still no cores. Test script: --- I don't think this is relatred to some particular script. -- Edit this bug report at https://bugs.php.net/bug.php?id=61689&edit=1
Bug #61558 [Asn->Fbk]: Runaway spawning of children after pipe error
Edit report at https://bugs.php.net/bug.php?id=61558&edit=1 ID: 61558 Updated by: f...@php.net Reported by:phpbug2012 at tgabber dot mine dot nu Summary:Runaway spawning of children after pipe error -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Debian Linux PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Does the error happened again since (is it reproductible) ? If so, It would be great to have a stacktrace of the last segfault. Do you still have the error log? I'd like to see what was just before and after the "Bad file descriptor" lines. Do you have, by any chances, reached any ulimit limitations (like number of open files) ? This could maybe explain the "Bad file descriptor" error (but not the others errors) If you have any clue on how to reproduce the problem, it would be very useful to fix what seems to be an important bug to me. thx a lot Previous Comments: [2012-03-29 20:28:53] phpbug2012 at tgabber dot mine dot nu Description: Relevant software versions Linux 2.6.32-5-amd64 Server Version: Apache/2.2.16 (Debian) DAV/2 mod_fastcgi/2.4.6 PHP Version 5.3.10-1~dotdeb.1 APC Version 3.1.9 Background This is a lightly-loaded webserver running around 40 virtual hosts that experiences occasional traffic spikes. Around 20 virtual hosts use php and have one fpm pool each to run php under their own user, configured as ondemand so that they have no fpm processes running when they are not serving pages. Generally there are between 1 and 5 fpm processes running in total at any one time, rising to maybe 20 to 30 when a spike of traffic comes in. Error I became aware of the problem after a service monitor reported that websites were no longer being served. Checking, I found that that php-fpm had crashed. Time since the last restart of php-fpm when the error occured was about 2 days 4 hours, with around 2.5million php requests served. The APC cache of 128Mb was about three-quarters full. Looking back through the logs, this is what I found. The problem appears to start at 18:55:32 when php-fpm was unable to read a pipe. I have no idea what caused this initial error, looking back through other logs I could not see any abnormal web requests around this time. Mar 24 18:55:32 banana php-fpm[21906]: [ERROR] unable to read what child say: Bad file descriptor (9) Mar 24 18:55:32 banana php-fpm[21906]: [ERROR] unable to read what child say: Bad file descriptor (9) There were no further fpm messages in the log until those shown below. This is the most worrying aspect of this bug as basically fpm seems to have gone into meltdown, continually spawning a process (and using almost all available cpu). Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 9 exited with code 0 after 0.002001 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22230 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22230 exited with code 0 after 0.001790 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22231 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22231 exited with code 0 after 0.001694 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22232 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22232 exited with code 0 after 0.001692 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22233 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22233 exited with code 0 after 0.001685 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22234 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22234 exited with code 0 after 0.001683 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22235 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22235 exited with code 0 after 0.001659 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22236 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22236 exited with code 0 after 0.001677 seconds from start Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22237 started Mar 24 18:56:48 banana php-fpm[21906]: [NOTICE] [pool ci] child 22237 exited with c
Bug #62033 [Fbk]: php-fpm exits with status 0 on some failures to start
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1 ID: 62033 Updated by: f...@php.net Reported by:js at justinsamuel dot com Summary:php-fpm exits with status 0 on some failures to start Status: Feedback Type: Bug Package:FPM related Operating System: Linux (Ubuntu 12.04) PHP Version:5.4.3 Assigned To: fat Block user comment: N Private report: N New Comment: This is strange ... can you please test the following patch and see if exit code is 42 on error ? diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 95a7623..62c1b69 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1803,7 +1803,8 @@ consult the installation file that came with this distribution, or visit \n\ } if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) { - return FAILURE; +// return FAILURE; + exit(42); } fpm_is_running = 1; thx ++ Jerome Previous Comments: [2012-05-23 20:54:11] js at justinsamuel dot com For simplicity here I'm going to focus on 5.3 instead of 5.4. I've tried with the following: * compiled from source (php.net tarballs) on Ubuntu 12.04 * compiled from source (php.net tarballs) on Debian 6 * Ubuntu 12.04's current php5-fpm package * CentOS 6 with current php53u-fpm package from IUS Here's the -tt info: # /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt [23-May-2012 13:07:26] NOTICE: [General] [23-May-2012 13:07:26] NOTICE: pid = /var/run/php5.3-test.pid [23-May-2012 13:07:26] NOTICE: error_log = /var/log/php5.3-test.log [23-May-2012 13:07:26] NOTICE: syslog.ident = php-fpm [23-May-2012 13:07:26] NOTICE: syslog.facility = 24 [23-May-2012 13:07:26] NOTICE: log_level = unknown value [23-May-2012 13:07:26] NOTICE: emergency_restart_interval = 0s [23-May-2012 13:07:26] NOTICE: emergency_restart_threshold = 0 [23-May-2012 13:07:26] NOTICE: process_control_timeout = 0s [23-May-2012 13:07:26] NOTICE: process.max = 0 [23-May-2012 13:07:26] NOTICE: daemonize = yes [23-May-2012 13:07:26] NOTICE: rlimit_files = 0 [23-May-2012 13:07:26] NOTICE: rlimit_core = 0 [23-May-2012 13:07:26] NOTICE: events.mechanism = epoll [23-May-2012 13:07:26] NOTICE: [23-May-2012 13:07:26] NOTICE: [example.com] [23-May-2012 13:07:26] NOTICE: prefix = undefined [23-May-2012 13:07:26] NOTICE: user = fakeuser [23-May-2012 13:07:26] NOTICE: group = fakegroup [23-May-2012 13:07:26] NOTICE: listen = /tmp/php5.3-test.sock [23-May-2012 13:07:26] NOTICE: listen.backlog = 128 [23-May-2012 13:07:26] NOTICE: listen.owner = root [23-May-2012 13:07:26] NOTICE: listen.group = root [23-May-2012 13:07:26] NOTICE: listen.mode = 0700 [23-May-2012 13:07:26] NOTICE: listen.allowed_clients = undefined [23-May-2012 13:07:26] NOTICE: pm = ondemand [23-May-2012 13:07:26] NOTICE: pm.max_children = 1 [23-May-2012 13:07:26] NOTICE: pm.start_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.min_spare_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.max_spare_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.process_idle_timeout = 10 [23-May-2012 13:07:26] NOTICE: pm.max_requests = 0 [23-May-2012 13:07:26] NOTICE: pm.status_path = undefined [23-May-2012 13:07:26] NOTICE: ping.path = undefined [23-May-2012 13:07:26] NOTICE: ping.response = undefined [23-May-2012 13:07:26] NOTICE: access.log = undefined [23-May-2012 13:07:26] NOTICE: access.format = undefined [23-May-2012 13:07:26] NOTICE: slowlog = undefined [23-May-2012 13:07:26] NOTICE: request_slowlog_timeout = 0s [23-May-2012 13:07:26] NOTICE: request_terminate_timeout = 0s [23-May-2012 13:07:26] NOTICE: rlimit_files = 0 [23-May-2012 13:07:26] NOTICE: rlimit_core = 0 [23-May-2012 13:07:26] NOTICE: chroot = undefined [23-May-2012 13:07:26] NOTICE: chdir = undefined [23-May-2012 13:07:26] NOTICE: catch_workers_output = no [23-May-2012 13:07:26] NOTICE: security.limit_extensions = .php .phar [23-May-2012 13:07:26] NOTICE: [23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test is successful Here's the version info for builds I've repeated this problem with. I haven't had any builds not show show this problem yet. ## on Ubuntu 12.04, built from source # /opt/test/php5.3/sbin/php-fpm --version PHP 5.3.13 (fpm-fcgi) (built: May 23 2012 12:21:32) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies ## on Ubuntu 12.04, using distro's package # php5-fpm --version PHP 5.3.10-1ubuntu3.1 (fpm-fcgi) (built: May 4 2012 02:28:04) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies ## on Debian 6, bu
Bug #62033 [Fbk->Ana]: php-fpm exits with status 0 on some failures to start
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1 ID: 62033 Updated by: f...@php.net Reported by:js at justinsamuel dot com Summary:php-fpm exits with status 0 on some failures to start -Status: Feedback +Status: Analyzed Type: Bug Package:FPM related Operating System: Linux (Ubuntu 12.04) PHP Version:5.4.3 Assigned To: fat Block user comment: N Private report: N Previous Comments: [2012-05-23 22:50:51] f...@php.net The following patch has been added/updated: Patch Name: bug62033.patch Revision: 1337813451 URL: https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033.patch&revision=1337813451 [2012-05-23 22:10:59] f...@php.net This is strange ... can you please test the following patch and see if exit code is 42 on error ? diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 95a7623..62c1b69 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1803,7 +1803,8 @@ consult the installation file that came with this distribution, or visit \n\ } if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) { - return FAILURE; +// return FAILURE; + exit(42); } fpm_is_running = 1; thx ++ Jerome [2012-05-23 20:54:11] js at justinsamuel dot com For simplicity here I'm going to focus on 5.3 instead of 5.4. I've tried with the following: * compiled from source (php.net tarballs) on Ubuntu 12.04 * compiled from source (php.net tarballs) on Debian 6 * Ubuntu 12.04's current php5-fpm package * CentOS 6 with current php53u-fpm package from IUS Here's the -tt info: # /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt [23-May-2012 13:07:26] NOTICE: [General] [23-May-2012 13:07:26] NOTICE: pid = /var/run/php5.3-test.pid [23-May-2012 13:07:26] NOTICE: error_log = /var/log/php5.3-test.log [23-May-2012 13:07:26] NOTICE: syslog.ident = php-fpm [23-May-2012 13:07:26] NOTICE: syslog.facility = 24 [23-May-2012 13:07:26] NOTICE: log_level = unknown value [23-May-2012 13:07:26] NOTICE: emergency_restart_interval = 0s [23-May-2012 13:07:26] NOTICE: emergency_restart_threshold = 0 [23-May-2012 13:07:26] NOTICE: process_control_timeout = 0s [23-May-2012 13:07:26] NOTICE: process.max = 0 [23-May-2012 13:07:26] NOTICE: daemonize = yes [23-May-2012 13:07:26] NOTICE: rlimit_files = 0 [23-May-2012 13:07:26] NOTICE: rlimit_core = 0 [23-May-2012 13:07:26] NOTICE: events.mechanism = epoll [23-May-2012 13:07:26] NOTICE: [23-May-2012 13:07:26] NOTICE: [example.com] [23-May-2012 13:07:26] NOTICE: prefix = undefined [23-May-2012 13:07:26] NOTICE: user = fakeuser [23-May-2012 13:07:26] NOTICE: group = fakegroup [23-May-2012 13:07:26] NOTICE: listen = /tmp/php5.3-test.sock [23-May-2012 13:07:26] NOTICE: listen.backlog = 128 [23-May-2012 13:07:26] NOTICE: listen.owner = root [23-May-2012 13:07:26] NOTICE: listen.group = root [23-May-2012 13:07:26] NOTICE: listen.mode = 0700 [23-May-2012 13:07:26] NOTICE: listen.allowed_clients = undefined [23-May-2012 13:07:26] NOTICE: pm = ondemand [23-May-2012 13:07:26] NOTICE: pm.max_children = 1 [23-May-2012 13:07:26] NOTICE: pm.start_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.min_spare_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.max_spare_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.process_idle_timeout = 10 [23-May-2012 13:07:26] NOTICE: pm.max_requests = 0 [23-May-2012 13:07:26] NOTICE: pm.status_path = undefined [23-May-2012 13:07:26] NOTICE: ping.path = undefined [23-May-2012 13:07:26] NOTICE: ping.response = undefined [23-May-2012 13:07:26] NOTICE: access.log = undefined [23-May-2012 13:07:26] NOTICE: access.format = undefined [23-May-2012 13:07:26] NOTICE: slowlog = undefined [23-May-2012 13:07:26] NOTICE: request_slowlog_timeout = 0s [23-May-2012 13:07:26] NOTICE: request_terminate_timeout = 0s [23-May-2012 13:07:26] NOTICE: rlimit_files = 0 [23-May-2012 13:07:26] NOTICE: rlimit_core = 0 [23-May-2012 13:07:26] NOTICE: chroot = undefined [23-May-2012 13:07:26] NOTICE: chdir = undefined [23-May-2012 13:07:26] NOTICE: catch_workers_output = no [23-May-2012 13:07:26] NOTICE: security.limit_extensions = .php .phar [23-May-2012 13:07:26] NOTICE: [23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test is successful Here's the version info for builds I've repeated this problem with. I haven't had any builds not show show this problem yet. ## on Ubuntu 12.04, built from source # /opt/test/
Bug #62033 [Ana->Fbk]: php-fpm exits with status 0 on some failures to start
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1 ID: 62033 Updated by: f...@php.net Reported by:js at justinsamuel dot com Summary:php-fpm exits with status 0 on some failures to start -Status: Analyzed +Status: Feedback Type: Bug Package:FPM related Operating System: Linux (Ubuntu 12.04) PHP Version:5.4.3 Assigned To: fat Block user comment: N Private report: N New Comment: I've attached a real patch to this bug report. Can you please test it ? thx ++ Jerome Previous Comments: [2012-05-23 22:50:51] f...@php.net The following patch has been added/updated: Patch Name: bug62033.patch Revision: 1337813451 URL: https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033.patch&revision=1337813451 [2012-05-23 22:10:59] f...@php.net This is strange ... can you please test the following patch and see if exit code is 42 on error ? diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 95a7623..62c1b69 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1803,7 +1803,8 @@ consult the installation file that came with this distribution, or visit \n\ } if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) { - return FAILURE; +// return FAILURE; + exit(42); } fpm_is_running = 1; thx ++ Jerome [2012-05-23 20:54:11] js at justinsamuel dot com For simplicity here I'm going to focus on 5.3 instead of 5.4. I've tried with the following: * compiled from source (php.net tarballs) on Ubuntu 12.04 * compiled from source (php.net tarballs) on Debian 6 * Ubuntu 12.04's current php5-fpm package * CentOS 6 with current php53u-fpm package from IUS Here's the -tt info: # /opt/test/php5.3/sbin/php-fpm --fpm-config /etc/php-test/fpm.conf -tt [23-May-2012 13:07:26] NOTICE: [General] [23-May-2012 13:07:26] NOTICE: pid = /var/run/php5.3-test.pid [23-May-2012 13:07:26] NOTICE: error_log = /var/log/php5.3-test.log [23-May-2012 13:07:26] NOTICE: syslog.ident = php-fpm [23-May-2012 13:07:26] NOTICE: syslog.facility = 24 [23-May-2012 13:07:26] NOTICE: log_level = unknown value [23-May-2012 13:07:26] NOTICE: emergency_restart_interval = 0s [23-May-2012 13:07:26] NOTICE: emergency_restart_threshold = 0 [23-May-2012 13:07:26] NOTICE: process_control_timeout = 0s [23-May-2012 13:07:26] NOTICE: process.max = 0 [23-May-2012 13:07:26] NOTICE: daemonize = yes [23-May-2012 13:07:26] NOTICE: rlimit_files = 0 [23-May-2012 13:07:26] NOTICE: rlimit_core = 0 [23-May-2012 13:07:26] NOTICE: events.mechanism = epoll [23-May-2012 13:07:26] NOTICE: [23-May-2012 13:07:26] NOTICE: [example.com] [23-May-2012 13:07:26] NOTICE: prefix = undefined [23-May-2012 13:07:26] NOTICE: user = fakeuser [23-May-2012 13:07:26] NOTICE: group = fakegroup [23-May-2012 13:07:26] NOTICE: listen = /tmp/php5.3-test.sock [23-May-2012 13:07:26] NOTICE: listen.backlog = 128 [23-May-2012 13:07:26] NOTICE: listen.owner = root [23-May-2012 13:07:26] NOTICE: listen.group = root [23-May-2012 13:07:26] NOTICE: listen.mode = 0700 [23-May-2012 13:07:26] NOTICE: listen.allowed_clients = undefined [23-May-2012 13:07:26] NOTICE: pm = ondemand [23-May-2012 13:07:26] NOTICE: pm.max_children = 1 [23-May-2012 13:07:26] NOTICE: pm.start_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.min_spare_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.max_spare_servers = 0 [23-May-2012 13:07:26] NOTICE: pm.process_idle_timeout = 10 [23-May-2012 13:07:26] NOTICE: pm.max_requests = 0 [23-May-2012 13:07:26] NOTICE: pm.status_path = undefined [23-May-2012 13:07:26] NOTICE: ping.path = undefined [23-May-2012 13:07:26] NOTICE: ping.response = undefined [23-May-2012 13:07:26] NOTICE: access.log = undefined [23-May-2012 13:07:26] NOTICE: access.format = undefined [23-May-2012 13:07:26] NOTICE: slowlog = undefined [23-May-2012 13:07:26] NOTICE: request_slowlog_timeout = 0s [23-May-2012 13:07:26] NOTICE: request_terminate_timeout = 0s [23-May-2012 13:07:26] NOTICE: rlimit_files = 0 [23-May-2012 13:07:26] NOTICE: rlimit_core = 0 [23-May-2012 13:07:26] NOTICE: chroot = undefined [23-May-2012 13:07:26] NOTICE: chdir = undefined [23-May-2012 13:07:26] NOTICE: catch_workers_output = no [23-May-2012 13:07:26] NOTICE: security.limit_extensions = .php .phar [23-May-2012 13:07:26] NOTICE: [23-May-2012 13:07:26] NOTICE: configuration file /etc/php-test/fpm.conf test is successful Here's the version info for builds I've repeated this problem with. I have
Bug #62033 [Asn->Fbk]: php-fpm exits with status 0 on some failures to start
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1 ID: 62033 Updated by: f...@php.net Reported by:js at justinsamuel dot com Summary:php-fpm exits with status 0 on some failures to start -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Linux (Ubuntu 12.04) PHP Version:5.4.3 Assigned To: fat Block user comment: N Private report: N New Comment: Hi again, here is a new revision of the patch. Now, when daemonized, the calling process register 2 signal handler for USR1 and USR2 just before forking the master process. After initialization ends on the master process, it sends USR1 if successful or USR2 otherwise to the calling process. On USR1 signal, the calling process exits with 0, on USR2 it exists with error 78 (EX_CONFIG) and if does not receive anything, there's a 10 seconds timeout to exit with code 70 (EX_SOFTWARE). Can you please test it ? thx ++ Jerome Previous Comments: [2012-05-25 08:48:17] f...@php.net The following patch has been added/updated: Patch Name: bug62033-v2.patch Revision: 1337935697 URL: https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033-v2.patch&revision=1337935697 [2012-05-24 00:08:03] js at justinsamuel dot com I've tested this patch with the current PHP-5.3. The problem still persists. A quick look with strace makes it seem that a child process is exiting with the status that is expected from the patch (78) but its parent is not. # rm -f /tmp/php-fpm.strace.* # strace -o /tmp/php-fpm.strace -ff -f /opt/test/php5.3/sbin/php-fpm --fpm-config /root/php-test/fpm.conf [23-May-2012 18:54:57] ERROR: [pool example.com] cannot get uid for user 'fakeuser' [23-May-2012 18:54:57] ERROR: FPM initialization failed # echo $? 0 # ll /tmp/php-fpm.strace.* -rw-r--r-- 1 root root 25282 May 23 18:54 /tmp/php-fpm.strace.996 -rw-r--r-- 1 root root 4125 May 23 18:54 /tmp/php-fpm.strace.997 # grep -B 2 exit /tmp/php-fpm.strace.* /tmp/php-fpm.strace.996-clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f2e60ff19d0) = 997 /tmp/php-fpm.strace.996-munmap(0x7f2e60f6, 323584) = 0 /tmp/php-fpm.strace.996:exit_group(0) = ? -- /tmp/php-fpm.strace.997-write(3, "[23-May-2012 18:54:57] ERROR: FP"..., 56) = 56 /tmp/php-fpm.strace.997-write(2, "[23-May-2012 18:54:57] ERROR: FP"..., 56) = 56 /tmp/php-fpm.strace.997:exit_group(78) = ? Thanks, Justin [2012-05-23 22:51:57] f...@php.net I've attached a real patch to this bug report. Can you please test it ? thx ++ Jerome [2012-05-23 22:50:51] f...@php.net The following patch has been added/updated: Patch Name: bug62033.patch Revision: 1337813451 URL: https://bugs.php.net/patch-display.php?bug=62033&patch=bug62033.patch&revision=1337813451 [2012-05-23 22:10:59] f...@php.net This is strange ... can you please test the following patch and see if exit code is 42 on error ? diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 95a7623..62c1b69 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1803,7 +1803,8 @@ consult the installation file that came with this distribution, or visit \n\ } if (0 > fpm_init(argc, argv, fpm_config ? fpm_config : CGIG(fpm_config), fpm_prefix, fpm_pid, test_conf, php_allow_to_run_as_root)) { - return FAILURE; +// return FAILURE; + exit(42); } fpm_is_running = 1; thx ++ Jerome 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 https://bugs.php.net/bug.php?id=62033 -- Edit this bug report at https://bugs.php.net/bug.php?id=62033&edit=1
Bug #62153 [Opn->Ana]: when using unix sockets, multiples FPM instances can be launched without errors
Edit report at https://bugs.php.net/bug.php?id=62153&edit=1 ID: 62153 Updated by: f...@php.net Reported by:f...@php.net Summary:when using unix sockets, multiples FPM instances can be launched without errors -Status: Open +Status: Analyzed Type: Bug Package:FPM related Operating System: linux PHP Version:5.3Git-2012-05-25 (Git) -Assigned To: +Assigned To: fat Block user comment: N Private report: N Previous Comments: [2012-05-25 08:57:22] f...@php.net Description: if a pool is listening to a local unix socket, the first instance to be launched create the socket and listen to it If a second instance is run, it erases the socket created by the first instance and creates its own. Resulting an inactive but runnung instance of FPM (the first one). The second instance should be able to detect if the unix socket already exists AND is already in used. -- Edit this bug report at https://bugs.php.net/bug.php?id=62153&edit=1
Bug #62033 [Fbk->Csd]: php-fpm exits with status 0 on some failures to start
Edit report at https://bugs.php.net/bug.php?id=62033&edit=1 ID: 62033 Updated by: f...@php.net Reported by:js at justinsamuel dot com Summary:php-fpm exits with status 0 on some failures to start -Status: Feedback +Status: Closed Type: Bug Package:FPM related Operating System: Linux (Ubuntu 12.04) PHP Version:5.4.3 Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-05-25 19:15:20] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=a28fe034f2d5253e0fbefafc6a7938df9db7319e Log: - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start). [2012-05-25 19:15:19] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=c2f33fb1293cbcdc94daefb8583ca13e98b5c826 Log: - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start) [2012-05-25 19:15:18] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=bf9120ecae6e4653dbb5a1b0576f0b163afd6846 Log: - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start) [2012-05-25 16:19:53] js at justinsamuel dot com With the v2 patch this is working as expected: # /opt/test/php5.3/sbin/php-fpm --fpm-config /root/php-test/fpm.conf [25-May-2012 11:08:17] ERROR: [pool example.com] cannot get uid for user 'fakeuser' [25-May-2012 11:08:17] ERROR: FPM initialization failed # echo $? 78 Thanks! Justin [2012-05-25 08:52:06] f...@php.net Hi again, here is a new revision of the patch. Now, when daemonized, the calling process register 2 signal handler for USR1 and USR2 just before forking the master process. After initialization ends on the master process, it sends USR1 if successful or USR2 otherwise to the calling process. On USR1 signal, the calling process exits with 0, on USR2 it exists with error 78 (EX_CONFIG) and if does not receive anything, there's a 10 seconds timeout to exit with code 70 (EX_SOFTWARE). Can you please test it ? thx ++ Jerome 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 https://bugs.php.net/bug.php?id=62033 -- Edit this bug report at https://bugs.php.net/bug.php?id=62033&edit=1
Bug #62153 [Ana->Csd]: when using unix sockets, multiples FPM instances can be launched without errors
Edit report at https://bugs.php.net/bug.php?id=62153&edit=1 ID: 62153 Updated by: f...@php.net Reported by:f...@php.net Summary:when using unix sockets, multiples FPM instances can be launched without errors -Status: Analyzed +Status: Closed Type: Bug Package:FPM related Operating System: linux PHP Version:5.3Git-2012-05-25 (Git) Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-05-25 19:23:53] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=eeba67914ebe02de279f0188be739b78c7a76958 Log: - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors) [2012-05-25 19:23:52] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=d90003b5491c576ab28c3999c8f3121d6c0d06f1 Log: - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors) [2012-05-25 19:23:51] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=a7761262f70d660cd20ec698c453b8daa922f422 Log: - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors) [2012-05-25 08:57:22] f...@php.net Description: if a pool is listening to a local unix socket, the first instance to be launched create the socket and listen to it If a second instance is run, it erases the socket created by the first instance and creates its own. Resulting an inactive but runnung instance of FPM (the first one). The second instance should be able to detect if the unix socket already exists AND is already in used. -- Edit this bug report at https://bugs.php.net/bug.php?id=62153&edit=1
Req #62160 [Opn->Ana]: Add Option: Low-Priority Pool
Edit report at https://bugs.php.net/bug.php?id=62160&edit=1 ID: 62160 Updated by: f...@php.net Reported by:geeky at geeky dot de Summary:Add Option: Low-Priority Pool -Status: Open +Status: Analyzed Type: Feature/Change Request Package:FPM related Operating System: Debian 6.0 PHP Version:5.4.4RC1 -Assigned To: +Assigned To: fat Block user comment: N Private report: N Previous Comments: [2012-05-25 17:26:54] geeky at geeky dot de Description: It would be nice if a pool could be set to "low priority pool" (or even set a priority). Example: a website consisting of two parts: (1) frontend: responsive-time is essential here (2) background-synchronisation: should not slow down frontend, response-time is not important. In this case the background-pool should only use minimal/unused cpu-time in order to keep the frontend-pool at full speed. -- Edit this bug report at https://bugs.php.net/bug.php?id=62160&edit=1
Req #62160 [Ana->Csd]: Add process.priority to set nice(2) priorities
Edit report at https://bugs.php.net/bug.php?id=62160&edit=1 ID: 62160 Updated by: f...@php.net Reported by:geeky at geeky dot de Summary:Add process.priority to set nice(2) priorities -Status: Analyzed +Status: Closed Type: Feature/Change Request Package:FPM related Operating System: Debian 6.0 PHP Version:5.4.4RC1 Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Added process.priority to [general] and to pools section in the configuration file. [general] ... process.priority = 4 ... [pool_high_prio] ... process.priority = -15 ... [pool_low_prio] ... process.priority = 15 ... Previous Comments: [2012-05-26 16:24:39] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=7127135c8705d947a01ee637444c1db2adf37b1d Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities) [2012-05-26 16:24:38] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=decc394a2089b955a175aed0091044d0fc3d1aab Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities) [2012-05-26 16:24:37] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=f6655b62d8273a4d1276d98491bf49bb197821fe Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities) [2012-05-25 19:44:12] geeky at geeky dot de Yes, that would be perfect [2012-05-25 19:29:48] f...@php.net FPM is not design to manage priority between its processes. It just stop/start/restart/watch them. One thing which can be done is to play with nice(2) or setpriority(2). We can add a priority=[-19,20] parameter in the configuration file for each pool and the corresponding priority will be set when processes will be created. Is that something that can fit your needs ? thx for the answer. ++ fat 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 https://bugs.php.net/bug.php?id=62160 -- Edit this bug report at https://bugs.php.net/bug.php?id=62160&edit=1
Bug #61099 [Asn->Fbk]: FPM - memory corruption in request parsing code
Edit report at https://bugs.php.net/bug.php?id=61099&edit=1 ID: 61099 Updated by: f...@php.net Reported by:socrtp at soclab dot pl Summary:FPM - memory corruption in request parsing code -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Linux PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Can you please post your nginx configuration (don't forget to include fastcgi.conf if it's included in your configuration). thx ++ Jerome Previous Comments: [2012-02-15 20:58:14] socrtp at soclab dot pl Description: I've found a bug in FPM code. Sometimes the worker process segfaults. I spent some time debugging it and now I'm able to reproduce this bug. Following data was collected on Debian Linux with PHP packages from dotdeb (www.dotdeb.org). I can test this on other distro with PHP compiled from sources if needed. PHP version used here is PHP 5.3.6, but the bug is also present in 5.3.10. Configuration is simple, nginx redirects ^(.*)$ to /index.php/$1. The request looks like this: http://ttt/aa.php "ttt" is the vhost used for testing. The important things here are: exact size of query string, ".php" suffix. Next important thing is the freshness of php-fpm process. The process will always segfault when this request is the first request processed. Otherwise the process may survive the request - don't know whether it corrupts any data at affected pointer. Also I know that my nginx configuration is buggy - nginx should call just index.php - but PHP process shouldn't segfault in any case. php.ini that can be used to trigger the bug is the original php.ini-production with only one modification: cgi.fix_pathinfo = 1 Modules loaded seems to have no influence on the bug. ltrace from accepting the connection to crash: http://pastebin.com/UDuET7Sv strace (contains full dump of data received from socket): http://pastebin.com/b1Ad9AAh Backtrace (5.3.6): #0 _zend_hash_add_or_update (ht=0x1fe79e8, arKey=0xb45047 "SCRIPT_NAME", nKeyLength=12, pData=0x7fff8598f1f0, nDataSize=8, pDest=0x7fff8598ee78, flag=7648604) at /usr/src/php5/source/php5-5.3.6/Zend/zend_hash.c:418 #1 0x0074b55c in fcgi_putenv (req=0x7fff8598f1f0, var=0xca59ccba5f40 , var_len=11, val=0x1fe9538 "") at /usr/src/php5/source/php5-5.3.6/sapi/fpm/fpm/fastcgi.c:1096 #2 0x00753bc7 in main (argc=33455768, argv=0x1fe8d60) at /usr/src/php5/source/php5-5.3.6/sapi/fpm/fpm/fpm_main.c:1255 Backtrace (5.3.10): (gdb) bt #0 _zend_hash_add_or_update (ht=0x279fb08, arKey=0xb4c7cb "SCRIPT_NAME", nKeyLength=12, pData=0x7fff1bd33ac0, nDataSize=8, pDest=0x7fff1bd33758, flag=766) at /usr/src/php5/source/php5-5.3.10/Zend/zend_hash.c:418 #1 0x0074f33c in fcgi_putenv (req=0x7fff1bd33ac0, var=0xca59ccba5f40 , var_len=11, val=0x27a1560 "") at /usr/src/php5/source/php5-5.3.10/sapi/fpm/fpm/fastcgi.c:1067 #2 0x00759114 in main (argc=41549640, argv=0x27a0c90) at /usr/src/php5/source/php5-5.3.10/sapi/fpm/fpm/fpm_main.c:1189 Headers received by PHP process from nginx (extracted from strace dump): QUERY_STRING REQUEST_METHOD GET CONTENT_TYPE CONTENT_LENGTH SCRIPT_NAME /index.php/aaa.php REQUEST_URI /aaa.php DOCUMENT_URI /index.php/aaa.php DOCUMENT_ROOT /tmp/ttt SERVER_PROTOCOL HTTP/1.1 HTTPS off GATEWAY_INTERFACE CGI/1.1 SERVER_SOFTWARE nginx/1.0.12 REMOTE_ADDR 127.0.0.1 REMOTE_PORT 38004 SERVER_ADDR 127.0.0.1 SERVER_PORT 80 SERVER_NAME ttt REDIRECT_STATUS 200 SCRIPT_FILENAME /tmp/ttt/index.php/aaa.php PATH_INFO PATH_TRANSLATED /tmp/ttt/index.php/aaa.php SERVER_NAME ttt HTTP_USER_AGENT curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6 HTTP_HOST ttt HTTP_PROXY_CONNECTION Keep-Alive -- Edit this bug report at https://bugs.php.net/bug.php?id=61099&edit=1
Bug #61218 [Asn->Csd]: FPM drops connection while receiving some binary values in FastCGI requests
Edit report at https://bugs.php.net/bug.php?id=61218&edit=1 ID: 61218 Updated by: f...@php.net Reported by:bruzh2 at gmail dot com Summary:FPM drops connection while receiving some binary values in FastCGI requests -Status: Assigned +Status: Closed Type: Bug Package:FPM related Operating System: Ubuntu 10.04.4 LTS x64 PHP Version:5.3.10 Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-05-26 17:29:11] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=78de6eb03d3a24691d9f535e2cbe768a9ba8bd48 Log: Fixed bug #61218 (FPM drops connection while receiving some binary values in FastCGI requests) [2012-05-26 17:29:10] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=60cca8b9c9b879295dbf1f76e305882e347dcb53 Log: Fixed bug #61218 (FPM drops connection while receiving some binary values in FastCGI requests) [2012-05-26 17:29:09] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=e7ff3e839b4c2a3423729b07ba1d40f45f1d2983 Log: Fixed bug #61218 (FPM drops connection while receiving some binary valuesin FastCGI requests) [2012-03-02 03:14:21] bruzh2 at gmail dot com linux command line to send HTTP request to nginx: echo -e "GET /test.php HTTP/1.1\nHost: tmp\nConnection: close\n" | nc localhost 80 nginx response: HTTP/1.1 502 Bad Gateway Server: nginx/0.7.68 Date: Thu, 01 Mar 2012 10:39:21 GMT Content-Type: text/html; charset=utf-8 Content-Length: 173 Connection: close Set-Cookie: ngs_uid=fwAAAU9PUdk/Oi4mAwMJAg==; expires=Sun, 27-Feb-22 10:39:21 GMT; domain=ngs.ru; path=/ P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" 502 Bad Gateway 502 Bad Gateway nginx/0.7.68 Take note this is LOCAL connection to nginx. Further nginx transmits 4 bytes ('127.0.0.1' = 0x7f 0x00 0x00 0x01) in the 'BREMOTE_ADDR' FastCGI value. And PHP-FPM drops FastCGI connection after receiving non-zero ended binary sequence in the FastCGI value. Any other connection from HTTP client without zeroes in the IPv4 address would work. [2012-03-02 03:04:11] bruzh2 at gmail dot com php.ini http://www.box.com/s/bpuv2ngqoh4mog8srl4d php-fpm.conf http://www.box.com/s/o81ruvvf8gx31sd456qm 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 https://bugs.php.net/bug.php?id=61218 -- Edit this bug report at https://bugs.php.net/bug.php?id=61218&edit=1
Bug #60891 [Ana->Fbk]: FPM status serving should be moved to the master process
Edit report at https://bugs.php.net/bug.php?id=60891&edit=1 ID: 60891 Updated by: f...@php.net Reported by:erno dot kovacs at freemail dot hu Summary:FPM status serving should be moved to the master process -Status: Analyzed +Status: Feedback Type: Bug Package:FPM related Operating System: Any PHP Version:5.3.9 Assigned To: fat Block user comment: N Private report: N New Comment: Here is the first revision of the patch (it needs some verifications and there should be some missing free(), but it works on my side). It can be applied on the last 5.3 snapshot (not sure it will applies correctly on older version/revision). Here's what's new: - new FPM configuration item for pool: pm.status_allow which is unset by default. Add the names of the other pool you want to access from this pool (use a comma (,) as a separator). If one of the element is the char '*', then all pool are available from this pool status page - call the status page of this pool adding a pool=xxx in the query string and there it's supposed to work Exemple: for having a dedicated pool which only respond to the /status page and permit to see all pools status : add the following pool to your php-fpm.conf [status] listen=/tmp/status.sock user = nobody ;use a low privilege user, nothing is needed here group = nogroup pm = ondemand pm.max_children = 1 ;set a higher value if you need parallal requesting to the status page pm.status_path = /status pm.status_allow = * ; allow to see all pool status chroot = /var/empty ; chroot to un empty directory for security reason security.limit_extensions = .nonexistantextesionx ; limit to only one neverused extension it'll only respond to the /status page (because of the pseudo random security.limit_extensions) and it's possible to see all pool status page: http://xxx/status?pool=pool1 http://xxx/status?pool=pool2&full http://xxx/status?pool=pool3&json&full Waiting to here from you on this. ++ fat Previous Comments: [2012-05-28 23:08:16] f...@php.net The following patch has been added/updated: Patch Name: bug60891-v1.patch Revision: 1338246496 URL: https://bugs.php.net/patch-display.php?bug=60891&patch=bug60891-v1.patch&revision=1338246496 [2012-01-26 14:57:22] ml at fatbsd dot com for security reason and by design it's not possible to make the master process to listen to those requests. The only possibility is to fork another process only to handle this. And this is quite a a big change. It's on my todo list but no ETA yet. ++ fat [2012-01-26 13:08:01] erno dot kovacs at freemail dot hu Description: When the server is overloaded, you cant query the FPM status page, however it should be its primary goal: being able to check whats going on. This way this cool feature is pointless. Test script: --- fpm conf: pm = dynamic pm.max_children = 1 pm.start_servers = 1 pm.min_spare_servers = 1 pm.max_spare_servers = 1 test script: And while the only worker process is sleeping, send a query to the status page. It wont be served. Expected result: Status page. Actual result: -- Hanging -- Edit this bug report at https://bugs.php.net/bug.php?id=60891&edit=1
Bug #62205 [Asn->Csd]: php-fpm segfaults (null passed to strstr)
Edit report at https://bugs.php.net/bug.php?id=62205&edit=1 ID: 62205 Updated by: f...@php.net Reported by:alp at rsu dot ru Summary:php-fpm segfaults (null passed to strstr) -Status: Assigned +Status: Closed Type: Bug Package:Unknown/Other Function Operating System: ubuntu linux 12.04 PHP Version:5.4Git-2012-06-01 (Git) Assigned To: fat Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-06-01 09:30:58] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=4fc989fbbd0405d200872219b409f685a495f3aa Log: - Fixed bug #62205 (php-fpm segfaults (null passed to strstr)) [2012-06-01 09:30:57] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=238caeb63c4f4faf67b9f8de62a753eb3e954dbe Log: - Fixed bug #62205 (php-fpm segfaults (null passed to strstr)) [2012-06-01 09:27:52] f...@php.net Automatic comment on behalf of fat Revision: http://git.php.net/?p=php-src.git;a=commit;h=38ca8cb7a12548b44b942ddd4fb2628b70bc6612 Log: - Fixed bug #62205 (php-fpm segfaults (null passed to strstr)) [2012-06-01 08:49:35] f...@php.net I'm on it. I've found this bug few days ago and I was waiting to finitsh something in the fpm_status code to fix this bug. I'll fix this now but I won't use the patch as there's something cleaner to check the presence of some parameters in the query string. i'll try to push this patch this morning. [2012-06-01 08:46:56] larue...@php.net the patch looks good, but it is better assign this to fat, and ask for his reviewing :) thanks 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 https://bugs.php.net/bug.php?id=62205 -- Edit this bug report at https://bugs.php.net/bug.php?id=62205&edit=1
Bug #62418 [Opn->Fbk]: php-fpm master process crashes
Edit report at https://bugs.php.net/bug.php?id=62418&edit=1 ID: 62418 Updated by: f...@php.net Reported by:php at scratchspace dot com Summary:php-fpm master process crashes -Status: Open +Status: Feedback Type: Bug Package:FPM related Operating System: CentOS 6.2 x86_x64 PHP Version:5.3.14 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. If you were able to give us a complete and detailed stack trace it would be useful. thx Previous Comments: [2012-06-27 20:10:08] ras...@php.net Not sure. Many people out there run with epoll without problems. [2012-06-27 18:28:14] php at scratchspace dot com We've been up and running for 24 hours with "events.mechanism = poll" and no problems. Let's give it a couple of days to be sure this workaround works. Is this issue specific to epoll and the way we have php-fpm configured (to use minimal resources), or is this is a bug in php-fpm that can ultimately be fixed? [2012-06-26 06:10:02] ras...@php.net Could you check if it is related to epoll? In your php-fpm.conf file, set: events.mechanism = poll to try with "poll" instead. You can also try setting it to "select" [2012-06-26 05:56:45] php at scratchspace dot com Description: php-fpm master process crashes randomly on lightly loaded server running nginx/0.8.54 with various CMS applications. It is unknown how to reproduce the crash, but occurs in both php 5.3.13 and 5.3.14. Actual result: -- 5.3.14 backtrace Core was generated by `php-fpm:'. Program terminated with signal 11, Segmentation fault. #0 0x016b5300 in ?? () #1 0x006e02f3 in fpm_event_epoll_wait (queue=, timeout=) at /usr/src/debug/php-5.3.14/sapi/fpm/fpm/events/epoll.c:143 #2 0x006d508f in fpm_event_loop (err=0) at /usr/src/debug/php- 5.3.14/sapi/fpm/fpm/fpm_events.c:401 #3 0x006d01f7 in fpm_run (max_requests=0x7fffd103136c) at /usr/src/debug/php-5.3.14/sapi/fpm/fpm/fpm.c:110 #4 0x006d79a4 in main (argc=1, argv=0x7fffd10334d8) at /usr/src/debug/php-5.3.14/sapi/fpm/fpm/fpm_main.c:1778 -- Edit this bug report at https://bugs.php.net/bug.php?id=62418&edit=1
Bug #62279 [Opn->Ana]: PHP-FPM chroot never-solved problems (extends #55322)
Edit report at https://bugs.php.net/bug.php?id=62279&edit=1 ID: 62279 Updated by: f...@php.net Reported by:nospam at bigalex dot it Summary:PHP-FPM chroot never-solved problems (extends #55322) -Status: Open +Status: Analyzed Type: Bug Package:FPM related Operating System: Irrelevant PHP Version:Any -Assigned To: +Assigned To: fat Block user comment: N Private report: N New Comment: >From my point of view, I'd rather prefer to configure this on the web server side (if it's not possible with apache then switch to something else -- aka nginx for exemple. If apache does not suit well with fastcgi customizations, then ask apache guys :p) more seriously, I can understand the need. I'll try to look at this to dynamicaly adapt fastcgi variables from the chroot env. The following algorithm should work: for variable in all_fastcgi_variables; do if ($_SERVER[$var] =~ /^$chroot(.*)$/); then $_SERVER[$var] = $1; fi done or somehting more restrictive: for var in "DOCUMENT_ROOT" "SCRIPT_FILENAME" "PATH_TRANSLATED"]; do if ($_SERVER[$var] =~ /^$chroot(.*)$/); then $_SERVER[$var] = $1; fi end Previous Comments: [2012-06-28 17:45:34] nospam at bigalex dot it In the meantime, I've already found a way to fix this behaviour: a proxy between PHP-FPM and Apache. I needed a caching proxy to be on top of Apache to cache php scripts (I don't care about static files because what really causes CPU and memory problems is having the php processes running), so I've thought to implement a fcgi proxy to be used among PHP-FPM and Apache. It does work and does a great job: I didn't need to implement anything about the HTTP protocol since there's already Apache caring about it; then, caching the results from PHP, I can avoid asking FPM to run the already cached pages, giving them away to Apache in an elegant manner. And, of course, the proxy does fix the wrong variables, removing the chrooted part and making the scripts able to work. I'm still trying to fix the sources, but since they appears complicated (read: messy), and there's no documentation about it or about debugging them, I don't think I will fix them before I have more time to spend or having a clue about reading the configuration values from fpm_main.c. Anyway, for anyone interested in it, the proxy has been made using python and flup server and client implementations. [2012-06-28 16:02:03] graham at wyenet dot net The symbolic trick does work (as long as the sym link is relative (ie ../../../chrootpath if you try to link directly from the root, then the symlink goes outside the jail and it will still fail). Anyway thats a very messy hack, and I agree with you, php-fpm creates the jails, so it should fix the PHP variables. Without the symlink, I just get file not found for all calls for scripts. If you change fix.cgi_pathinfo = 0 it will run the scripts, but the $_SERVER variables will still be wrong... Im sure most people would rather it was fixed so that the fix.cgi_pathinfo = 1 works, AND the variables are set correctly... But either way would be better than trying to hack in fixes with sym links, and/or preloading a fixup script. I did take a look at the fpm_main.c but also been unable to create my own patch for it at this time. Surely it cant be that hard to read the chroot path from the configuration file, and remove that from all appropriate server variables, or recreate the broken variables some other way. Symlink is good enough for a test environment, to see what other php functions break with the chroot, and to start building a system, but I wouldn't use that hack on a production web server. [2012-06-24 16:25:15] nospam at bigalex dot it I want to patch the sources, but can't find a way to get from the function init_request_info info fpm_main.c the chroot path. Since the documentation about it lacks, can anyone put me in the right direction? :P I think I need to get the configuration (or add a variable to the worker) about the current chroot location. A more safe way to handle it would be to get, from the father process, the child's chroot location and filter it before passing the variables to the child. Anyway, in both cases, there is lack of documentation and I've still been unable to patch anything, so suggestions would be really appreciated! :) [2012-06-09 17:45:35] nospam at bigalex dot it Edited the php version, since it affec
Req #62216 [Opn->Ana]: Add PID to php-fpm init.d script
Edit report at https://bugs.php.net/bug.php?id=62216&edit=1 ID: 62216 Updated by: f...@php.net Reported by:jasmin_z at hotmail dot com Summary:Add PID to php-fpm init.d script -Status: Open +Status: Analyzed Type: Feature/Change Request Package:FPM related Operating System: Debian 6 PHP Version:5.4.3 -Assigned To: +Assigned To: fat Block user comment: N Private report: N Previous Comments: [2012-06-03 16:20:28] jasmin_z at hotmail dot com Description: sapi/fpm/init.d.php-fpm file provided with current PHP build used for init.d script in Debian is missing PID option causing init script to look as it failed: # /etc/init.d/php-fpm start Starting php-fpm ... failed Replacing following line in php-fpm init.d file: php_opts="--fpm-config $php_fpm_CONF" to: php_opts="--fpm-config $php_fpm_CONF --pid $php_fpm_PID" fixes the issue! -- Edit this bug report at https://bugs.php.net/bug.php?id=62216&edit=1
Bug #62279 [Ana]: PHP-FPM chroot never-solved problems (extends #55322)
Edit report at https://bugs.php.net/bug.php?id=62279&edit=1 ID: 62279 Updated by: f...@php.net Reported by:nospam at bigalex dot it Summary:PHP-FPM chroot never-solved problems (extends #55322) Status: Analyzed Type: Bug Package:FPM related Operating System: Irrelevant PHP Version:Any Assigned To: fat Block user comment: N Private report: N New Comment: I used pseudo bash syntax but it'll be implemanted inside fpm (with C code) Previous Comments: [2012-07-04 16:48:00] nospam at bigalex dot it Thank your for your support but I'm sorry, I think I didn't understand your fix: does php-fpm chroot works starting it from bash, or how could it be implemented the way you said (from inside fpm I mean)? [2012-07-04 10:38:14] f...@php.net >From my point of view, I'd rather prefer to configure this on the web server side (if it's not possible with apache then switch to something else -- aka nginx for exemple. If apache does not suit well with fastcgi customizations, then ask apache guys :p) more seriously, I can understand the need. I'll try to look at this to dynamicaly adapt fastcgi variables from the chroot env. The following algorithm should work: for variable in all_fastcgi_variables; do if ($_SERVER[$var] =~ /^$chroot(.*)$/); then $_SERVER[$var] = $1; fi done or somehting more restrictive: for var in "DOCUMENT_ROOT" "SCRIPT_FILENAME" "PATH_TRANSLATED"]; do if ($_SERVER[$var] =~ /^$chroot(.*)$/); then $_SERVER[$var] = $1; fi end [2012-06-28 17:45:34] nospam at bigalex dot it In the meantime, I've already found a way to fix this behaviour: a proxy between PHP-FPM and Apache. I needed a caching proxy to be on top of Apache to cache php scripts (I don't care about static files because what really causes CPU and memory problems is having the php processes running), so I've thought to implement a fcgi proxy to be used among PHP-FPM and Apache. It does work and does a great job: I didn't need to implement anything about the HTTP protocol since there's already Apache caring about it; then, caching the results from PHP, I can avoid asking FPM to run the already cached pages, giving them away to Apache in an elegant manner. And, of course, the proxy does fix the wrong variables, removing the chrooted part and making the scripts able to work. I'm still trying to fix the sources, but since they appears complicated (read: messy), and there's no documentation about it or about debugging them, I don't think I will fix them before I have more time to spend or having a clue about reading the configuration values from fpm_main.c. Anyway, for anyone interested in it, the proxy has been made using python and flup server and client implementations. [2012-06-28 16:02:03] graham at wyenet dot net The symbolic trick does work (as long as the sym link is relative (ie ../../../chrootpath if you try to link directly from the root, then the symlink goes outside the jail and it will still fail). Anyway thats a very messy hack, and I agree with you, php-fpm creates the jails, so it should fix the PHP variables. Without the symlink, I just get file not found for all calls for scripts. If you change fix.cgi_pathinfo = 0 it will run the scripts, but the $_SERVER variables will still be wrong... Im sure most people would rather it was fixed so that the fix.cgi_pathinfo = 1 works, AND the variables are set correctly... But either way would be better than trying to hack in fixes with sym links, and/or preloading a fixup script. I did take a look at the fpm_main.c but also been unable to create my own patch for it at this time. Surely it cant be that hard to read the chroot path from the configuration file, and remove that from all appropriate server variables, or recreate the broken variables some other way. Symlink is good enough for a test environment, to see what other php functions break with the chroot, and to start building a system, but I wouldn't use that hack on a production web server. [2012-06-24 16:25:15] nospam at bigalex dot it I want to patch the sources, but can't find a way to get from the function init_request_info info fpm_main.c the chroot path. Since the documentation about it lacks, can anyone put me in the right direction? :P I think I need to get the configuration (or add a variable to the worker) about the current chroot locati
Bug #62886 [Asn->Fbk]: PHP-FPM may segfault/hang on startup
Edit report at https://bugs.php.net/bug.php?id=62886&edit=1 ID: 62886 Updated by: f...@php.net Reported by:pierre at archlinux dot de Summary:PHP-FPM may segfault/hang on startup -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Arch Linux PHP Version:5.4.6 Assigned To: fat Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. COuld you please provide the full backtrace please ? if it's possible, it would be great to enable debug symbols at compilation time thx Previous Comments: [2012-08-23 15:41:13] larue...@php.net fat, could you please look at this one? [2012-08-22 08:26:25] pierre at archlinux dot de Description: Since PHP 5.4.5 starting php-fpm will either result in a segmentation fault or it will hang under certain conditions. It is a little hard to reproduce but it seems it is related to using modules. There more modules get loaded via php.ini the more likely this bug will get triggered (> 30%); with no modules loaded I was not able to trigger it. I started from 5.4.6 and reverted patches applied to sapi/fpm. Once I reverted commit c2f33fb1293cbcdc94daefb8583ca13e98b5c826, php would no longer crash or hang. See http://git.php.net/?p=php-src.git;a=commit;h=c2f33fb1293cbcdc94daefb8583ca13e98b5c826 Test script: --- Configure php with a bunch of modules and run something like this: for i in {1..100};do sudo php-fpm;sleep 0.5;sudo killall php-fpm;sleep 0.5;done watch dmesg for segfaults like php-fpm[32571]: segfault at 7f4eabe93cf8 ip 7f4eae9b1ed6 sp 7fff87d69310 error 4 in ld-2.16.so[7f4eae9a3000+21000] gdb will tell you 0x7fe0412c1ed6 in _dl_fini () from /lib/ld-linux-x86-64.so.2 Sometimes php-fpm will hang and has to be killed with kill -9. -- Edit this bug report at https://bugs.php.net/bug.php?id=62886&edit=1
Bug #62886 [Asn->Fbk]: PHP-FPM may segfault/hang on startup
Edit report at https://bugs.php.net/bug.php?id=62886&edit=1 ID: 62886 Updated by: f...@php.net Reported by:pierre at archlinux dot de Summary:PHP-FPM may segfault/hang on startup -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Arch Linux PHP Version:5.4.6 Assigned To: fat Block user comment: N Private report: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. I also need your FPM configuration and your php.ini please thanks Previous Comments: [2012-08-24 08:37:27] pierre at archlinux dot de I rebuild with debug symbols and got the following trace: Core was generated by `php-fpm'. Program terminated with signal 11, Segmentation fault. #0 0x7fc96b2c6ed6 in _dl_fini () from /lib/ld-linux-x86-64.so.2 (gdb) bt #0 0x7fc96b2c6ed6 in _dl_fini () from /lib/ld-linux-x86-64.so.2 #1 0x7fc96970cb31 in __run_exit_handlers () from /lib/libc.so.6 #2 0x7fc96970cbb5 in exit () from /lib/libc.so.6 #3 0x008cb754 in fpm_signals_sighandler_exit_ok (pid=10) at /build/src/php-5.4.6/sapi/fpm/fpm/fpm_signals.c:254 #4 #5 0x7fc96b2cf3c7 in munmap () from /lib/ld-linux-x86-64.so.2 #6 0x7fc96b2ceb4d in _dl_unmap () from /lib/ld-linux-x86-64.so.2 #7 0x7fc96b2cba1f in _dl_close_worker () from /lib/ld-linux-x86-64.so.2 #8 0x7fc96b2cc18c in _dl_close () from /lib/ld-linux-x86-64.so.2 #9 0x7fc96b2c6736 in _dl_catch_error () from /lib/ld-linux-x86-64.so.2 #10 0x7fc969fee5fc in ?? () from /lib/libdl.so.2 #11 0x7fc969fee10f in dlclose () from /lib/libdl.so.2 #12 0x00773e2c in module_destructor (module=0x1ba6050) at /build/src/php-5.4.6/Zend/zend_API.c:2284 #13 0x0077c30f in zend_hash_apply_deleter (ht=0xfb5240 , p=0x1ba5ff0) at /build/src/php-5.4.6/Zend/zend_hash.c:650 #14 0x0077c4aa in zend_hash_graceful_reverse_destroy (ht=0xfb5240 ) at /build/src/php-5.4.6/Zend/zend_hash.c:687 #15 0x00771f97 in zend_destroy_modules () at /build/src/php-5.4.6/Zend/zend_API.c:1797 #16 0x00768e9e in zend_shutdown () at /build/src/php-5.4.6/Zend/zend.c:823 #17 0x006d5151 in php_module_shutdown () at /build/src/php-5.4.6/main/main.c:2346 #18 0x008c7e23 in fpm_php_cleanup (which=2, arg=0x0) at /build/src/php-5.4.6/sapi/fpm/fpm/fpm_php.c:199 #19 0x008bc629 in fpm_cleanups_run (type=2) at /build/src/php-5.4.6/sapi/fpm/fpm/fpm_cleanup.c:45 #20 0x008cf1df in fpm_unix_init_main () at /build/src/php-5.4.6/sapi/fpm/fpm/fpm_unix.c:312 #21 0x008bb2df in fpm_init (argc=1, argv=0x7fff252a4a98, config=0x0, prefix=0x0, pid=0x0, test_conf=0, run_as_root=0) at /build/src/php-5.4.6/sapi/fpm/fpm/fpm.c:59 #22 0x008c7221 in main (argc=1, argv=0x7fff252a4a98) at /build/src/php-5.4.6/sapi/fpm/fpm/fpm_main.c:1800 [2012-08-23 22:55:51] f...@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. COuld you please provide the full backtrace please ? if it's possible, it would be great to enable debug symbols at compilation time thx [2012-08-23 15:41:13] larue...@php.net fat, could you please look at this one? [2012-08-22 08:26:25] pierre at archlinux dot de Description: Since PHP 5.4.5 starting php-fpm will either result in a segmentation fault or it will hang under certain conditions. It is a little hard to reproduce but it seems it is related to using modules. There more modules get loaded via php.ini the more likely this bug will get triggered (> 30%); with no modules loaded I was not able to trigger it. I started from 5.4.6 and reverted patches applied to sapi/fpm. Once I reverted commit c2f33fb1293cbcdc94daefb8583ca13e98b5c826, php would no longer crash or hang. See http://git.php.net/?p=php-src.git;a=commit;h=c2f33fb1293cbcdc94daefb8583ca13e98b5c826 Test script: --- Configure php with a bunch of modules and run something
Req #51595 [Opn->Csd]: passing ini settings via FASTCGI parameters
Edit report at http://bugs.php.net/bug.php?id=51595&edit=1 ID: 51595 Updated by: f...@php.net Reported by: f...@php.net Summary: passing ini settings via FASTCGI parameters -Status: Open +Status: Closed Type: Feature/Change Request Package: FPM related Operating System: any PHP Version: trunk -Assigned To: +Assigned To: fat New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. It's been commited in revision 298383 In fastcgi headers, only unique values can be passed. So you have to concatenate differentes value in one and separate them with a new line character (\n). For exemple in nginx, it could be done this way: set $php_value "pcre.backtrack_limit=424242"; set $php_value "$php_value \n pcre.recursion_limit=9"; fastcgi_param PHP_VALUE $php_value; fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www/htdocs"; In lighttpd, it seems there is no options to pass custom headers :/ Previous Comments: [2010-04-23 18:06:04] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=298383 Log: Add PHP_VALUE and PHP_ADMIN_VALUE interpretation from fastcgi headers. It works as php_value and php_admin_value from the main conf file or apache sapi. See bug (request) #51595 [2010-04-19 09:14:02] f...@php.net thanks for the correction [2010-04-19 09:03:26] paj...@php.net Change version, 5.3 does not have fpm. [2010-04-19 01:56:59] f...@php.net Description: It would be cool to be able to define ini settings directly in the web server (nginx, lighthttpd, apache) the same way it's possible for the apache sapi (php_value, php_admin_value, ...) Test script: --- no test Expected result: nginx conf sample: fastcgi_param PHP_VALUE sessions.save_path=/home/www/sessions/ fastcgi_param PHP_ADMIN_VALUE open_basedir=/home/www/docs Actual result: -- it doesn not exist -- Edit this bug report at http://bugs.php.net/bug.php?id=51595&edit=1
Bug #51736 [Asn->Csd]: configuration parsing problem
Edit report at http://bugs.php.net/bug.php?id=51736&edit=1 ID: 51736 Updated by: f...@php.net Reported by: mauro dot stettler at gmail dot com Summary: configuration parsing problem -Status: Assigned +Status: Closed Type: Bug Package: FPM related Operating System: suse linux (SLES11) PHP Version: Irrelevant Assigned To: fat New Comment: fixed in revision 299141 Previous Comments: [2010-05-08 10:54:03] f...@php.net This bug has been corrected on revision 299141. [2010-05-08 10:52:34] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=299141 Log: Fix #51736, wrong checks on dynamic parameters [2010-05-08 10:23:25] f...@php.net Can you please try the attached patch to confirm it fixes the bug ? Thx ++ Jerome [2010-05-08 10:22:21] f...@php.net The following patch has been added/updated: Patch Name: bug51736.patch Revision: 1273306941 URL: http://bugs.php.net/patch-display.php?bug=51736&patch=bug51736.patch&revision=1273306941 [2010-05-04 09:00:56] mauro dot stettler at gmail dot com Description: i tested the revision 298795 of php-fpm and i experienced that the config value of min_spare_servers always gets copied into the config value of max_spare_servers, which then means that start_servers will also have to be equal to this, Test script: --- ; Sets the number of server processes created on startup. ; Used only with 'dynamic' pm.style ; default : min_spare + (max_spare - min_spare) / 2 ; pm.start_servers = 50 ; Sets the desired minimum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.min_spare_servers = 10 ; Sets the desired maximum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.max_spare_servers = 100 Expected result: should be able to start php-fpm server Actual result: -- the result is that on start of php-fpm server, the fpm gives out a config error if you use the above pasted configuration -- Edit this bug report at http://bugs.php.net/bug.php?id=51736&edit=1
Bug #51799 [Opn->Asn]: FPM crashes if the include is enabled, but there are no files
Edit report at http://bugs.php.net/bug.php?id=51799&edit=1 ID: 51799 Updated by: f...@php.net Reported by: admin at saltwaterc dot net Summary: FPM crashes if the include is enabled, but there are no files -Status: Open +Status: Assigned Type: Bug Package: FPM related Operating System: Linux PHP Version: 5.3.2 -Assigned To: +Assigned To: fat Previous Comments: [2010-05-12 15:57:31] admin at saltwaterc dot net Description: If the include configuration option is enabled, but the pool directory is empty, php-fpm crashes pretty ugly. I could manage to enable the service by creating an empty default.conf file within the fpm.d directory, but obviously this isn't the solution. The used FPM is the latest trunk indicated by php-fpm.org http://svn.php.net/repository/php/php-src/trunk/sapi/fpm. Test script: --- The include line is: include=/usr/local/zend/etc/fpm.d/*.conf r...@test-lucid:/usr/local/zend/etc/fpm.d# ls -la total 8 drwxr-sr-x 2 root zend 4096 May 12 11:59 . drwxrwsr-x 7 root zend 4096 May 12 11:59 .. r...@test-lucid:/usr/local/zend/etc/fpm.d# Expected result: To be able to start the php-fpm service just with the default pool from php-fpm.conf if fpm.d is empty. In my humble opinion the application shouldn't crash if no pattern is matched. Actual result: -- May 12 12:10:52.239695 [ERROR] Nothing match the include pattern '/usr/local/zend/etc/fpm.d/*.conf' from /usr/local/zend/etc/php-fpm.conf at line 10. The backtrace is quite useless since the error is generated by sapi/fpm/fpm/fpm_conf.c, after the glob() call. -- Edit this bug report at http://bugs.php.net/bug.php?id=51799&edit=1
Bug #51799 [Asn->Csd]: FPM crashes if the include is enabled, but there are no files
Edit report at http://bugs.php.net/bug.php?id=51799&edit=1 ID: 51799 Updated by: f...@php.net Reported by: admin at saltwaterc dot net Summary: FPM crashes if the include is enabled, but there are no files -Status: Assigned +Status: Closed Type: Bug Package: FPM related Operating System: Linux PHP Version: 5.3.2 Assigned To: fat New Comment: This bug has been corrected in revision 299302. When glob() returns GLOB_NOMATCH, the log message has been changed from ERROR to WARNING and FPM continues to parse the conf file without stopping. Previous Comments: [2010-05-12 20:29:11] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=299302 Log: Fix #51799, when glob returns nothing, it was handle as an error instead of a warning. [2010-05-12 15:57:31] admin at saltwaterc dot net Description: If the include configuration option is enabled, but the pool directory is empty, php-fpm crashes pretty ugly. I could manage to enable the service by creating an empty default.conf file within the fpm.d directory, but obviously this isn't the solution. The used FPM is the latest trunk indicated by php-fpm.org http://svn.php.net/repository/php/php-src/trunk/sapi/fpm. Test script: --- The include line is: include=/usr/local/zend/etc/fpm.d/*.conf r...@test-lucid:/usr/local/zend/etc/fpm.d# ls -la total 8 drwxr-sr-x 2 root zend 4096 May 12 11:59 . drwxrwsr-x 7 root zend 4096 May 12 11:59 .. r...@test-lucid:/usr/local/zend/etc/fpm.d# Expected result: To be able to start the php-fpm service just with the default pool from php-fpm.conf if fpm.d is empty. In my humble opinion the application shouldn't crash if no pattern is matched. Actual result: -- May 12 12:10:52.239695 [ERROR] Nothing match the include pattern '/usr/local/zend/etc/fpm.d/*.conf' from /usr/local/zend/etc/php-fpm.conf at line 10. The backtrace is quite useless since the error is generated by sapi/fpm/fpm/fpm_conf.c, after the glob() call. -- Edit this bug report at http://bugs.php.net/bug.php?id=51799&edit=1
Bug #51821 [Asn->Csd]: configure fails to pick up a custom prefix for libevent
Edit report at http://bugs.php.net/bug.php?id=51821&edit=1 ID: 51821 Updated by: f...@php.net Reported by: admin at saltwaterc dot net Summary: configure fails to pick up a custom prefix for libevent -Status: Assigned +Status: Closed Type: Bug Package: FPM related Operating System: Linux PHP Version: 5.3.2 Assigned To: fat New Comment: fixed in trunk (revision 299485) Previous Comments: [2010-05-19 13:29:33] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=299485 Log: - #51821, fix --with-libevent-dir (patch by tony2001) [2010-05-14 14:34:40] admin at saltwaterc dot net Description: Using a custom prefix for the libevent installation (/usr/local/libevent-1.4.13) doesn't get picked up by the configure script, even though I properly used the --with-libevent-dir option. Unless the prefix for the libevent installation is a path that ldconfig knows about, the configure fails. I could "fix" it with: export LD_LIBRARY_PATH=/usr/local/libevent-$libevent_version/lib within my build script which gives me the idea that the configure fails to properly set its environment. Still an arcane method though. Test script: --- ./configure [...] --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-libevent-dir=/usr/local/libevent-1.4.13 Expected result: To run configure without errors. Actual result: -- ./configure says: checking for FPM build... yes checking for libevent >= 1.4.11 install prefix... /usr/local/libevent-1.4.13 no configure: error: build test failed. Please check the config.log for details. config.log says: configure:9409: checking for libevent >= 1.4.11 install prefix configure:9524: gcc -o conftest -g -O2 -fvisibility=hidden -I/usr/local/libevent-1.4.13/include -L/usr/local/libevent-1.4.13/lib conftest.c -levent 1>&5 configure:9724: gcc -o conftest -g -O2 -fvisibility=hidden conftest.c -L/usr/local/libevent-1.4.13/lib -levent 1>&5 configure: failed program was: #line 9713 "configure" #include "confdefs.h" char event_init(); int main() { event_init(); return 0; } -- Edit this bug report at http://bugs.php.net/bug.php?id=51821&edit=1
Req #51973 [Opn->Asn]: a way to restart single pools, enable/disable modules per pool
Edit report at http://bugs.php.net/bug.php?id=51973&edit=1 ID: 51973 Updated by: f...@php.net Reported by: slogster at gmail dot com Summary: a way to restart single pools, enable/disable modules per pool -Status: Open +Status: Assigned Type:Feature/Change Request Package: FPM related PHP Version: 5.3SVN-2010-06-02 (SVN) -Assigned To: +Assigned To: fat Previous Comments: [2010-06-02 13:01:49] slogster at gmail dot com Description: Hi, I would like to be able do enable/disable modules per pool and would also like to be able to restart single pool when I change its config. Thanks -- Edit this bug report at http://bugs.php.net/bug.php?id=51973&edit=1
Bug #51772 [Asn->Ana]: php-fpm do not support PowerPC processors
Edit report at http://bugs.php.net/bug.php?id=51772&edit=1 ID: 51772 Updated by: f...@php.net Reported by: vaskes at mail dot ru Summary: php-fpm do not support PowerPC processors -Status: Assigned +Status: Analyzed Type: Bug Package: FPM related Operating System: RedHat Ent. server 5.4-ppc64 PHP Version: 5.3.2 Assigned To: fat New Comment: I don't have a powerpc to test. I'll get some code from nginx. Do you have time to test it ? Previous Comments: [2010-06-07 11:44:26] vaskes at mail dot ru changed package to FPM related [2010-05-08 15:44:04] vaskes at mail dot ru Description: PHP-FPM sapi do not support PowerPC processor. Build server IBM JS20 bladeserver [r...@headnode ~]# uname -a Linux headnode.tst.local 2.6.18-194.el5 #1 SMP Tue Mar 16 22:03:12 EDT 2010 ppc64 ppc64 ppc64 GNU/Linux Test script: --- svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm ./buildconf --force ./configure --prefix=/opt/php --enable-fpm --build=powerpc-redhat-linux-gnu --host=powerpc-redhat-linux-gnu --target=ppc-redhat-linux-gnu make make install Expected result: Successfull compilation and php-fpm working Actual result: -- /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fastcgi.c -o sapi/fpm/fpm/fastcgi.lo /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fpm.c -o sapi/fpm/fpm/fpm.lo /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c -o sapi/fpm/fpm/fpm_children.lo In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:124:2: error: #error unsupported processor. please write a patch and send it to me In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:128: error: expected Ðââ¤)Ðâ⥠before Ðââ¤*Ðâ⥠token In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:16: error: expected specifier-qualifier-list before Ðââ¤atomic_tÐâ⥠make: *** [sapi/fpm/fpm/fpm_children.lo] Error 1 /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c -o sapi/fpm/fpm/fpm_children.lo In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:124:2: error: #error unsupported processor. please write a patch and send it to me In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:128: error: expected Ðââ¤)Ðâ⥠before Ðââ¤*Ðâ⥠token In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:16: error: expected speci
Bug #51772 [Ana]: php-fpm do not support PowerPC processors
Edit report at http://bugs.php.net/bug.php?id=51772&edit=1 ID: 51772 Updated by: f...@php.net Reported by: vaskes at mail dot ru Summary: php-fpm do not support PowerPC processors Status: Analyzed Type: Bug Package: FPM related Operating System: RedHat Ent. server 5.4-ppc64 PHP Version: 5.3.2 Assigned To: fat New Comment: trunk seems to be broken. please try to apply the patch in PHP_5_3 branch instead. Previous Comments: [2010-06-09 11:29:52] vaskes at mail dot ru I can provide ssh access to ppc server. [2010-06-09 11:29:09] vaskes at mail dot ru After applying this patch i got following error: sapi/fpm/fpm/fpm_main.o: In function `main': /home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1698: undefined reference to `php_output_end_all' /home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1699: undefined reference to `php_output_deactivate' /home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1639: undefined reference to `php_output_end_all' /home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1640: undefined reference to `php_output_deactivate' sapi/fpm/fpm/fpm_main.o: In function `zif_fastcgi_finish_request': /home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1496: undefined reference to `php_output_end_all' collect2: ld returned 1 exit status make: *** [sapi/fpm/php-fpm] Error 1 [r...@headnode php-5.3.2]# [2010-06-08 11:46:13] tony2...@php.net Please try the patch attached. [2010-06-08 11:45:48] tony2...@php.net The following patch has been added/updated: Patch Name: ppc-support Revision: 1275990348 URL: http://bugs.php.net/patch-display.php?bug=51772&patch=ppc-support&revision=1275990348 [2010-06-08 01:13:06] f...@php.net I don't have a powerpc to test. I'll get some code from nginx. Do you have time to test it ? 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=51772 -- Edit this bug report at http://bugs.php.net/bug.php?id=51772&edit=1
Bug #52032 [Opn]: segmentation fault
Edit report at http://bugs.php.net/bug.php?id=52032&edit=1 ID: 52032 Updated by: f...@php.net Reported by: slogster at gmail dot com Summary: segmentation fault Status: Open Type: Bug Package: FPM related Operating System: linux x86_64 PHP Version: 5.3SVN-2010-06-09 (SVN) -Assigned To: +Assigned To: fat New Comment: Please provide : - your conf file - compilation options - the request which makes FPM to crash Previous Comments: [2010-06-09 15:36:19] slogster at gmail dot com I am running php-fpm: URL: http://svn.php.net/repository/php/php-src/branches/PHP_5_3 Revision: 299968 [2010-06-09 15:35:00] slogster at gmail dot com Description: Core was generated by `/usr/local/php-5.3-r299968/sbin/php-fpm'. Program terminated with signal 11, Segmentation fault. [New process 11882] #0 0x55955aab in _zend_is_inconsistent (ht=0x5500, file=0x55ccf738 "/home/l3et3r/php-5.3-r299968/Zend/zend_hash.c", line=517) at /home/l3et3r/php-5.3-r299968/Zend/zend_hash.c:53 53 if (ht->inconsistent==HT_OK) { (gdb) bt #0 0x55955aab in _zend_is_inconsistent (ht=0x5500, file=0x55ccf738 "/home/l3et3r/php-5.3-r299968/Zend/zend_hash.c", line=517) at /home/l3et3r/php-5.3-r299968/Zend/zend_hash.c:53 #1 0x55957821 in zend_hash_destroy (ht=0x5500) at /home/l3et3r/php-5.3-r299968/Zend/zend_hash.c:517 #2 0x55a334d7 in fcgi_close (req=0x7fff64fee540, force=0, destroy=1) at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fastcgi.c:675 #3 0x55a33de4 in fcgi_finish_request (req=0x7fff64fee540, force_close=0) at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fastcgi.c:1000 #4 0x55a395b5 in sapi_cgi_deactivate () at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fpm_main.c:881 #5 0x558d62f6 in sapi_deactivate () at /home/l3et3r/php-5.3-r299968/main/SAPI.c:444 #6 0x558ca34d in php_request_shutdown (dummy=0x0) at /home/l3et3r/php-5.3-r299968/main/main.c:1642 #7 0x55a3b5d3 in main (argc=1, argv=0x7fff64ff0788) at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fpm_main.c:1881 (gdb) frame 7 #7 0x55a3b5d3 in main (argc=1, argv=0x7fff64ff0788) at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fpm_main.c:1881 1881php_request_shutdown((void *) 0); (gdb) frame 6 #6 0x558ca34d in php_request_shutdown (dummy=0x0) at /home/l3et3r/php-5.3-r299968/main/main.c:1642 1642sapi_deactivate(TSRMLS_C); (gdb) frame 5 #5 0x558d62f6 in sapi_deactivate () at /home/l3et3r/php-5.3-r299968/main/SAPI.c:444 444 sapi_module.deactivate(TSRMLS_C); (gdb) frame 4 #4 0x55a395b5 in sapi_cgi_deactivate () at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fpm_main.c:881 881 if ( (gdb) frame 3 #3 0x55a33de4 in fcgi_finish_request (req=0x7fff64fee540, force_close=0) at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fastcgi.c:1000 1000fcgi_close(req, force_close, 1); (gdb) frame 2 #2 0x55a334d7 in fcgi_close (req=0x7fff64fee540, force=0, destroy=1) at /home/l3et3r/php-5.3-r299968/sapi/fpm/fpm/fastcgi.c:675 675 zend_hash_destroy(req->env); (gdb) frame 1 #1 0x55957821 in zend_hash_destroy (ht=0x5500) at /home/l3et3r/php-5.3-r299968/Zend/zend_hash.c:517 517 IS_CONSISTENT(ht); (gdb) frame 0 #0 0x55955aab in _zend_is_inconsistent (ht=0x5500, file=0x55ccf738 "/home/l3et3r/php-5.3-r299968/Zend/zend_hash.c", line=517) at /home/l3et3r/php-5.3-r299968/Zend/zend_hash.c:53 53 if (ht->inconsistent==HT_OK) { -- Edit this bug report at http://bugs.php.net/bug.php?id=52032&edit=1
Bug #52045 [Opn->Asn]: Incorrect php.ini file detection
Edit report at http://bugs.php.net/bug.php?id=52045&edit=1 ID: 52045 Updated by: f...@php.net Reported by: FractalizeR at yandex dot ru Summary: Incorrect php.ini file detection -Status: Open +Status: Assigned Type: Bug Package: FPM related Operating System: CentOS 5.5 PHP Version: 5.3.2 -Assigned To: +Assigned To: fat Previous Comments: [2010-06-11 11:02:04] FractalizeR at yandex dot ru Description: If there is a file or directory named php.ini in the current directory and you start php-fpm from within this directory, phpinfo() output shows, that php-fpm is trying to use this file/directory as main configuration file for all it's children. The case with such php.ini being a file seems to be undocumented and unwanted behavior because by default [prefix]/lib/php.ini should be used. The case with php.ini being a directory leads to all php settings to be silently reverted to their defaults. No error message is shown about that php.ini is not a file or does not exist or whatever. Test script: --- cd ~ mkdir php.ini php-fpm After that open a page, containing phpinfo(); line and check php.ini settings section. -- Edit this bug report at http://bugs.php.net/bug.php?id=52045&edit=1
Bug #52050 [Opn->Asn]: PHP-FPM Dies after self-initiating reload
Edit report at http://bugs.php.net/bug.php?id=52050&edit=1 ID: 52050 Updated by: f...@php.net Reported by: marcus at adolfsson dot com Summary: PHP-FPM Dies after self-initiating reload -Status: Open +Status: Assigned Type: Bug Package: FPM related Operating System: fc7 PHP Version: 5.3.2 -Assigned To: +Assigned To: fat Previous Comments: [2010-06-11 15:36:27] marcus at adolfsson dot com This is my conf file: ; ; FPM Configuration ; ; ;include=/etc/fpm.d/*.conf ;; ; Global Options ; ;; [global] pid = /usr/logs/php-fpm.pid error_log = /usr/logs/php-fpm.log ; Log level ; Possible Values: alert, error, warning, notice, debug log_level = notice ; If this number of child processes exit with SIGSEGV or SIGBUS within the time ; interval set by emergency_restart_interval then FPM will restart. A value ; of '0' means 'Off'. ; Default Value: 0 emergency_restart_threshold = 10 ; Interval of time used by emergency_restart_interval to determine when ; a graceful restart will be initiated. This can be useful to work around ; accidental corruptions in an accelerator's shared memory. ; Available Units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 emergency_restart_interval = 1m ; Time limit for child processes to wait for a reaction on signals from master. ; Available units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 process_control_timeout = 5s ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Default Value: yes daemonize = yes ; Pool Definitions ; ; Multiple pools of child processes may be started with different listening ; ports and different management options. The name of the pool will be ; used in logs and stats. There is no limitation on the number of pools which ; FPM can handle. Your system will tell you anyway :) ; Start a new pool named 'www'. [www] ; The address on which to accept FastCGI requests. ; Valid syntaxes are: ; 'ip.add.re.ss:port'- to listen on a TCP socket to a specific address on ;a specific port; ; 'port' - to listen on a TCP socket to all addresses on a ;specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. listen = 127.0.0.1:9000 ; Set listen(2) backlog. A value of '-1' means unlimited. ; Default Value: -1 listen.backlog = -1 ; List of ipv4 addresses of FastCGI clients which are allowed to connect. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address ; must be separated by a comma. If this value is left blank, connections will be ; accepted from any ip address. ; Default Value: any ;listen.allowed_clients = 127.0.0.1 ; Set permissions for unix socket, if one is used. In Linux, read/write ; permissions must be set in order to allow connections from a web server. Many ; BSD-derived systems allow connections regardless of permissions. ; Default Values: user and group are set as the running user ; mode is set to 0666 ;listen.owner = nobody ;listen.group = nobody ;listen.mode = 0666 ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. user = phpfm group = phpfm ; Choose how the process manager will control the number of child processes. ; Possible Values: ; static - a fixed number (pm.max_children) of child processes; ; dynamic - the number of child processes are set dynamically based on the ; following directives: ; pm.max_children - the maximum number of children that can ;be alive at the same time. ; pm.start_servers - the number of children created on startup. ; pm.min_spare_servers - the minimum number of children in 'idle' ;state (waiting to process). If the number ;of 'idle' processes is less than this ;number then some children will be created. ; pm.max_spare_servers - the maximum number of children in 'idle' ;state (waiting to process). If the number ;of 'idle' processes is greater than this ;
Req #52052 [Opn->Asn]: add syslog support to FPM
Edit report at http://bugs.php.net/bug.php?id=52052&edit=1 ID: 52052 Updated by: f...@php.net Reported by: ef-lists at email dot de Summary: add syslog support to FPM -Status: Open +Status: Assigned Type: Feature/Change Request Package: FPM related Operating System: Linux/*NIX PHP Version: 5.3SVN-2010-06-11 (SVN) -Assigned To: +Assigned To: fat Previous Comments: [2010-06-11 18:10:10] ef-lists at email dot de Description: At current, FPM only allows logging to local files, both for the ErrorLog and SlowLog. Using syslog aids the administrator greatly in centralizing logfiles. Also PHP itself has syslog support, so FPM should consequently have it, too. I hereby ask to add syslog support to FPM. -- Edit this bug report at http://bugs.php.net/bug.php?id=52052&edit=1
Bug #52067 [Opn->Asn]: chdir to a nonexisting directory when chrooting is buggy
Edit report at http://bugs.php.net/bug.php?id=52067&edit=1 ID: 52067 Updated by: f...@php.net Reported by: f...@php.net Summary: chdir to a nonexisting directory when chrooting is buggy -Status: Open +Status: Assigned Type: Bug Package: FPM related Operating System: linux PHP Version: 5.3SVN-2010-06-12 (SVN) -Assigned To: +Assigned To: fat Previous Comments: [2010-06-12 19:49:58] f...@php.net Description: when setting chroot and chdir to a non existing directory into the chroot. FPM loops creating children which are dying because they can't chdir. Jun 12 19:46:10.884803 [NOTICE] [pool www] child 27114 started Jun 12 19:46:10.884930 [WARNING] [pool www] child 27114 exited with code 255 after 0.000149 seconds from start Jun 12 19:46:10.885001 [WARNING] [pool www] child 27114 said into stderr: "Jun 12 19:46:10.884025 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.885072 [WARNING] [pool www] child 27114 said into stderr: "Jun 12 19:46:10.884153 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.886642 [NOTICE] [pool www] child 27115 started Jun 12 19:46:10.886768 [WARNING] [pool www] child 27115 exited with code 255 after 0.000149 seconds from start Jun 12 19:46:10.886842 [WARNING] [pool www] child 27115 said into stderr: "Jun 12 19:46:10.885852 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.886914 [WARNING] [pool www] child 27115 said into stderr: "Jun 12 19:46:10.885982 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.888469 [NOTICE] [pool www] child 27116 started Jun 12 19:46:10.888596 [WARNING] [pool www] child 27116 exited with code 255 after 0.000150 seconds from start Jun 12 19:46:10.888671 [WARNING] [pool www] child 27116 said into stderr: "Jun 12 19:46:10.887691 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.888744 [WARNING] [pool www] child 27116 said into stderr: "Jun 12 19:46:10.887820 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.890295 [NOTICE] [pool www] child 27117 started Jun 12 19:46:10.890422 [WARNING] [pool www] child 27117 exited with code 255 after 0.000150 seconds from start Jun 12 19:46:10.890491 [WARNING] [pool www] child 27117 said into stderr: "Jun 12 19:46:10.889524 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.890563 [WARNING] [pool www] child 27117 said into stderr: "Jun 12 19:46:10.889651 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.893124 [NOTICE] [pool www] child 27119 started Jun 12 19:46:10.893256 [WARNING] [pool www] child 27119 exited with code 255 after 0.000155 seconds from start Jun 12 19:46:10.893329 [WARNING] [pool www] child 27119 said into stderr: "Jun 12 19:46:10.892335 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.893401 [WARNING] [pool www] child 27119 said into stderr: "Jun 12 19:46:10.892467 [ERROR] [pool www] child failed to initialize", pipe is closed Test script: --- chroot=/usr/local/nginx/html chdir=/usr/local/nginx/html -- Edit this bug report at http://bugs.php.net/bug.php?id=52067&edit=1
Bug #52067 [Asn->Csd]: chdir to a nonexisting directory when chrooting is buggy
Edit report at http://bugs.php.net/bug.php?id=52067&edit=1 ID: 52067 Updated by: f...@php.net Reported by: f...@php.net Summary: chdir to a nonexisting directory when chrooting is buggy -Status: Assigned +Status: Closed Type: Bug Package: FPM related Operating System: linux PHP Version: 5.3SVN-2010-06-12 (SVN) Assigned To: fat Previous Comments: [2010-06-13 12:30:37] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=300418 Log: Fix #52067, chroot and chdir path were not checked at startup. If configured with unexistant directories, FPM entered in an error loop. [2010-06-12 19:49:58] f...@php.net Description: when setting chroot and chdir to a non existing directory into the chroot. FPM loops creating children which are dying because they can't chdir. Jun 12 19:46:10.884803 [NOTICE] [pool www] child 27114 started Jun 12 19:46:10.884930 [WARNING] [pool www] child 27114 exited with code 255 after 0.000149 seconds from start Jun 12 19:46:10.885001 [WARNING] [pool www] child 27114 said into stderr: "Jun 12 19:46:10.884025 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.885072 [WARNING] [pool www] child 27114 said into stderr: "Jun 12 19:46:10.884153 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.886642 [NOTICE] [pool www] child 27115 started Jun 12 19:46:10.886768 [WARNING] [pool www] child 27115 exited with code 255 after 0.000149 seconds from start Jun 12 19:46:10.886842 [WARNING] [pool www] child 27115 said into stderr: "Jun 12 19:46:10.885852 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.886914 [WARNING] [pool www] child 27115 said into stderr: "Jun 12 19:46:10.885982 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.888469 [NOTICE] [pool www] child 27116 started Jun 12 19:46:10.888596 [WARNING] [pool www] child 27116 exited with code 255 after 0.000150 seconds from start Jun 12 19:46:10.888671 [WARNING] [pool www] child 27116 said into stderr: "Jun 12 19:46:10.887691 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.888744 [WARNING] [pool www] child 27116 said into stderr: "Jun 12 19:46:10.887820 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.890295 [NOTICE] [pool www] child 27117 started Jun 12 19:46:10.890422 [WARNING] [pool www] child 27117 exited with code 255 after 0.000150 seconds from start Jun 12 19:46:10.890491 [WARNING] [pool www] child 27117 said into stderr: "Jun 12 19:46:10.889524 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.890563 [WARNING] [pool www] child 27117 said into stderr: "Jun 12 19:46:10.889651 [ERROR] [pool www] child failed to initialize", pipe is closed Jun 12 19:46:10.893124 [NOTICE] [pool www] child 27119 started Jun 12 19:46:10.893256 [WARNING] [pool www] child 27119 exited with code 255 after 0.000155 seconds from start Jun 12 19:46:10.893329 [WARNING] [pool www] child 27119 said into stderr: "Jun 12 19:46:10.892335 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No such file or directory (2)" Jun 12 19:46:10.893401 [WARNING] [pool www] child 27119 said into stderr: "Jun 12 19:46:10.892467 [ERROR] [pool www] child failed to initialize", pipe is closed Test script: --- chroot=/usr/local/nginx/html chdir=/usr/local/nginx/html -- Edit this bug report at http://bugs.php.net/bug.php?id=52067&edit=1
Bug #52050 [Asn->Fbk]: PHP-FPM Dies after self-initiating reload
Edit report at http://bugs.php.net/bug.php?id=52050&edit=1 ID: 52050 Updated by: f...@php.net Reported by: marcus at adolfsson dot com Summary: PHP-FPM Dies after self-initiating reload -Status: Assigned +Status: Feedback Type: Bug Package: FPM related Operating System: fc7 PHP Version: 5.3.2 Assigned To: fat New Comment: Can you also provide the libevent version and the OS you're using. Thanks Previous Comments: [2010-06-11 16:27:49] marcus at adolfsson dot com ldd /usr/sbin/php-fpm libcrypt.so.1 => /lib64/libcrypt.so.1 (0x003a8300) libaspell.so.15 => /usr/lib64/libaspell.so.15 (0x003a8600) libpspell.so.15 => /usr/lib64/libpspell.so.15 (0x003a8640) librt.so.1 => /lib64/librt.so.1 (0x003a8180) libmysqlclient.so.15 => /usr/lib64/mysql/libmysqlclient.so.15 (0x0036a360) libmcrypt.so.4 => /usr/lib64/libmcrypt.so.4 (0x00357ba0) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0036a320) libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0036a3e0) libz.so.1 => /usr/lib64/libz.so.1 (0x0035af40) libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x003a8700) libcurl.so.3 => /usr/lib64/libcurl.so.3 (0x0035af80) libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x003a8540) libpcre.so.0 => /lib64/libpcre.so.0 (0x0035b040) libm.so.6 => /lib64/libm.so.6 (0x003a80c0) libdl.so.2 => /lib64/libdl.so.2 (0x003a8080) libevent-1.4.so.1 => /usr/local/lib/libevent-1.4.so.1 (0x2aac3000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0036a2e0) libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x003a8440) libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x003a8340) libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x003a83c0) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x003a8280) libssl.so.6 => /lib64/libssl.so.6 (0x0035afc0) libcrypto.so.6 => /lib64/libcrypto.so.6 (0x0035b080) libresolv.so.2 => /lib64/libresolv.so.2 (0x003a82c0) libidn.so.11 => /usr/lib64/libidn.so.11 (0x003a8200) libc.so.6 => /lib64/libc.so.6 (0x003a8040) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x003a8400) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x003a84c0) libpthread.so.0 => /lib64/libpthread.so.0 (0x003a8100) /lib64/ld-linux-x86-64.so.2 (0x003a8000) libnsl.so.1 => /lib64/libnsl.so.1 (0x003a8240) libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x003a8480) [2010-06-11 16:10:16] tony2...@php.net Please also show the output of `ldd /path/to/php-fpm`. Thanks. [2010-06-11 15:36:27] marcus at adolfsson dot com This is my conf file: ; ; FPM Configuration ; ; ;include=/etc/fpm.d/*.conf ;; ; Global Options ; ;; [global] pid = /usr/logs/php-fpm.pid error_log = /usr/logs/php-fpm.log ; Log level ; Possible Values: alert, error, warning, notice, debug log_level = notice ; If this number of child processes exit with SIGSEGV or SIGBUS within the time ; interval set by emergency_restart_interval then FPM will restart. A value ; of '0' means 'Off'. ; Default Value: 0 emergency_restart_threshold = 10 ; Interval of time used by emergency_restart_interval to determine when ; a graceful restart will be initiated. This can be useful to work around ; accidental corruptions in an accelerator's shared memory. ; Available Units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 emergency_restart_interval = 1m ; Time limit for child processes to wait for a reaction on signals from master. ; Available units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 process_control_timeout = 5s ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Default Value: yes daemonize = yes ; Pool Definitions ; ; Multiple pools of child processes may be started with different listening ; ports and different management options. The name of the pool will be ; used in logs and stats. There is no limitation on the number of pools which ; FPM can handle. Your system will
Bug #52075 [Opn->Csd]: php -b 127.0.0.1 vs php -y php-fpm.conf -x
Edit report at http://bugs.php.net/bug.php?id=52075&edit=1 ID: 52075 Updated by: f...@php.net Reported by: luk-4u at hotmail dot com Summary: php -b 127.0.0.1 vs php -y php-fpm.conf -x -Status: Open +Status: Closed Type: Bug Package: FPM related Operating System: ubuntu 9.04 PHP Version: 5.2.13 -Assigned To: +Assigned To: fat New Comment: FPM is not supported on 5.2.x and your revision is old as the conf file is formatted in XML (now it's INI). Please use 5.3.x from http://snaps.php.net/ If you're using the FPM patch from http://php-fpm.org to use FPM on 5.2.x, please ask on the FPM mailing list (http://groups.google.com/group/highload-php- en). ++ Jerome Previous Comments: [2010-06-13 13:41:48] luk-4u at hotmail dot com "As i tested, while started as the 1st way, this function return 0, and the tsrm_realpath returns NULL' This sentence was written wrong, correct is : the 1st way returns 0; the second returns 1; [2010-06-13 13:38:07] luk-4u at hotmail dot com Description: As starting php-cgi in 2 ways, the 2 results were different. 1./path/to/php-cgi -b 127.0.0.1:9000 2./path/to/php-cgi -y /path/to/php-fpm.conf -x The first one was correct. The second, which said: 'No input file specified'. As i tracked down the c code, i found out the reason finally, but dunno why still. /php/to/phpsrc/TSRM/tsrm_virtual_cwd.c CWD_API int virutal_file_ex(cwd_state *state,.) around line 1339 the exact code block: #if !defined(TSRM_WIN32) && !defined(NETWARE) .. if (use_realpath == CWD_REALPATH) { return 1; } goto no_realpath; It's the above function that keeps the problem presenting.. As i tested, while started as the 1st way, this function return 0, and the tsrm_realpath returns NULL, also tsrm_realpath was called from init_request_info. I think u must be familiarer with the code. And the 2cd way was all right. Here is my nginx(0.6.39) conf block: server { listen 80; server_name pk.local.com; index index.php; root /home/zyk/pk_local; location / { root /home/zyk/pk_local; fastcgi_pass 127.0.0.1:9000; # fastcgi_pass unix:/usr/local/app/php/logs/php.sock; fastcgi_index index.php; fastcgi_intercept_errors on; include fcgi.conf; include fastcgi_params.default; } } } Dir /home/zyk/pk_local is RW for the php daemon userid. Here is my php configure option: configure --enable-fastcgi --enable-fpm --enable-mbstring --prefix=/usr/local/app/php Here is my php-fpm.conf All relative paths in this config are relative to php's install prefix Pid file /usr/local/app/php/logs/php-fpm.pid Error log file /usr/local/app/php/logs/php-fpm.log Log level notice When this amount of php processes exited with SIGSEGV or SIGBUS ... 10 ... in a less than this interval of time, a graceful restart will be initiated. Useful to work around accidental curruptions in accelerator's shared memory. 1m Time limit on waiting child's reaction on signals from master 5s Set to 'no' to debug fpm no Name of pool. Used in logs and stats. default Address to accept fastcgi requests on. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' 127.0.0.1:9000 Set listen(2) backlog -1 Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. nobody nobody 0666 Additional php.ini defines, specific to this pool of workers
Bug #52086 [Opn->Asn]: No new line at the end of a included pool file crahes the PHP FPM daemon
Edit report at http://bugs.php.net/bug.php?id=52086&edit=1 ID: 52086 Updated by: f...@php.net Reported by: admin at saltwaterc dot net Summary: No new line at the end of a included pool file crahes the PHP FPM daemon -Status: Open +Status: Assigned Type: Bug Package: FPM related Operating System: * PHP Version: 5.3.2 -Assigned To: +Assigned To: fat Previous Comments: [2010-06-15 14:49:38] admin at saltwaterc dot net Description: I have a script that automatically generates pool configurations based on input parameters and a template configuration. It didn't used to place a new line at the end of the generated configuration file which degenerated into a hard to debug error as the daemon crashes without any useful explanation. By adding a new line after the last configuration line (in my example, php_admin_value[upload_tmp_dir] = /home/example.com/tmp) everything works as expected. Test script: --- [example.com] user = example.com group = example.com listen = /var/run/php-fpm/example.com.sock pm = static pm.max_children = 2 pm.max_requests = 1 slowlog = /home/example.com/logs/fpm/slow.log chdir = /home/example.com/docroot php_admin_value[error_log] = /home/example.com/logs/fpm/error.log php_admin_value[open_basedir] = /home/example.com/docroot:/home/example.com/sessions:/home/example.com/tmp php_admin_value[session.save_path] = /home/example.com/sessions php_admin_value[upload_tmp_dir] = /home/example.com/tmp Expected result: Successful PHP FPM daemon start. Actual result: -- Starting php-fpm PHP: syntax error, unexpected $end in Unknown on line 1 Jun 15 12:35:12.090707 [ERROR] Unable to include /usr/local/zend/etc/fpm.d/example.com.ini from /usr/local/zend/etc/php-fpm.conf at line 23 *** glibc detected *** /usr/local/zend/sbin/php-fpm: double free or corruption (fasttop): 0x1ac80380 *** + backtrace + memory map -- Edit this bug report at http://bugs.php.net/bug.php?id=52086&edit=1
Bug #52084 [Opn->Wfx]: /sapi/fpm/init.d.php-fpm is generated, but not copied to /etc/rc.d
Edit report at http://bugs.php.net/bug.php?id=52084&edit=1 ID: 52084 Updated by: f...@php.net Reported by: FractalizeR at yandex dot ru Summary: /sapi/fpm/init.d.php-fpm is generated, but not copied to /etc/rc.d -Status: Open +Status: Wont fix Type: Bug Package: FPM related Operating System: CentOS 5.5 PHP Version: 5.3.2 New Comment: init.d.php-fpm is generated for package managers. it can't be installed in /etc/rc.d because this directory does not exist on every os or linux distros. it's up to you to use it as you wish. Previous Comments: [2010-06-15 12:05:21] FractalizeR at yandex dot ru Description: After successfull ./configure, make and make install, service file /sapi/fpm/init.d.php-fpm is generated, but not copied to destination directory so no way to use php-fpm with `service` command. -- Edit this bug report at http://bugs.php.net/bug.php?id=52084&edit=1
Bug #52086 [Asn->Ana]: No new line at the end of a included pool file crahes the PHP FPM daemon
Edit report at http://bugs.php.net/bug.php?id=52086&edit=1 ID: 52086 Updated by: f...@php.net Reported by: admin at saltwaterc dot net Summary: No new line at the end of a included pool file crahes the PHP FPM daemon -Status: Assigned +Status: Analyzed Type: Bug Package: FPM related Operating System: * PHP Version: 5.3.2 Assigned To: fat New Comment: Can you try the attached patch please ? Previous Comments: [2010-06-15 17:07:25] f...@php.net The following patch has been added/updated: Patch Name: fpm-include.error.patch Revision: 1276614445 URL: http://bugs.php.net/patch-display.php?bug=52086&patch=fpm-include.error.patch&revision=1276614445 [2010-06-15 14:49:38] admin at saltwaterc dot net Description: I have a script that automatically generates pool configurations based on input parameters and a template configuration. It didn't used to place a new line at the end of the generated configuration file which degenerated into a hard to debug error as the daemon crashes without any useful explanation. By adding a new line after the last configuration line (in my example, php_admin_value[upload_tmp_dir] = /home/example.com/tmp) everything works as expected. Test script: --- [example.com] user = example.com group = example.com listen = /var/run/php-fpm/example.com.sock pm = static pm.max_children = 2 pm.max_requests = 1 slowlog = /home/example.com/logs/fpm/slow.log chdir = /home/example.com/docroot php_admin_value[error_log] = /home/example.com/logs/fpm/error.log php_admin_value[open_basedir] = /home/example.com/docroot:/home/example.com/sessions:/home/example.com/tmp php_admin_value[session.save_path] = /home/example.com/sessions php_admin_value[upload_tmp_dir] = /home/example.com/tmp Expected result: Successful PHP FPM daemon start. Actual result: -- Starting php-fpm PHP: syntax error, unexpected $end in Unknown on line 1 Jun 15 12:35:12.090707 [ERROR] Unable to include /usr/local/zend/etc/fpm.d/example.com.ini from /usr/local/zend/etc/php-fpm.conf at line 23 *** glibc detected *** /usr/local/zend/sbin/php-fpm: double free or corruption (fasttop): 0x1ac80380 *** + backtrace + memory map -- Edit this bug report at http://bugs.php.net/bug.php?id=52086&edit=1
Bug #52050 [Asn->Fbk]: PHP-FPM Dies after self-initiating reload
Edit report at http://bugs.php.net/bug.php?id=52050&edit=1 ID: 52050 Updated by: f...@php.net Reported by: marcus at adolfsson dot com Summary: PHP-FPM Dies after self-initiating reload -Status: Assigned +Status: Feedback Type: Bug Package: FPM related Operating System: fc7 PHP Version: 5.3.2 Assigned To: fat New Comment: I can't reproduce the problem. I tried to compile 5.3snap on rhel 5 server with libevent 1.1.14 and I have no problems. Two questions: 1- does the bug appear when sending a USR2 signal to the master process (reloading) ? 2- Can you compile the static modules (mysql, pspell, ...) as shared modules so that you will be able to run FPM without any module to check if there is no bugs running a specific module with FPM. Previous Comments: [2010-06-14 16:11:13] marcus at adolfsson dot com Fedora Core 7, libevent-1.4.14-stable [2010-06-13 13:02:12] f...@php.net Can you also provide the libevent version and the OS you're using. Thanks [2010-06-11 16:27:49] marcus at adolfsson dot com ldd /usr/sbin/php-fpm libcrypt.so.1 => /lib64/libcrypt.so.1 (0x003a8300) libaspell.so.15 => /usr/lib64/libaspell.so.15 (0x003a8600) libpspell.so.15 => /usr/lib64/libpspell.so.15 (0x003a8640) librt.so.1 => /lib64/librt.so.1 (0x003a8180) libmysqlclient.so.15 => /usr/lib64/mysql/libmysqlclient.so.15 (0x0036a360) libmcrypt.so.4 => /usr/lib64/libmcrypt.so.4 (0x00357ba0) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0036a320) libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0036a3e0) libz.so.1 => /usr/lib64/libz.so.1 (0x0035af40) libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x003a8700) libcurl.so.3 => /usr/lib64/libcurl.so.3 (0x0035af80) libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x003a8540) libpcre.so.0 => /lib64/libpcre.so.0 (0x0035b040) libm.so.6 => /lib64/libm.so.6 (0x003a80c0) libdl.so.2 => /lib64/libdl.so.2 (0x003a8080) libevent-1.4.so.1 => /usr/local/lib/libevent-1.4.so.1 (0x2aac3000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0036a2e0) libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x003a8440) libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x003a8340) libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x003a83c0) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x003a8280) libssl.so.6 => /lib64/libssl.so.6 (0x0035afc0) libcrypto.so.6 => /lib64/libcrypto.so.6 (0x0035b080) libresolv.so.2 => /lib64/libresolv.so.2 (0x003a82c0) libidn.so.11 => /usr/lib64/libidn.so.11 (0x003a8200) libc.so.6 => /lib64/libc.so.6 (0x003a8040) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x003a8400) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x003a84c0) libpthread.so.0 => /lib64/libpthread.so.0 (0x003a8100) /lib64/ld-linux-x86-64.so.2 (0x003a8000) libnsl.so.1 => /lib64/libnsl.so.1 (0x003a8240) libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x003a8480) [2010-06-11 16:10:16] tony2...@php.net Please also show the output of `ldd /path/to/php-fpm`. Thanks. [2010-06-11 15:36:27] marcus at adolfsson dot com This is my conf file: ; ; FPM Configuration ; ; ;include=/etc/fpm.d/*.conf ;; ; Global Options ; ;; [global] pid = /usr/logs/php-fpm.pid error_log = /usr/logs/php-fpm.log ; Log level ; Possible Values: alert, error, warning, notice, debug log_level = notice ; If this number of child processes exit with SIGSEGV or SIGBUS within the time ; interval set by emergency_restart_interval then FPM will restart. A value ; of '0' means 'Off'. ; Default Value: 0 emergency_restart_threshold = 10 ; Interval of time used by emergency_restart_interval to determine when ; a graceful restart will be initiated. This can be useful to work around ; accidental corruptions in an accelerator's shared memory. ; Available Units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 emer
Bug #52050 [Opn->Fbk]: PHP-FPM Dies after self-initiating reload
Edit report at http://bugs.php.net/bug.php?id=52050&edit=1 ID: 52050 Updated by: f...@php.net Reported by: marcus at adolfsson dot com Summary: PHP-FPM Dies after self-initiating reload -Status: Open +Status: Feedback Type: Bug Package: FPM related Operating System: fc7 PHP Version: 5.3.2 Assigned To: fat New Comment: You can try to simulate a self-initiating reload by setting: emergency_restart_threshold = 1 emergency_restart_interval = 10s and kill -7 on one child process Previous Comments: [2010-06-17 19:58:53] marcus at adolfsson dot com Manual reloads are successful Jun 17 13:54:25.047532 [NOTICE] reloading: execvp("/usr/sbin/php-fpm", {"/usr/sbin/php-fpm", "--fpm-config", "/etc/php-fpm.conf"}) Jun 17 13:54:25.084632 [NOTICE] using inherited socket fd=14, "127.0.0.1:9000" Jun 17 13:54:25.084986 [NOTICE] fpm is running, pid 2564 Is there a way to force the self-initiating reload to occur for testing purposes? [2010-06-17 19:12:30] f...@php.net I can't reproduce the problem. I tried to compile 5.3snap on rhel 5 server with libevent 1.1.14 and I have no problems. Two questions: 1- does the bug appear when sending a USR2 signal to the master process (reloading) ? 2- Can you compile the static modules (mysql, pspell, ...) as shared modules so that you will be able to run FPM without any module to check if there is no bugs running a specific module with FPM. [2010-06-14 16:11:13] marcus at adolfsson dot com Fedora Core 7, libevent-1.4.14-stable [2010-06-13 13:02:12] f...@php.net Can you also provide the libevent version and the OS you're using. Thanks [2010-06-11 16:27:49] marcus at adolfsson dot com ldd /usr/sbin/php-fpm libcrypt.so.1 => /lib64/libcrypt.so.1 (0x003a8300) libaspell.so.15 => /usr/lib64/libaspell.so.15 (0x003a8600) libpspell.so.15 => /usr/lib64/libpspell.so.15 (0x003a8640) librt.so.1 => /lib64/librt.so.1 (0x003a8180) libmysqlclient.so.15 => /usr/lib64/mysql/libmysqlclient.so.15 (0x0036a360) libmcrypt.so.4 => /usr/lib64/libmcrypt.so.4 (0x00357ba0) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0036a320) libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0036a3e0) libz.so.1 => /usr/lib64/libz.so.1 (0x0035af40) libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x003a8700) libcurl.so.3 => /usr/lib64/libcurl.so.3 (0x0035af80) libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x003a8540) libpcre.so.0 => /lib64/libpcre.so.0 (0x0035b040) libm.so.6 => /lib64/libm.so.6 (0x003a80c0) libdl.so.2 => /lib64/libdl.so.2 (0x003a8080) libevent-1.4.so.1 => /usr/local/lib/libevent-1.4.so.1 (0x2aac3000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0036a2e0) libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x003a8440) libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x003a8340) libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x003a83c0) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x003a8280) libssl.so.6 => /lib64/libssl.so.6 (0x0035afc0) libcrypto.so.6 => /lib64/libcrypto.so.6 (0x0035b080) libresolv.so.2 => /lib64/libresolv.so.2 (0x003a82c0) libidn.so.11 => /usr/lib64/libidn.so.11 (0x003a8200) libc.so.6 => /lib64/libc.so.6 (0x003a8040) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x003a8400) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x003a84c0) libpthread.so.0 => /lib64/libpthread.so.0 (0x003a8100) /lib64/ld-linux-x86-64.so.2 (0x003a8000) libnsl.so.1 => /lib64/libnsl.so.1 (0x003a8240) libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x003a8480) 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=52050 -- Edit this bug report at http://bugs.php.net/bug.php?id=52050&edit=1
Bug #52086 [Ana->Csd]: No new line at the end of a included pool file crahes the PHP FPM daemon
Edit report at http://bugs.php.net/bug.php?id=52086&edit=1 ID: 52086 Updated by: f...@php.net Reported by: admin at saltwaterc dot net Summary: No new line at the end of a included pool file crahes the PHP FPM daemon -Status: Analyzed +Status: Closed Type: Bug Package: FPM related Operating System: * PHP Version: 5.3.2 Assigned To: fat New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-06-19 18:31:21] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=300604 Log: - Fixed bug #52086 (No new line at the end of a included file crahes the PHP FPM daemon) [2010-06-19 17:58:43] admin at saltwaterc dot net service php-fpm restart Gracefully shutting down php-fpm done Starting php-fpm PHP: syntax error, unexpected $end in Unknown on line 1 Jun 19 15:50:58.956049 [ERROR] Unable to include /usr/local/zend/etc/fpm.d/default.conf from /usr/local/zend/etc/php-fpm.conf at line 8 Jun 19 15:50:58.956439 [ERROR] failed to load configuration file '/usr/local/zend/etc/php-fpm.conf' failed It doesn't dump the backtrace and the memory map, but it still crashes. I made a PHP script that writes the configuration to /usr/local/zend/etc/fpm.d/: #!/usr/local/zend/bin/php http://bugs.php.net/patch-display.php?bug=52086&patch=fpm-include.error.patch&revision=1276614445 [2010-06-15 14:49:38] admin at saltwaterc dot net Description: I have a script that automatically generates pool configurations based on input parameters and a template configuration. It didn't used to place a new line at the end of the generated configuration file which degenerated into a hard to debug error as the daemon crashes without any useful explanation. By adding a new line after the last configuration line (in my example, php_admin_value[upload_tmp_dir] = /home/example.com/tmp) everything works as expected. Test script: --- [example.com] user = example.com group = example.com listen = /var/run/php-fpm/example.com.sock pm = static pm.max_children = 2 pm.max_requests = 1 slowlog = /home/example.com/logs/fpm/slow.log chdir = /home/example.com/docroot php_admin_value[error_log] = /home/example.com/logs/fpm/error.log php_admin_value[open_basedir] = /home/example.com/docroot:/home/example.com/sessions:/home/example.com/tmp php_admin_value[session.save_path] = /home/example.com/sessions php_admin_value[upload_tmp_dir] = /home/example.com/tmp Expected result: Successful PHP FPM daemon start. Actual result: -- Starting php-fpm PHP: syntax error, unexpected $end in Unknown on line 1 Jun 15 12:35:12.090707 [ERROR] Unable to include /usr/local/zend/etc/fpm.d/example.com.ini from /usr/local/zend/etc/php-fpm.conf at line 23 *** glibc detected *** /usr/local/zend/sbin/php-fpm: double free or corruption (fasttop): 0x1ac80380 *** + backtrace + memory map -- Edit this bug report at http://bugs.php.net/bug.php?id=52086&edit=1
Req #51973 [Asn->Ana]: a way to restart single pools, enable/disable modules per pool
Edit report at http://bugs.php.net/bug.php?id=51973&edit=1 ID: 51973 Updated by: f...@php.net Reported by: slogster at gmail dot com Summary: a way to restart single pools, enable/disable modules per pool -Status: Assigned +Status: Analyzed Type:Feature/Change Request Package: FPM related PHP Version: 5.3SVN-2010-06-02 (SVN) Assigned To: fat New Comment: Hi there. There is no way to restart a single pool. If you change the conf file, send a USR2 signal to the FPM process. All pool will be restarted. If you really don't want to restart other pools, you can safely send a QUIT signal the each pool processes. btw, this bugs makes me think about adding a gracefull restart of FPM. Previous Comments: [2010-06-13 16:04:20] f...@php.net For enabeling extensions you can use the php_admin_value setting for each pool: php_admin_value[extension] = extension.so [2010-06-02 13:01:49] slogster at gmail dot com Description: Hi, I would like to be able do enable/disable modules per pool and would also like to be able to restart single pool when I change its config. Thanks -- Edit this bug report at http://bugs.php.net/bug.php?id=51973&edit=1
Req #52377 [Opn->Bgs]: Add .user.ini support to FPM
Edit report at http://bugs.php.net/bug.php?id=52377&edit=1 ID: 52377 Updated by: f...@php.net Reported by: pch at ordbogen dot com Summary: Add .user.ini support to FPM -Status: Open +Status: Bogus Type:Feature/Change Request Package: FPM related PHP Version: 5.3.2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php .user.ini works as excepted in FPM. If you're experimenting a real bug, please provide some more infos. Previous Comments: [2010-07-19 13:10:59] pch at ordbogen dot com Description: If would be nice if the FastCGI Process Manager SAPI supported .user.ini files like the ordinary FastCGI SAPI does. Although you can specify per-pool php.ini for FPM, it really doesn't give you the same flexibility as .htaccess and .user.ini does. -- Edit this bug report at http://bugs.php.net/bug.php?id=52377&edit=1
Bug #52407 [Opn->Asn]: FPM module compilation fails on ARM architecture
Edit report at http://bugs.php.net/bug.php?id=52407&edit=1 ID: 52407 Updated by: f...@php.net Reported by: eugenesan at gmail dot com Summary: FPM module compilation fails on ARM architecture -Status: Open +Status: Assigned Type: Bug Package: Compile Failure Operating System: Linux PHP Version: 5.3.3 -Assigned To: +Assigned To: fat Previous Comments: [2010-07-22 17:30:10] eugenesan at gmail dot com Patch passed heavy load test. [2010-07-22 17:21:20] der...@php.net Never mind, it's there now :-) [2010-07-22 17:20:49] der...@php.net I see no attachment. [2010-07-22 17:16:27] eugenesan at gmail dot com Description: FPM module compilation fails on ARM architecture. Fix attached while approved by original code author (W-Mark Kubacki) Test script: --- configure with --enable-fpm and build on ARM machine Expected result: Compilation should pass and binary work. -- Edit this bug report at http://bugs.php.net/bug.php?id=52407&edit=1
Bug #52476 [Opn]: php-fpm is installed in /usr/sbin
Edit report at http://bugs.php.net/bug.php?id=52476&edit=1 ID: 52476 Updated by: f...@php.net Reported by:geiss...@php.net Summary:php-fpm is installed in /usr/sbin Status: Open Type: Bug Package:FPM related Operating System: Irrelevant PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N New Comment: php-fpm binary is a daemon not a standard command. As man hier described /usr/bin and /usr/sbin directory, php-fpm place is under /usr/sbin. /usr/bin This is the primary directory for executable programs. Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this directory. /usr/sbin This directory contains program binaries for system administration which are not essential for the boot process, for mounting /usr, or for system repair. Saying that, you're right that the man file is not at the right place. It should be placed in section 8 and not in section 1. As man(7) says: 1 Commands Those commands that can be executed by the user from within a shell. 8 System management commands Commands like mount(8), many of which only root can execute. I'll move the man page from section 1 to section 8. Previous Comments: [2010-07-28 23:47:39] geiss...@php.net Description: The php-fpm binary is installed in /usr/sbin when the man page is section 1. I don't see any reason (other than multi-user support and the like) that makes it fit better in sbin instead of just bin. -- Edit this bug report at http://bugs.php.net/bug.php?id=52476&edit=1
Bug #52476 [Asn->Csd]: php-fpm is installed in /usr/sbin
Edit report at http://bugs.php.net/bug.php?id=52476&edit=1 ID: 52476 Updated by: f...@php.net Reported by:geiss...@php.net Summary:php-fpm is installed in /usr/sbin -Status: Assigned +Status: Closed Type: Bug Package:FPM related Operating System: Irrelevant PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-07-30 00:07:02] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=301705 Log: - Fixed bug #52476 (move php-fpm man page from section 1 to section 8) [2010-07-29 01:07:52] f...@php.net php-fpm binary is a daemon not a standard command. As man hier described /usr/bin and /usr/sbin directory, php-fpm place is under /usr/sbin. /usr/bin This is the primary directory for executable programs. Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this directory. /usr/sbin This directory contains program binaries for system administration which are not essential for the boot process, for mounting /usr, or for system repair. Saying that, you're right that the man file is not at the right place. It should be placed in section 8 and not in section 1. As man(7) says: 1 Commands Those commands that can be executed by the user from within a shell. 8 System management commands Commands like mount(8), many of which only root can execute. I'll move the man page from section 1 to section 8. [2010-07-28 23:47:39] geiss...@php.net Description: The php-fpm binary is installed in /usr/sbin when the man page is section 1. I don't see any reason (other than multi-user support and the like) that makes it fit better in sbin instead of just bin. -- Edit this bug report at http://bugs.php.net/bug.php?id=52476&edit=1
Bug #52498 [Opn->Asn]: when FPM is enable, php-cli is linked against libevent (it shouldn't)
Edit report at http://bugs.php.net/bug.php?id=52498&edit=1 ID: 52498 Updated by: f...@php.net Reported by:f...@php.net Summary:when FPM is enable, php-cli is linked against libevent (it shouldn't) -Status: Open +Status: Assigned Type: Bug Package:FPM related Operating System: linux PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N Previous Comments: [2010-07-30 13:33:53] f...@php.net Description: r...@wild # ldd sapi/fpm/php-fpm ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb7d98000) ... r...@wild # ldd sapi/cli/php ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb803) ... libevent is linked by sapi/cli/php when it shouldn't Test script: --- compile PHP with --enable-fpm Expected result: r...@wild # ldd sapi/fpm/php-fpm ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb7d98000) ... r...@wild # ldd sapi/cli/php ... ... Actual result: -- r...@wild # ldd sapi/fpm/php-fpm ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb7d98000) ... r...@wild # ldd sapi/cli/php ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb803) ... -- Edit this bug report at http://bugs.php.net/bug.php?id=52498&edit=1
Bug #52501 [Opn->Ana]: Misconfigured Sendmail sends PHP-FPM into an infinite loop
Edit report at http://bugs.php.net/bug.php?id=52501&edit=1 ID: 52501 Updated by: f...@php.net Reported by:marekroman1 at gmail dot com Summary:Misconfigured Sendmail sends PHP-FPM into an infinite loop -Status: Open +Status: Analyzed Type: Bug Package:FPM related Operating System: DebianLenny2.6.26-2-openvz-amd64 PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N New Comment: 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 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. Previous Comments: [2010-07-31 00:25:45] marekroman1 at gmail dot com Description: (Misconfigured) Sendmail sends PHP-FPM into an infinite loop of spawning/exiting worker processes when attempting to send an email through the mail() function. (The php script itself just times out without any output.) Since this loop produces 100% cpu load and warnings AND logs these warnings, the log file has grown to 400MB+ before I noticed the load spike and stopped PHP-FPM master process with kill -9 PID (nothing else worked e.g. -QUIT). After I purge-removed the Sendmail package and installed Postfix instead, everything is working as it should (I didn't made any changes to nginx/php-fpm/php config files whatsoever). Server: nginx-0.8.47 PHP ini settings related to mail: "sendmail_path = /usr/sbin/sendmail -t -i" Sendmail state: daemon was not running (sendmail process was called, it did it's work i.e. nothing, then exited) PHP configure: ./configure --prefix=/usr --enable-fpm --disable-rpath --with-pear --disable-debug --with-openssl --with-pcre-regex --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --enable-inline-optimization --with-gd --enable-gd-native-ttf --with-gettext --with-imap --with-imap-ssl --with-kerberos --with-ldap --enable-mbstring --enable-mbregex --with-mcrypt --with-mysql --with-mysqli --enable-pcntl --enable-pdo --with-pdo-firebird --with-pdo-mysql --with-pdo-pgsql --with-pgsql --enable-shmop --enable-soap --enable-sockets --enable-sqlite-utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --enable-wddx --with-xmlrpc --with-xsl --enable-zip --with-pic --enable-ftp --enable-dom --enable-xmlwriter --enable-xmlreader --enable-tokenizer --enable-simplexml --enable-session --enable-posix --enable-phar --enable-libxml --enable-json --with-iconv --enable-filter --enable-fileinfo --enable-dba --enable-ctype Dynamic extensions: pecl apc-beta (apc.so) and rar (rar.so). Changed PHP-FPM settings: listen = /var/run/php-fpm/php-fpm.sock listen.owner = www-data listen.group = www-data user = www-data group = www-data pm = dynamic pm.max_children = 10 pm.start_servers = 4 pm.min_spare_servers = 3 pm.max_spare_servers = 6 request_terminate_timeout = 60 rlimit_files = 10240 chdir = /var/www catch_workers_output = yes Test script: --- $to = 'x...@abc.com'; // subject $subject = 'Birthday Reminders for August'; // message $message = ' Birthday Reminders for August Here are the birthdays upcoming in August! PersonDayMonthYear Joe3rdAugust1970 Sally17thAugust1973 '; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; // Additional headers $headers .= 'To: Dude Dudeson , Kelly ' . "\r\n"; $headers .= 'From: Birthday Reminder ' . "\r\n"; $headers .= 'Cc: topstal...@thehomeofallinternetpredators.com' . "\r\n"; // Mail it if (mail($to, $subject, $message, $headers)) echo "OKAY!"; Expected result: OKAY! Actual result: -- php-fpm error log: ... Trying to run a mail script ... Jul 28 11:42:20.169022 [WARNING] [pool www] child 6344, script '/var/www/xyz.com/public/mail.php' execution timed out (60.095817 sec), terminating Jul 28 11:42:20.169719 [WARNING] [pool www] child 6344 exited on signal 15 SIGTERM after 1532.840955 seconds from start Jul 28 11:42:20.170087 [NOTIC
Bug #52603 [Opn->Fbk]: php-fpm default init script does not load php.ini
Edit report at http://bugs.php.net/bug.php?id=52603&edit=1 ID: 52603 Updated by: f...@php.net Reported by:php at gigfa dot com Summary:php-fpm default init script does not load php.ini -Status: Open +Status: Feedback Type: Bug Package:FPM related Operating System: Linux Debian 5.04 PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. the default php.ini file is in %{prefix}/lib/php.ini and this file is loaded by PHP-FPM even when it's launched by the sapi/fpm/init.d.php-fpm script. How do you see it's not loaded ? Previous Comments: [2010-08-14 07:21:57] php at gigfa dot com Description: default php-fpm init script ( found in ./php-5.3.3/sapi/fpm/init.d.php-fpm after compilation ) does not load default php.ini file. I think to get the problem fixed, we need to replace : php_opts="--fpm-config $php_fpm_CONF" with : php_opts="-c %conf-path% --fpm-config $php_fpm_CONF" in this file : ./php-5.3.3/sapi/fpm/init.d.php-fpm.in -- Edit this bug report at http://bugs.php.net/bug.php?id=52603&edit=1
Bug #52609 [Fbk->Ana]: session.save_path in php-fpm does not handle ";" in extended format correctly
Edit report at http://bugs.php.net/bug.php?id=52609&edit=1 ID: 52609 Updated by: f...@php.net Reported by:rsyring at gmail dot com Summary:session.save_path in php-fpm does not handle ";" in extended format correctly -Status: Feedback +Status: Analyzed Type: Bug -Package:*Configuration Issues +Package:FPM related Operating System: ubuntu 10.04 PHP Version:5.3.3 Assigned To:fat Block user comment: N Previous Comments: [2010-08-15 16:41:30] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2010-08-15 05:56:41] rsyring at gmail dot com Description: Version Explanation = I am using 5.3.2-1ubuntu4.2 with the php-fpm package from here: https://launchpad.net/~brianmercer/+archive/php Sorry for mis-representing my version, but I don't have a good method at the moment for getting 5.3.3 on Lucid. Also, I checked the changelog here: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/ For any changes since the PPA was built and I did not see anything related to this particular issue, so it seems reasonable to assume this bug has not been fixed. It looks to me like php-fpm configuration parsing is not handling semi-colons inside of quotes correctly. The following value works correctly when set in php.ini: session.save_path = "0;0660;/home/webuser/tmp/php_sessions" The following value works correctly when set in php-fcm.conf php_admin_value[session.save_path] = "/home/webuser/tmp/php_sessions" By "works correctly" I mean that session files are saved to the target directory and the correct value is shown in phpinfo(). Expected result: With the following value set in a php-fcm.conf file: php_admin_value[session.save_path] = "0;0660;/home/webuser/tmp/php_sessions" I would expect to see: * sessions saved in /home/webuser/tmp/php_sessions * a mask of 0660 being used * expect to see "0;0660;/home/webuser/tmp/php_sessions" in the phpinfo() output for session.save_path Actual result: -- I actually see an error message when trying to use sessions: Warning: session_start(): open("0\/sess_9bite7f0iknrudokl1j080i5c7, O_RDWR) failed: No such file or directory and '"0' in the phpinfo() output for session.save_path -- Edit this bug report at http://bugs.php.net/bug.php?id=52609&edit=1
Bug #52609 [Ana->Fbk]: session.save_path in php-fpm does not handle ";" in extended format correctly
Edit report at http://bugs.php.net/bug.php?id=52609&edit=1 ID: 52609 Updated by: f...@php.net Reported by:rsyring at gmail dot com Summary:session.save_path in php-fpm does not handle ";" in extended format correctly -Status: Analyzed +Status: Feedback Type: Bug Package:FPM related Operating System: ubuntu 10.04 PHP Version:5.3.3 Assigned To:fat Block user comment: N New Comment: Can you please try the attached patch ? Thx Previous Comments: [2010-08-15 18:37:49] f...@php.net The following patch has been added/updated: Patch Name: php-fpm.ini_scanner_normal.patch Revision: 1281890269 URL: http://bugs.php.net/patch-display.php?bug=52609&patch=php-fpm.ini_scanner_normal.patch&revision=1281890269 [2010-08-15 16:41:30] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2010-08-15 05:56:41] rsyring at gmail dot com Description: Version Explanation = I am using 5.3.2-1ubuntu4.2 with the php-fpm package from here: https://launchpad.net/~brianmercer/+archive/php Sorry for mis-representing my version, but I don't have a good method at the moment for getting 5.3.3 on Lucid. Also, I checked the changelog here: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/ For any changes since the PPA was built and I did not see anything related to this particular issue, so it seems reasonable to assume this bug has not been fixed. It looks to me like php-fpm configuration parsing is not handling semi-colons inside of quotes correctly. The following value works correctly when set in php.ini: session.save_path = "0;0660;/home/webuser/tmp/php_sessions" The following value works correctly when set in php-fcm.conf php_admin_value[session.save_path] = "/home/webuser/tmp/php_sessions" By "works correctly" I mean that session files are saved to the target directory and the correct value is shown in phpinfo(). Expected result: With the following value set in a php-fcm.conf file: php_admin_value[session.save_path] = "0;0660;/home/webuser/tmp/php_sessions" I would expect to see: * sessions saved in /home/webuser/tmp/php_sessions * a mask of 0660 being used * expect to see "0;0660;/home/webuser/tmp/php_sessions" in the phpinfo() output for session.save_path Actual result: -- I actually see an error message when trying to use sessions: Warning: session_start(): open("0\/sess_9bite7f0iknrudokl1j080i5c7, O_RDWR) failed: No such file or directory and '"0' in the phpinfo() output for session.save_path -- Edit this bug report at http://bugs.php.net/bug.php?id=52609&edit=1
Bug #52615 [Bgs->Fbk]: Blank status page
Edit report at http://bugs.php.net/bug.php?id=52615&edit=1 ID: 52615 Updated by: f...@php.net Reported by:vlad at vladgh dot com Summary:Blank status page -Status: Bogus +Status: Feedback Type: Bug Package:FPM related Operating System: Ubuntu 10.04 PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N New Comment: what is the last value of accepted conn you had before it returns a blank page ? did you change anything on the nginx or FPM conf before it stopped working ? Previous Comments: [2010-08-16 05:21:56] ahar...@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. [2010-08-16 05:13:15] vlad at vladgh dot com Description: I have php 5.3.3 installed from sources with nginx. FPM is working with the status page activated and working correctly. My problem is that a few days ago my status page suddenly stopped working. It just shows a blank with status 200. I ruled out nginx as the culprit. Is there anything I ca do about this. Thank you in advance, Vlad. -- Edit this bug report at http://bugs.php.net/bug.php?id=52615&edit=1
Bug #52615 [Asn->Fbk]: Blank status page
Edit report at http://bugs.php.net/bug.php?id=52615&edit=1 ID: 52615 Updated by: f...@php.net Reported by:vlad at vladgh dot com Summary:Blank status page -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Ubuntu 10.04 PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: Hum to be sure, which status page are you talking about : the nginx one or the FPM one ? I'm now confused. Does it look like this ? accepted conn 155132211 poolwww_chroot process manager static idle processes 97 active processes3 total processes 100 Previous Comments: [2010-08-18 15:47:32] vlad at vladgh dot com It was somewhere in the range of 1 mil connections. Thank you for restarting this thread but I had to do a clean reinstall of my server, with a new configuration for both fpm and nginx, and it is working properly so far. But in the end I suspect nginx of being the culprit because everything else was working except the status page. Thank you anyway, Vlad. [2010-08-18 14:27:58] f...@php.net what is the last value of accepted conn you had before it returns a blank page ? did you change anything on the nginx or FPM conf before it stopped working ? [2010-08-16 05:21:56] ahar...@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. [2010-08-16 05:13:15] vlad at vladgh dot com Description: I have php 5.3.3 installed from sources with nginx. FPM is working with the status page activated and working correctly. My problem is that a few days ago my status page suddenly stopped working. It just shows a blank with status 200. I ruled out nginx as the culprit. Is there anything I ca do about this. Thank you in advance, Vlad. -- Edit this bug report at http://bugs.php.net/bug.php?id=52615&edit=1
Bug #52615 [Asn->Bgs]: Blank status page
Edit report at http://bugs.php.net/bug.php?id=52615&edit=1 ID: 52615 Updated by: f...@php.net Reported by:vlad at vladgh dot com Summary:Blank status page -Status: Assigned +Status: Bogus Type: Bug Package:FPM related Operating System: Ubuntu 10.04 PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. OK reup this bug if needed Previous Comments: [2010-08-18 15:59:21] vlad at vladgh dot com Yes I was talking about the FPM status page activated by pm.status_path in php-fpm.conf. But like I said, I reinstalled everything and now it works. I will let you know if the problem reappears. Thank you. [2010-08-18 15:53:46] f...@php.net Hum to be sure, which status page are you talking about : the nginx one or the FPM one ? I'm now confused. Does it look like this ? accepted conn 155132211 poolwww_chroot process manager static idle processes 97 active processes3 total processes 100 [2010-08-18 15:47:32] vlad at vladgh dot com It was somewhere in the range of 1 mil connections. Thank you for restarting this thread but I had to do a clean reinstall of my server, with a new configuration for both fpm and nginx, and it is working properly so far. But in the end I suspect nginx of being the culprit because everything else was working except the status page. Thank you anyway, Vlad. [2010-08-18 14:27:58] f...@php.net what is the last value of accepted conn you had before it returns a blank page ? did you change anything on the nginx or FPM conf before it stopped working ? [2010-08-16 05:21:56] ahar...@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. 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=52615 -- Edit this bug report at http://bugs.php.net/bug.php?id=52615&edit=1
Bug #52609 [Asn->Csd]: session.save_path in php-fpm does not handle ";" in extended format correctly
Edit report at http://bugs.php.net/bug.php?id=52609&edit=1 ID: 52609 Updated by: f...@php.net Reported by:rsyring at gmail dot com Summary:session.save_path in php-fpm does not handle ";" in extended format correctly -Status: Assigned +Status: Closed Type: Bug Package:FPM related Operating System: ubuntu 10.04 PHP Version:5.3.3 Assigned To:fat Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-08-20 10:33:59] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=302531 Log: Fix #52609 (INI scanner did not use ZEND_INI_SCANNER_NORMAL) [2010-08-19 11:31:43] f...@php.net this new revision corrects also the same problem when passing INI variable from the fastcgi client (PHP_VALUE and PHP_ADMIN_VALUE) [2010-08-19 11:30:34] f...@php.net The following patch has been added/updated: Patch Name: php-fpm.ini_scanner_normal.patch Revision: 1282210234 URL: http://bugs.php.net/patch-display.php?bug=52609&patch=php-fpm.ini_scanner_normal.patch&revision=1282210234 [2010-08-16 15:33:32] rsyring at gmail dot com Thanks for working on this. I am sorry that I can't currently test the snapshot or patch as I am limited to working with ubuntu packages at the moment. I may be able to eventually get some custom packages configured and compiled, but that won't be for another month or two at least. [2010-08-15 18:39:27] f...@php.net Can you please try the attached patch ? Thx 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=52609 -- Edit this bug report at http://bugs.php.net/bug.php?id=52609&edit=1
Req #52659 [Opn->Bgs]: change FPM processes title according to their type
Edit report at http://bugs.php.net/bug.php?id=52659&edit=1 ID: 52659 Updated by: f...@php.net Reported by:f...@php.net Summary:change FPM processes title according to their type -Status: Open +Status: Bogus Type: Feature/Change Request Package:FPM related Operating System: * PHP Version:5.3.3 Block user comment: N New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Previous Comments: [2010-08-20 19:31:24] f...@php.net Description: each FPM process have the same name (the command line used to launched it). It would be great to name them according to their type. The master process: "php-fpm: master process (path/to/conf/file)" The children processes: "php-fpm: pool www.foo.bar" Test script: --- #!/bin/sh ps a | grep fpm Expected result: 21744 pts/3S+ 0:00 php-fpm: master process (/usr/local/php-trunk/etc/php- fpm.conf) 21745 pts/3S+ 0:00 php-fpm: pool www_chroot 21746 pts/3S+ 0:00 php-fpm: pool www_direct Actual result: -- 23464 pts/3S+ 0:00 ./sapi/fpm/php-fpm 23465 pts/3S+ 0:00 ./sapi/fpm/php-fpm 23466 pts/3S+ 0:00 ./sapi/fpm/php-fpm -- Edit this bug report at http://bugs.php.net/bug.php?id=52659&edit=1
Req #52660 [Opn->Ana]: change FPM processes title according to their type
Edit report at http://bugs.php.net/bug.php?id=52660&edit=1 ID: 52660 Updated by: f...@php.net Reported by:f...@php.net Summary:change FPM processes title according to their type -Status: Open +Status: Analyzed Type: Feature/Change Request Package:FPM related Operating System: * PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N Previous Comments: [2010-08-20 19:32:08] f...@php.net Description: each FPM process have the same name (the command line used to launched it). It would be great to name them according to their type. The master process: "php-fpm: master process (path/to/conf/file)" The children processes: "php-fpm: pool www.foo.bar" Test script: --- #!/bin/sh ps a | grep fpm Expected result: 21744 pts/3S+ 0:00 php-fpm: master process (/usr/local/php-trunk/etc/php- fpm.conf) 21745 pts/3S+ 0:00 php-fpm: pool www_chroot 21746 pts/3S+ 0:00 php-fpm: pool www_direct Actual result: -- 23464 pts/3S+ 0:00 ./sapi/fpm/php-fpm 23465 pts/3S+ 0:00 ./sapi/fpm/php-fpm 23466 pts/3S+ 0:00 ./sapi/fpm/php-fpm -- Edit this bug report at http://bugs.php.net/bug.php?id=52660&edit=1
Bug #52603 [Asn->Bgs]: php-fpm default init script does not load php.ini
Edit report at http://bugs.php.net/bug.php?id=52603&edit=1 ID: 52603 Updated by: f...@php.net Reported by:php at gigfa dot com Summary:php-fpm default init script does not load php.ini -Status: Assigned +Status: Bogus Type: Bug Package:FPM related Operating System: Linux Debian 5.04 PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This not a bug. ./configure ... --with-config-file-path=/etc/php5/php.ini is wrong. You had the previous phpinfo output: #php -i | grep Configuration Configuration File (php.ini) Path => /etc/php5/php.ini Loaded Configuration File => (none) You have to set a directory path to --with-config-file-path. PHP will search there for a php.ini file. In your case, you have to use ./configure ... --with-config-file-path=/etc/php5 is wrong and you'll have the following phpinfo output #php -i | grep Configuration Configuration File (php.ini) Path => /etc/php5 Loaded Configuration File => /etc/php5/php.ini Previous Comments: [2010-08-14 14:40:47] php at gigfa dot com I have compiled php with this option : ./configure \ --enable-fpm \ --with-config-file-path=/etc/php5/php.ini When I use phpinfo(); to see if the config file has loaded or not, I see : Configuration File (php.ini) Path /etc/php5/php.ini Loaded Configuration File (none) [2010-08-14 12:18:59] f...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. the default php.ini file is in %{prefix}/lib/php.ini and this file is loaded by PHP-FPM even when it's launched by the sapi/fpm/init.d.php-fpm script. How do you see it's not loaded ? [2010-08-14 07:21:57] php at gigfa dot com Description: default php-fpm init script ( found in ./php-5.3.3/sapi/fpm/init.d.php-fpm after compilation ) does not load default php.ini file. I think to get the problem fixed, we need to replace : php_opts="--fpm-config $php_fpm_CONF" with : php_opts="-c %conf-path% --fpm-config $php_fpm_CONF" in this file : ./php-5.3.3/sapi/fpm/init.d.php-fpm.in -- Edit this bug report at http://bugs.php.net/bug.php?id=52603&edit=1
Bug #51772 [Asn->Fbk]: php-fpm do not support PowerPC processors
Edit report at http://bugs.php.net/bug.php?id=51772&edit=1 ID: 51772 Updated by: f...@php.net Reported by:vaskes at mail dot ru Summary:php-fpm do not support PowerPC processors -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: RedHat Ent. server 5.4-ppc64 PHP Version:5.3.2 -Assigned To: fat +Assigned To:tony2001 Block user comment: N Previous Comments: [2010-06-23 18:59:23] tony2...@php.net Ok, let me know if you need any help. More info on your problems would be appreciated, of course. [2010-06-17 22:28:42] vaskes at mail dot ru Using http://snaps.php.net/php5.3-201006161230.tar.gz this patch applied successfully and php compiled successfully too. I did some stress testing on this php-fpm and discover that php-fpm working unstable. I will perform some additional test to discover the issue more thoroughly and post results here. [2010-06-09 15:43:28] tony2...@php.net sapi/fpm/fpm/fpm_main.o: In function `main': /home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1698: undefined reference to `php_output_end_all' No, trunk is not broken =) You're trying to compile FPM from trunk with 5.3.2 while you should be using FPM from PHP_5_3 branch instead. But the easiest way to test it would be to try a snapshot from http://snaps.php.net This way you wouldn't need to manually add FPM to your sources, since FPM is already available in 5.3.3 snapshots. [2010-06-09 12:17:56] f...@php.net trunk seems to be broken. please try to apply the patch in PHP_5_3 branch instead. [2010-06-09 11:29:52] vaskes at mail dot ru I can provide ssh access to ppc server. 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=51772 -- Edit this bug report at http://bugs.php.net/bug.php?id=51772&edit=1
Bug #51769 [Asn->Csd]: the problem of fpm_conf.c
Edit report at http://bugs.php.net/bug.php?id=51769&edit=1 ID: 51769 Updated by: f...@php.net Reported by:lxltiancai at 126 dot com Summary:the problem of fpm_conf.c -Status: Assigned +Status: Closed Type: Bug Package:*General Issues Operating System: ubuntu 9.10 PHP Version:5.3.2 Assigned To: fat Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. This has been fixed in revision 299141 Previous Comments: [2010-05-08 11:53:38] ka...@php.net Hmm I meant try a snapshot from trunk where php-fpm is actively developed. I belive a similar bug if not the same was just fixed in trunk today [2010-05-08 11:52:45] ka...@php.net Please try using this snapshot: http://snaps.php.net/php6.0-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2010-05-08 04:58:16] lxltiancai at 126 dot com Description: when i start php-fpm,i met the fellowing message: [pool www] start_servers(18) must not be less than min_spare_servers(30) and not greater than max_spare_servers(30) but in fact,the value of min_spare_servers is 5; Test script: --- there is something wrong in line 459-460 of fpm_conf.c i think the correct code shoule be: } else if (config->pm_start_servers < config->pm_min_spare_servers || config->pm_start_servers > config->pm_max_spare_servers) { zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] start_servers(%d) must not be less than min_spare_servers(%d) and not greater than max_spare_servers(%d)", wp->config->name, config->pm_start_servers, config->pm_min_spare_servers, config->pm_max_spare_servers); -- Edit this bug report at http://bugs.php.net/bug.php?id=51769&edit=1
Bug #52407 [Asn->Csd]: FPM module compilation fails on ARM architecture
Edit report at http://bugs.php.net/bug.php?id=52407&edit=1 ID: 52407 Updated by: f...@php.net Reported by:eugenesan at gmail dot com Summary:FPM module compilation fails on ARM architecture -Status: Assigned +Status: Closed Type: Bug Package:Compile Failure Operating System: Linux PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-08-21 08:46:20] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=302600 Log: - Fix #52407 (use __sync_bool_compare_and_swap in fpm_atomic.h if gcc >= 4.1 is used - credit to geissert) [2010-07-28 23:34:31] geiss...@php.net I attached the patch that I'm going to use for the Debian packages until it is fixed here directly. Jérôme, could you consider it? [2010-07-28 23:31:05] geiss...@php.net The following patch has been added/updated: Patch Name: fpm-gcc-atomics.patch Revision: 1280352665 URL: http://bugs.php.net/patch-display.php?bug=52407&patch=fpm-gcc-atomics.patch&revision=1280352665 [2010-07-24 14:37:24] f...@php.net Can you please test & validate this patch on ARM arch ? I've added an #error if ARM && gcc <= 4.2 [2010-07-24 14:36:05] f...@php.net The following patch has been added/updated: Patch Name: fpm_atomic_h_fix.patch Revision: 1279974965 URL: http://bugs.php.net/patch-display.php?bug=52407&patch=fpm_atomic_h_fix.patch&revision=1279974965 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=52407 -- Edit this bug report at http://bugs.php.net/bug.php?id=52407&edit=1
Bug #52674 [Opn->Ana]: [FPM] Status page returns inconsistent Content-Type headers
Edit report at http://bugs.php.net/bug.php?id=52674&edit=1 ID: 52674 Updated by: f...@php.net Reported by:php-bugs at majkl578 dot cz -Summary:[FPM] Status page does not work under Apache 2.2 +Summary:[FPM] Status page returns inconsistent Content-Type headers -Status: Open +Status: Analyzed Type: Bug Package:FPM related Operating System: Linux Debian PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N New Comment: The status page does not return a valid Content-Type header: ... text/plain Content-type: text/plain ... it should be ... Content-type: text/plain ... It affects apache but also any other front web servers. Nginx is more tolerant and ignores unknown / malformed headers but text/html was use instead. Previous Comments: [2010-08-23 04:23:08] php-bugs at majkl578 dot cz Description: Apache 2 ends up with an error while trying to get content of /status url. Ping url works fine. Same problem with /status?json and /status?html. Apache version: 2.2.16, mpm-worker mod_fastcgi version: 2.4.6 Test script: --- FastCGIExternalServer /php5-fpm-handler -socket "/var/run/php5-fpm.sock" AddHandler php5-fcgi .php SetHandler php5-fcgi-virt Action php5-fcgi-virt /php5-fpm-handler.fcgi virtual Action php5-fcgi /php5-fpm-handler.fcgi ScriptAlias /php5-fpm-handler.fcgi /php5-fpm-handler Expected result: FPM status page Actual result: -- 500 Internal error Logged in Apache's error log: [Mon Aug 23 04:16:55 2010] [error] [client 127.0.0.1] FastCGI: comm with server "/php5-fpm-handler" aborted: error parsing headers: malformed header 'text/plain' -- Edit this bug report at http://bugs.php.net/bug.php?id=52674&edit=1
Bug #52674 [Ana->Csd]: [FPM] Status page returns inconsistent Content-Type headers
Edit report at http://bugs.php.net/bug.php?id=52674&edit=1 ID: 52674 Updated by: f...@php.net Reported by:php-bugs at majkl578 dot cz Summary:[FPM] Status page returns inconsistent Content-Type headers -Status: Analyzed +Status: Closed Type: Bug Package:FPM related Operating System: Linux Debian PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-08-23 22:40:46] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=302721 Log: - Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers). [2010-08-23 10:38:51] f...@php.net Moreover, the Content-Type used for json was not the best choice. It was application/jsonrequest. As specified in RFC4627, it should be application/json. [2010-08-23 10:28:43] f...@php.net The status page does not return a valid Content-Type header: ... text/plain Content-type: text/plain ... it should be ... Content-type: text/plain ... It affects apache but also any other front web servers. Nginx is more tolerant and ignores unknown / malformed headers but text/html was use instead. [2010-08-23 04:23:08] php-bugs at majkl578 dot cz Description: Apache 2 ends up with an error while trying to get content of /status url. Ping url works fine. Same problem with /status?json and /status?html. Apache version: 2.2.16, mpm-worker mod_fastcgi version: 2.4.6 Test script: --- FastCGIExternalServer /php5-fpm-handler -socket "/var/run/php5-fpm.sock" AddHandler php5-fcgi .php SetHandler php5-fcgi-virt Action php5-fcgi-virt /php5-fpm-handler.fcgi virtual Action php5-fcgi /php5-fpm-handler.fcgi ScriptAlias /php5-fpm-handler.fcgi /php5-fpm-handler Expected result: FPM status page Actual result: -- 500 Internal error Logged in Apache's error log: [Mon Aug 23 04:16:55 2010] [error] [client 127.0.0.1] FastCGI: comm with server "/php5-fpm-handler" aborted: error parsing headers: malformed header 'text/plain' -- Edit this bug report at http://bugs.php.net/bug.php?id=52674&edit=1
Req #52691 [Opn->Ana]: allow multiple instance of FPM using a custom prefix
Edit report at http://bugs.php.net/bug.php?id=52691&edit=1 ID: 52691 Updated by: f...@php.net Reported by:f...@php.net Summary:allow multiple instance of FPM using a custom prefix -Status: Open +Status: Analyzed Type: Feature/Change Request Package:FPM related Operating System: * PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N Previous Comments: [2010-08-24 23:21:22] f...@php.net Description: Like nginx (nginx -p) or apache (httpd -d), FPM should have a command line option to set a custom prefix on which all relative file path can depend on. "php-fpm -p /var/www" will look for /var/www/etc/php-fpm.conf. pid=logs/php-fpm.pid ; will expand to /var/www/logs/php-fpm.pid ... Moreover it could be great to have a custom prefix per pool also. php-fpm -p /var/www ; /var/www/etc/php-fpm.conf pid=logs/php-fpm.pid [www1] prefix = www1 ; expand to /var/www/www1 include = fpm.default.conf [www2] prefix = www2 ; expand to /var/www/www2 include = fpm.default.conf ; fpm.default.conf listen = logs/php-fpm.sock ; expand to /var/www/www{1,2}/logs/php-fpm.sock pm = static pm.max_children = 50 slowlog = logs/php-fpm.slowlog ; expand to /var/www/www{1,2}/logs/php- fpm.slowlog chroot = $prefix ; expand to /var/www/www{1,2} chdir = /docs php_value[error_log] = /logs/php.error.log ... -- Edit this bug report at http://bugs.php.net/bug.php?id=52691&edit=1
Req #52692 [Opn->Ana]: allow to test and validate FPM conf file from command line
Edit report at http://bugs.php.net/bug.php?id=52692&edit=1 ID: 52692 Updated by: f...@php.net Reported by:f...@php.net Summary:allow to test and validate FPM conf file from command line -Status: Open +Status: Analyzed Type: Feature/Change Request Package:FPM related Operating System: * PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N Previous Comments: [2010-08-24 23:25:42] f...@php.net Description: Like nginx and apache (with the -t argument), FPM should be able to be ran with the -t argument to test and validate the FPM conf file. Test script: --- root# php-fpm -t the configuration file /usr/local/php/etc/php-fpm.conf syntax is ok configuration file /usr/local/php/etc/php-fpm.conf test is successful -- Edit this bug report at http://bugs.php.net/bug.php?id=52692&edit=1
Bug #52693 [Opn->Ana]: configuration file errors are not logged to stderr
Edit report at http://bugs.php.net/bug.php?id=52693&edit=1 ID: 52693 Updated by: f...@php.net Reported by:f...@php.net Summary:configuration file errors are not logged to stderr -Status: Open +Status: Analyzed Type: Bug Package:FPM related Operating System: * PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N Previous Comments: [2010-08-25 00:21:26] f...@php.net The following patch has been added/updated: Patch Name: fpm-stderr.v1.patch Revision: 1282688485 URL: http://bugs.php.net/patch-display.php?bug=52693&patch=fpm-stderr.v1.patch&revision=1282688485 [2010-08-24 23:35:40] f...@php.net Description: When FPM is launched, if there is an error which prevents FPM from starting, nothing is written to stderr. Everyhting is logged to error_log only. Test script: --- set a non sense value in php-fpm.conf: listen=/tmp/php-fpm.sock listen.user = nobody listen.group = johndoe Expected result: r...@wild:/LIBRE/dev/php-src/trunk# ./sapi/fpm/php-fpm r...@wild:/LIBRE/dev/php-src/trunk# ps aux | grep php-fpm root 5473 0.0 0.0 2420 816 pts/3S+ 23:29 0:00 grep php-fpm r...@wild:/LIBRE/dev/php-src/trunk# tail -n 1 /tmp/php-fpm/php-fpm.log Aug 24 23:29:35.774255 [ERROR] pid 5471, fpm_unix_resolve_socket_premissions(), line 61: [pool www_chroot] cannot get gid for group 'johndoe': Success (0) Actual result: -- r...@wild:/LIBRE/dev/php-src/trunk# ./sapi/fpm/php-fpm r...@wild:/LIBRE/dev/php-src/trunk# ps ax | grep php-fpm 5579 ?Ss 0:00 ./sapi/fpm/php-fpm -p /tmp/php-fpm 5580 ?S 0:00 ./sapi/fpm/php-fpm -p /tmp/php-fpm 5581 ?S 0:00 ./sapi/fpm/php-fpm -p /tmp/php-fpm 5582 ?S 0:00 ./sapi/fpm/php-fpm -p /tmp/php-fpm r...@wild:/LIBRE/dev/php-src/trunk# tail -n 1 /tmp/php-fpm/php-fpm.log Aug 24 23:31:54.094551 [NOTICE] pid 5579, fpm_event_loop(), line 111: ready to handle connections -- Edit this bug report at http://bugs.php.net/bug.php?id=52693&edit=1
Bug #52710 [Opn->Fbk]: Session Disappears
Edit report at http://bugs.php.net/bug.php?id=52710&edit=1 ID: 52710 Updated by: f...@php.net Reported by:diemuzi at gmail dot com Summary:Session Disappears -Status: Open +Status: Feedback Type: Bug Package:FPM related Operating System: Archlinux PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N New Comment: Can you please provide you complete php-fpm.conf ? Previous Comments: [2010-08-26 22:11:52] diemuzi at gmail dot com Description: It appears when running PHP 5.3.3 with FPM support sessions disappear on almost every-other request. The session name stays the same, but any application using a session returns a blank page until the page has been refreshed again. Currently I have the session.save_path to /tmp, I tested other locations but the same issue. (This did not occur with FastCGI/CGI). As another test I changed the location of the save_path and loaded a phpinfo() script. It showed the corrected changed location, however upon refresh it was changed back to /tmp. Another refresh and the location was again changed to the path I specified. When the path changes, it does not write a new session file in either location. The error in the error log is always: FastCGI: server stdeer: PHP Fatal error session_start(); open(/tmp/session_name_here, O_RDWR) failed: Permission denied(13) Array Testing with random permissions ranging from 0644, 0666, 0755, 0777 return the same results. I also attempted to change the permissions to the actual session file and the same results. -- Edit this bug report at http://bugs.php.net/bug.php?id=52710&edit=1
Bug #52710 [Asn->Fbk]: Session Disappears
Edit report at http://bugs.php.net/bug.php?id=52710&edit=1 ID: 52710 Updated by: f...@php.net Reported by:diemuzi at gmail dot com Summary:Session Disappears -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: Archlinux PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: HUm well I'm using a quite similar configuration and it works without any problems. Can you strace the child process when the problem occurs and report the returned result please ? strace -p PID -s 1024 -o /tmp/strace.fpm.log Previous Comments: [2010-08-26 22:31:28] diemuzi at gmail dot com # # php-fpm.conf # ; FPM Configuration ; ; ; All relative paths in this configuration file are relative to PHP's install ; prefix. ; Include one or more files. If glob(3) exists, it is used to include a bunch of ; files from a glob(3) pattern. This directive can be used everywhere in the ; file. include=/usr/local/etc/fpm.d/*.conf ;; ; Global Options ; ;; [global] ; Pid file ; Default Value: none pid = /var/run/php-fpm.pid ; Error log file ; Default Value: /usr/local/var/log/php-fpm.log error_log = /var/log/php-fpm.log ; Log level ; Possible Values: alert, error, warning, notice, debug ; Default Value: notice log_level = notice ; If this number of child processes exit with SIGSEGV or SIGBUS within the time ; interval set by emergency_restart_interval then FPM will restart. A value ; of '0' means 'Off'. ; Default Value: 0 ;emergency_restart_threshold = 1 ; Interval of time used by emergency_restart_interval to determine when ; a graceful restart will be initiated. This can be useful to work around ; accidental corruptions in an accelerator's shared memory. ; Available Units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 ;emergency_restart_interval = 1 ; Time limit for child processes to wait for a reaction on signals from master. ; Available units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds ; Default Value: 0 ;process_control_timeout = 1 ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Default Value: yes daemonize = no # # admin.conf (included by php-fpm.conf) # [admin] listen = /tmp/fcgi_ipc/php-fpm.sock listen.backlog = -1 listen.owner = apache listen.group = apache listen.mode = 0777 user = admin group = admin pm = dynamic pm.max_children = 1 pm.start_servers = 1 pm.min_spare_servers = 1 pm.max_spare_servers = 1 pm.max_requests = 500 catch_workers_output = no # # Notes # I attempted to change the values of the servers thinking perhaps it had something to do with that but no luck. As for php.ini they are default values which comes packaged with PHP 5.3.3 just for sanity tests. As an additional test a moment ago I switched back to FastCGI/CGI mode without FPM support and as expected I did not encounter this situation. If this is a configuration issue, I appologize for the bug report. [2010-08-26 22:23:59] f...@php.net Can you please provide you complete php-fpm.conf ? [2010-08-26 22:11:52] diemuzi at gmail dot com Description: It appears when running PHP 5.3.3 with FPM support sessions disappear on almost every-other request. The session name stays the same, but any application using a session returns a blank page until the page has been refreshed again. Currently I have the session.save_path to /tmp, I tested other locations but the same issue. (This did not occur with FastCGI/CGI). As another test I changed the location of the save_path and loaded a phpinfo() script. It showed the corrected changed location, however upon refresh it was changed back to /tmp. Another refresh and the location was again changed to the path I specified. When the path changes, it does not write a new session file in either location. The error in the error log is always: FastCGI: server stdeer: PHP Fatal error session_start(); open(/tmp/session_name_here, O_RDWR) failed: Permission denied(13) Array Testing with random permissions ranging from 0644, 0666, 0755, 0777 return the same results. I also attempted to change the permissions to the actual session file and the same results. -- Edit this bug report at http://bugs.php.net/bug.php?id=52710&edit=1
Bug #52735 [Opn->Asn]: config values should be trimed
Edit report at http://bugs.php.net/bug.php?id=52735&edit=1 ID: 52735 Updated by: f...@php.net Reported by:miha dot vrhovnik at domenca dot com Summary:config values should be trimed -Status: Open +Status: Assigned Type: Bug Package:FPM related Operating System: any PHP Version:5.3.3 -Assigned To: +Assigned To: fat Block user comment: N Previous Comments: [2010-08-30 09:16:38] miha dot vrhovnik at domenca dot com Description: Starting php5-fpm Aug 30 06:58:21.982996 [ALERT] [pool www] pm.min_spare_servers(0) must be a positive value Aug 30 06:58:21.983104 [ERROR] failed to post process the configuration failed The problem is that after the actual value (number) I had a space. This problem might effect other config variables also. Solution for this is obvious. All settings? should be trimmed first, before put to use. -- Edit this bug report at http://bugs.php.net/bug.php?id=52735&edit=1
Bug #52735 [Asn->Fbk]: config values should be trimed
Edit report at http://bugs.php.net/bug.php?id=52735&edit=1 ID: 52735 Updated by: f...@php.net Reported by:miha dot vrhovnik at domenca dot com Summary:config values should be trimed -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: any PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ It's been corrected in revision 302531 several days ago. Previous Comments: [2010-08-30 09:16:38] miha dot vrhovnik at domenca dot com Description: Starting php5-fpm Aug 30 06:58:21.982996 [ALERT] [pool www] pm.min_spare_servers(0) must be a positive value Aug 30 06:58:21.983104 [ERROR] failed to post process the configuration failed The problem is that after the actual value (number) I had a space. This problem might effect other config variables also. Solution for this is obvious. All settings? should be trimmed first, before put to use. -- Edit this bug report at http://bugs.php.net/bug.php?id=52735&edit=1
Bug #52725 [Asn->Fbk]: undefined reference to `__sync_bool_compare_and_swap_4'
Edit report at http://bugs.php.net/bug.php?id=52725&edit=1 ID: 52725 Updated by: f...@php.net Reported by:fedora at famillecollet dot com Summary:undefined reference to `__sync_bool_compare_and_swap_4' -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: GNU/Linux (RHEL 5.5) PHP Version:5.3SVN-2010-08-28 (snap) Assigned To: fat Block user comment: N New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Can you please try the following patch ? Don't forget to run ./buildconf before executing ./configure --enable-fpm && make. Thanks Previous Comments: [2010-08-30 15:45:55] f...@php.net The following patch has been added/updated: Patch Name: fpm_builtin_atomic.patch Revision: 1283175955 URL: http://bugs.php.net/patch-display.php?bug=52725&patch=fpm_builtin_atomic.patch&revision=1283175955 [2010-08-28 22:37:23] fedora at famillecollet dot com Description: Build fails on RHEL/Centos 5 (gcc-4.1.2) sapi/fpm/fpm/fpm_shm_slots.o: In function `fpm_spinlock': /builddir/build/BUILD/php5.3-201008281230/sapi/fpm/fpm/fpm_atomic.h:148: undefined reference to `__sync_bool_compare_and_swap_4' /builddir/build/BUILD/php5.3-201008281230/sapi/fpm/fpm/fpm_atomic.h:143: undefined reference to `__sync_bool_compare_and_swap_4' This seems linked to commit 302600 http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h?r1=299794&r2=302600 Changing the test fixes the issue #if (__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2) I don't know which is the correct value. Build ok on fedora 12 (gcc-4.4.4) and fedora 13 (gcc-4.4.4) -- Edit this bug report at http://bugs.php.net/bug.php?id=52725&edit=1
Bug #52725 [Asn->Ana]: gcc builtin atomic functions are sometimes used when they are not available
Edit report at http://bugs.php.net/bug.php?id=52725&edit=1 ID: 52725 Updated by: f...@php.net Reported by:fedora at famillecollet dot com -Summary:undefined reference to `__sync_bool_compare_and_swap_4' +Summary:gcc builtin atomic functions are sometimes used when they are not available -Status: Assigned +Status: Analyzed Type: Bug Package:FPM related Operating System: GNU/Linux (RHEL 5.5) PHP Version:5.3SVN-2010-08-28 (snap) Assigned To: fat Block user comment: N Previous Comments: [2010-08-30 18:19:34] fedora at famillecollet dot com Try build of latest snapshot (201008301430) with your patch Fedora 13 x86_64 - gcc 4.4.4 : BUILD OK $ grep HAVE_BUILTIN_ATOMIC build-fpm/main/php_config.h #define HAVE_BUILTIN_ATOMIC 1 Enterprise Linux 5 i386 - gcc 4.1.2 : BUILD OK $ grep HAVE_BUILTIN_ATOMIC build-fpm/main/php_config.h /* #undef HAVE_BUILTIN_ATOMIC */ So, the patch seems fine to me. Thanks for taking care of this. [2010-08-30 15:47:11] f...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Can you please try the following patch ? Don't forget to run ./buildconf before executing ./configure --enable-fpm && make. Thanks [2010-08-30 15:45:55] f...@php.net The following patch has been added/updated: Patch Name: fpm_builtin_atomic.patch Revision: 1283175955 URL: http://bugs.php.net/patch-display.php?bug=52725&patch=fpm_builtin_atomic.patch&revision=1283175955 [2010-08-28 22:37:23] fedora at famillecollet dot com Description: Build fails on RHEL/Centos 5 (gcc-4.1.2) sapi/fpm/fpm/fpm_shm_slots.o: In function `fpm_spinlock': /builddir/build/BUILD/php5.3-201008281230/sapi/fpm/fpm/fpm_atomic.h:148: undefined reference to `__sync_bool_compare_and_swap_4' /builddir/build/BUILD/php5.3-201008281230/sapi/fpm/fpm/fpm_atomic.h:143: undefined reference to `__sync_bool_compare_and_swap_4' This seems linked to commit 302600 http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h?r1=299794&r2=302600 Changing the test fixes the issue #if (__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2) I don't know which is the correct value. Build ok on fedora 12 (gcc-4.4.4) and fedora 13 (gcc-4.4.4) -- Edit this bug report at http://bugs.php.net/bug.php?id=52725&edit=1
Bug #52725 [Ana->Csd]: gcc builtin atomic functions are sometimes used when they are not available
Edit report at http://bugs.php.net/bug.php?id=52725&edit=1 ID: 52725 Updated by: f...@php.net Reported by:fedora at famillecollet dot com Summary:gcc builtin atomic functions are sometimes used when they are not available -Status: Analyzed +Status: Closed Type: Bug Package:FPM related Operating System: GNU/Linux (RHEL 5.5) PHP Version:5.3SVN-2010-08-28 (snap) Assigned To: fat Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-09-01 10:17:20] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=302965 Log: - Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they were not available). [2010-08-30 18:19:34] fedora at famillecollet dot com Try build of latest snapshot (201008301430) with your patch Fedora 13 x86_64 - gcc 4.4.4 : BUILD OK $ grep HAVE_BUILTIN_ATOMIC build-fpm/main/php_config.h #define HAVE_BUILTIN_ATOMIC 1 Enterprise Linux 5 i386 - gcc 4.1.2 : BUILD OK $ grep HAVE_BUILTIN_ATOMIC build-fpm/main/php_config.h /* #undef HAVE_BUILTIN_ATOMIC */ So, the patch seems fine to me. Thanks for taking care of this. [2010-08-30 15:47:11] f...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Can you please try the following patch ? Don't forget to run ./buildconf before executing ./configure --enable-fpm && make. Thanks [2010-08-30 15:45:55] f...@php.net The following patch has been added/updated: Patch Name: fpm_builtin_atomic.patch Revision: 1283175955 URL: http://bugs.php.net/patch-display.php?bug=52725&patch=fpm_builtin_atomic.patch&revision=1283175955 [2010-08-28 22:37:23] fedora at famillecollet dot com Description: Build fails on RHEL/Centos 5 (gcc-4.1.2) sapi/fpm/fpm/fpm_shm_slots.o: In function `fpm_spinlock': /builddir/build/BUILD/php5.3-201008281230/sapi/fpm/fpm/fpm_atomic.h:148: undefined reference to `__sync_bool_compare_and_swap_4' /builddir/build/BUILD/php5.3-201008281230/sapi/fpm/fpm/fpm_atomic.h:143: undefined reference to `__sync_bool_compare_and_swap_4' This seems linked to commit 302600 http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h?r1=299794&r2=302600 Changing the test fixes the issue #if (__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2) I don't know which is the correct value. Build ok on fedora 12 (gcc-4.4.4) and fedora 13 (gcc-4.4.4) -- Edit this bug report at http://bugs.php.net/bug.php?id=52725&edit=1
Bug #52498 [Asn->Csd]: when FPM is enable, php-cli is linked against libevent (it shouldn't)
Edit report at http://bugs.php.net/bug.php?id=52498&edit=1 ID: 52498 Updated by: f...@php.net Reported by:f...@php.net Summary:when FPM is enable, php-cli is linked against libevent (it shouldn't) -Status: Assigned +Status: Closed Type: Bug Package:FPM related Operating System: linux PHP Version:5.3.3 Assigned To: fat Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-09-07 23:12:30] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=303147 Log: - Fixed bug #52498 (libevent was not only linked to php-fpm) [2010-07-30 13:33:53] f...@php.net Description: r...@wild # ldd sapi/fpm/php-fpm ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb7d98000) ... r...@wild # ldd sapi/cli/php ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb803) ... libevent is linked by sapi/cli/php when it shouldn't Test script: --- compile PHP with --enable-fpm Expected result: r...@wild # ldd sapi/fpm/php-fpm ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb7d98000) ... r...@wild # ldd sapi/cli/php ... ... Actual result: -- r...@wild # ldd sapi/fpm/php-fpm ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb7d98000) ... r...@wild # ldd sapi/cli/php ... libevent-1.4.so.2 => /usr/local/libevent-1.4.13/lib/libevent-1.4.so.2 (0xb803) ... -- Edit this bug report at http://bugs.php.net/bug.php?id=52498&edit=1
Bug #52796 [Opn->Fbk]: Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php
Edit report at http://bugs.php.net/bug.php?id=52796&edit=1 ID: 52796 Updated by: f...@php.net Reported by:momchil at xaxo dot eu Summary:Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php -Status: Open +Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.3SVN-2010-09-08 (SVN) -Assigned To: +Assigned To: fat Block user comment: N New Comment: - did you reload FPM ? - does your PHP scripts forks somehow ? - does your PHP scripts send mail through the mail() function ? does it work ? Previous Comments: [2010-09-08 14:28:26] momchil at xaxo dot eu Description: the server got high load today, php processes were consuming lots of cpu and most php processes were in the R state, php-fpm.log was full with: Sep 08 15:22:32.644908 [NOTICE] [pool www0] child 25248 started Sep 08 15:22:32.743826 [WARNING] [pool www0] child 25248 exited on signal 6 SIGABRT after 0.098934 seconds from start Sep 08 15:22:32.743890 [WARNING] [pool www0] child 25248 said into stderr: "php-fpm: event.c:261: event_base_free: Assertion `(((&base->eventqueue)->tqh_first) == ((void *)0))' failed." Sep 08 15:22:32.789892 [NOTICE] [pool www0] child 25262 started Sep 08 15:22:32.830163 [WARNING] [pool www0] child 25262 exited on signal 6 SIGABRT after 0.040331 seconds from start Sep 08 15:22:32.830233 [WARNING] [pool www0] child 25262 said into stderr: "php-fpm: event.c:261: event_base_free: Assertion `(((&base->eventqueue)->tqh_first) == ((void *)0))' failed." Sep 08 15:22:32.861300 [NOTICE] [pool www0] child 25271 started Sep 08 15:22:32.861346 [WARNING] [pool www0] child 25271 exited on signal 6 SIGABRT after 0.59 seconds from start Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php-fpm: event.c:261: event_base_free: Assertion `(((&base->eventqueue)->tqh_first) == ((void *)0))' failed." I am using r299968 of php 5.3 on Linux 2.6.24-gentoo-r8 x86_64 Test script: --- don't know how to reproduce -- Edit this bug report at http://bugs.php.net/bug.php?id=52796&edit=1
Bug #52796 [Asn->Fbk]: Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php
Edit report at http://bugs.php.net/bug.php?id=52796&edit=1 ID: 52796 Updated by: f...@php.net Reported by:momchil at xaxo dot eu Summary:Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.3SVN-2010-09-08 (SVN) Assigned To: fat Block user comment: N New Comment: can you pastbin the full php-fpm.log and your config please ? Previous Comments: [2010-09-08 14:53:37] momchil at xaxo dot eu the scripts do none of the above and I did not reload fpm [2010-09-08 14:35:00] f...@php.net - did you reload FPM ? - does your PHP scripts forks somehow ? - does your PHP scripts send mail through the mail() function ? does it work ? [2010-09-08 14:28:26] momchil at xaxo dot eu Description: the server got high load today, php processes were consuming lots of cpu and most php processes were in the R state, php-fpm.log was full with: Sep 08 15:22:32.644908 [NOTICE] [pool www0] child 25248 started Sep 08 15:22:32.743826 [WARNING] [pool www0] child 25248 exited on signal 6 SIGABRT after 0.098934 seconds from start Sep 08 15:22:32.743890 [WARNING] [pool www0] child 25248 said into stderr: "php-fpm: event.c:261: event_base_free: Assertion `(((&base->eventqueue)->tqh_first) == ((void *)0))' failed." Sep 08 15:22:32.789892 [NOTICE] [pool www0] child 25262 started Sep 08 15:22:32.830163 [WARNING] [pool www0] child 25262 exited on signal 6 SIGABRT after 0.040331 seconds from start Sep 08 15:22:32.830233 [WARNING] [pool www0] child 25262 said into stderr: "php-fpm: event.c:261: event_base_free: Assertion `(((&base->eventqueue)->tqh_first) == ((void *)0))' failed." Sep 08 15:22:32.861300 [NOTICE] [pool www0] child 25271 started Sep 08 15:22:32.861346 [WARNING] [pool www0] child 25271 exited on signal 6 SIGABRT after 0.59 seconds from start Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php-fpm: event.c:261: event_base_free: Assertion `(((&base->eventqueue)->tqh_first) == ((void *)0))' failed." I am using r299968 of php 5.3 on Linux 2.6.24-gentoo-r8 x86_64 Test script: --- don't know how to reproduce -- Edit this bug report at http://bugs.php.net/bug.php?id=52796&edit=1
Bug #52796 [Asn->Fbk]: Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php
Edit report at http://bugs.php.net/bug.php?id=52796&edit=1 ID: 52796 Updated by: f...@php.net Reported by:momchil at xaxo dot eu Summary:Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php -Status: Assigned +Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.3SVN-2010-09-08 (SVN) Assigned To: fat Block user comment: N New Comment: You have a lots of error in your LOG file: 1- Sep 08 14:10:10.251071 [WARNING] [pool www0] child 13097 said into stderr: "Connection from disallowed IP address '10.13.20.24' is dropped." you should allow those IP address 2- you have a lots of PHP errors which are written to stdout. Search for "said into stderr" in you LOG file. 3- You have calls from external command (rm, convert). when run, php forks for running those command. The problem seem to be similar to bug http://bugs.php.net/52501 4- you have a lot of requests which are executing too slow after 15s and which are ptraced to slowlog. 5- you have a lot of requests which are timeouted after 30s. 6- you have a lot of warning saying your server "seems busy". you should review your configuration file to increase min/max_spare_server. 4- I asked if you did reload FPM. You said no and your LOG file says you had: Sep 08 03:10:07.634996 [NOTICE] using inherited socket fd=6, "10.13.20.26:9910" 5- I asked if your PHP scripts forks somehow. It appears so finaly, the problem occurs when: - some PHP scripts are forking some process (via system() or mail()) - FPM is reloading via emergency_restart_threshold It's a bug related to libevent and forking. I'm on it. You should try disabling emergency_restart_threshold temporarily. Previous Comments: [2010-09-09 23:43:14] momchil at xaxo dot eu fpm.conf of the above one: [global] pid = /var/run/php-fpm.pid error_log = /var/log/php/php-fpm.log log_level = notice emergency_restart_threshold = 10 emergency_restart_interval = 1m process_control_timeout = 5s daemonize = yes [www0] listen = 127.0.0.1:9910 listen.backlog = -1 listen.allowed_clients = 127.0.0.1 user= php group = php pm = dynamic pm.max_children = 100 pm.start_servers= 10 pm.min_spare_servers= 5 pm.max_spare_servers= 20 pm.max_requests = 500 pm.status_path = /status ping.path = /ping ping.response = pong request_terminate_timeout = 30s request_slowlog_timeout = 15s slowlog = /var/log/php/php-fpm-0.log.slow rlimit_files= 2 rlimit_core = 0 catch_workers_output= yes env[HOSTNAME] = $HOSTNAME env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP]= /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp [2010-09-09 23:38:24] momchil at xaxo dot eu umf... got it on another server with another website running r301234 Sep 10 00:08:15.534321 [WARNING] [pool www0] child 25119, script '/www/grabo.bg/www/root/index.php' execution timed out (30.126267 sec), terminating Sep 10 00:08:15.537840 [WARNING] [pool www0] child 25119 exited on signal 15 SIGTERM after 124.330987 seconds from start Sep 10 00:08:15.538251 [NOTICE] [pool www0] child 27012 started Sep 10 00:08:15.539222 [WARNING] [pool www0] child 27012 exited on signal 11 SIGSEGV after 0.000991 seconds from start Sep 10 00:08:15.539538 [NOTICE] [pool www0] child 27013 started Sep 10 00:08:15.544915 [WARNING] [pool www0] child 27013 exited on signal 11 SIGSEGV after 0.005390 seconds from start Sep 10 00:08:15.545278 [NOTICE] [pool www0] child 27015 started Sep 10 00:08:15.554279 [WARNING] [pool www0] child 27015 exited on signal 11 SIGSEGV after 0.009020 seconds from start Sep 10 00:08:15.554629 [NOTICE] [pool www0] child 27016 started Sep 10 00:08:15.555623 [WARNING] [pool www0] child 27016 exited on signal 11 SIGSEGV after 0.001011 seconds from start Sep 10 00:08:15.555929 [NOTICE] [pool www0] child 27017 started Sep 10 00:08:15.556648 [WARNING] [pool www0] child 27017 exited on signal 11 SIGSEGV after 0.000739 seconds from start Sep 10 00:08:15.556904 [NOTICE] [pool www0] child 27018 started Sep 10 00:08:15.557602 [WARNING] [pool www0] child 27018 exited on signal 11 SIGSEGV after 0.000720 seconds from start Sep 10 00:08:15.5
Bug #52796 [Asn]: Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php
Edit report at http://bugs.php.net/bug.php?id=52796&edit=1 ID: 52796 Updated by: f...@php.net Reported by:momchil at xaxo dot eu Summary:Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php Status: Assigned Type: Bug Package:FPM related Operating System: linux PHP Version:5.3SVN-2010-09-08 (SVN) Assigned To: fat Block user comment: N New Comment: you should not use FPM reloading since this bug has not been corrected. Please use restart instead. Previous Comments: [2010-09-09 23:57:39] momchil at xaxo dot eu 1,2,4,5 are known. about forking: I thought you mean forking inside php code and did not thought about system(), there is some code using the system() function. reloading: I did not reload fpm at the moment when the crash happened, we are reloading it on fpm.conf/php.ini changes about what I wrote just before on 2010-09-09 21:38 UTC: I was told that the mail() function has been used about 1500 times in a script for sending newsletter, which might be related as you pointed out. I will try without the emergency restart as you suggest, thank you for the pointers and your time investigating this :) [2010-09-09 23:47:47] f...@php.net You have a lots of error in your LOG file: 1- Sep 08 14:10:10.251071 [WARNING] [pool www0] child 13097 said into stderr: "Connection from disallowed IP address '10.13.20.24' is dropped." you should allow those IP address 2- you have a lots of PHP errors which are written to stdout. Search for "said into stderr" in you LOG file. 3- You have calls from external command (rm, convert). when run, php forks for running those command. The problem seem to be similar to bug http://bugs.php.net/52501 4- you have a lot of requests which are executing too slow after 15s and which are ptraced to slowlog. 5- you have a lot of requests which are timeouted after 30s. 6- you have a lot of warning saying your server "seems busy". you should review your configuration file to increase min/max_spare_server. 4- I asked if you did reload FPM. You said no and your LOG file says you had: Sep 08 03:10:07.634996 [NOTICE] using inherited socket fd=6, "10.13.20.26:9910" 5- I asked if your PHP scripts forks somehow. It appears so finaly, the problem occurs when: - some PHP scripts are forking some process (via system() or mail()) - FPM is reloading via emergency_restart_threshold It's a bug related to libevent and forking. I'm on it. You should try disabling emergency_restart_threshold temporarily. [2010-09-09 23:43:14] momchil at xaxo dot eu fpm.conf of the above one: [global] pid = /var/run/php-fpm.pid error_log = /var/log/php/php-fpm.log log_level = notice emergency_restart_threshold = 10 emergency_restart_interval = 1m process_control_timeout = 5s daemonize = yes [www0] listen = 127.0.0.1:9910 listen.backlog = -1 listen.allowed_clients = 127.0.0.1 user= php group = php pm = dynamic pm.max_children = 100 pm.start_servers= 10 pm.min_spare_servers= 5 pm.max_spare_servers= 20 pm.max_requests = 500 pm.status_path = /status ping.path = /ping ping.response = pong request_terminate_timeout = 30s request_slowlog_timeout = 15s slowlog = /var/log/php/php-fpm-0.log.slow rlimit_files= 2 rlimit_core = 0 catch_workers_output= yes env[HOSTNAME] = $HOSTNAME env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP]= /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp [2010-09-09 23:38:24] momchil at xaxo dot eu umf... got it on another server with another website running r301234 Sep 10 00:08:15.534321 [WARNING] [pool www0] child 25119, script '/www/grabo.bg/www/root/index.php' execution timed out (30.126267 sec), terminating Sep 10 00:08:15.537840 [WARNING] [pool www0] child 25119 exited on signal 15 SIGTERM after 124.330987 seconds from start Sep 10 00:08:15.538251 [NOTICE] [pool www0] child 27012 started Sep 10 00:08:15.539222 [WARNING] [pool www0] child 27012 exited on signal 11 SIGSEGV after 0.000991 seconds from start Sep 10 00:08:15.539538 [NOTIC
Bug #52796 [Asn]: Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php
Edit report at http://bugs.php.net/bug.php?id=52796&edit=1 ID: 52796 Updated by: f...@php.net Reported by:momchil at xaxo dot eu Summary:Sep 08 15:22:32.861368 [WARNING] [pool www0] child 25271 said into stderr: "php Status: Assigned Type: Bug Package:FPM related Operating System: linux PHP Version:5.3SVN-2010-09-08 (SVN) Assigned To: fat Block user comment: N New Comment: just follow the current bug and the following http://bugs.php.net/52501 Previous Comments: [2010-09-10 00:03:11] momchil at xaxo dot eu ok, can you please point me to the bug report about reloading so that I can follow it and know when it gets fixed? [2010-09-10 00:00:49] f...@php.net you should not use FPM reloading since this bug has not been corrected. Please use restart instead. [2010-09-09 23:57:39] momchil at xaxo dot eu 1,2,4,5 are known. about forking: I thought you mean forking inside php code and did not thought about system(), there is some code using the system() function. reloading: I did not reload fpm at the moment when the crash happened, we are reloading it on fpm.conf/php.ini changes about what I wrote just before on 2010-09-09 21:38 UTC: I was told that the mail() function has been used about 1500 times in a script for sending newsletter, which might be related as you pointed out. I will try without the emergency restart as you suggest, thank you for the pointers and your time investigating this :) [2010-09-09 23:47:47] f...@php.net You have a lots of error in your LOG file: 1- Sep 08 14:10:10.251071 [WARNING] [pool www0] child 13097 said into stderr: "Connection from disallowed IP address '10.13.20.24' is dropped." you should allow those IP address 2- you have a lots of PHP errors which are written to stdout. Search for "said into stderr" in you LOG file. 3- You have calls from external command (rm, convert). when run, php forks for running those command. The problem seem to be similar to bug http://bugs.php.net/52501 4- you have a lot of requests which are executing too slow after 15s and which are ptraced to slowlog. 5- you have a lot of requests which are timeouted after 30s. 6- you have a lot of warning saying your server "seems busy". you should review your configuration file to increase min/max_spare_server. 4- I asked if you did reload FPM. You said no and your LOG file says you had: Sep 08 03:10:07.634996 [NOTICE] using inherited socket fd=6, "10.13.20.26:9910" 5- I asked if your PHP scripts forks somehow. It appears so finaly, the problem occurs when: - some PHP scripts are forking some process (via system() or mail()) - FPM is reloading via emergency_restart_threshold It's a bug related to libevent and forking. I'm on it. You should try disabling emergency_restart_threshold temporarily. [2010-09-09 23:43:14] momchil at xaxo dot eu fpm.conf of the above one: [global] pid = /var/run/php-fpm.pid error_log = /var/log/php/php-fpm.log log_level = notice emergency_restart_threshold = 10 emergency_restart_interval = 1m process_control_timeout = 5s daemonize = yes [www0] listen = 127.0.0.1:9910 listen.backlog = -1 listen.allowed_clients = 127.0.0.1 user= php group = php pm = dynamic pm.max_children = 100 pm.start_servers= 10 pm.min_spare_servers= 5 pm.max_spare_servers= 20 pm.max_requests = 500 pm.status_path = /status ping.path = /ping ping.response = pong request_terminate_timeout = 30s request_slowlog_timeout = 15s slowlog = /var/log/php/php-fpm-0.log.slow rlimit_files= 2 rlimit_core = 0 catch_workers_output= yes env[HOSTNAME] = $HOSTNAME env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP]= /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp 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=52796 -- Edit this bug report at http://bugs.php.net/bug.php?id=52796&edit=1