php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74242 max_children increasment causes core dump
Submitted: 2017-03-13 13:09 UTC Modified: 2021-12-12 04:22 UTC
From: gaorong_q at 163 dot com Assigned: cmb (profile)
Status: No Feedback Package: FPM related
PHP Version: 7.1.2 OS: centos 6.7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-03-13 13:09 UTC] gaorong_q at 163 dot com
Description:
------------
when we increase max_children setting in php-fpm.conf from 256 to 512. it always cause a core dump when we use command 'ab -n 100000 -c 1000 xxxx' to test the API. but it works well when max_children=256. the core dump info is following:
(gdb) bt
#0  zend_mm_alloc_small (heap=0x7f2892e00040, ptr=0x0, size=<value optimized out>, copy_size=79) at /home/xiaoju/gaorong/softs-src/php-7.0.16/Zend/zend_alloc.c:1299
#1  zend_mm_alloc_heap (heap=0x7f2892e00040, ptr=0x0, size=<value optimized out>, copy_size=79) at /home/xiaoju/gaorong/softs-src/php-7.0.16/Zend/zend_alloc.c:1377
#2  zend_mm_realloc_heap (heap=0x7f2892e00040, ptr=0x0, size=<value optimized out>, copy_size=79) at /home/xiaoju/gaorong/softs-src/php-7.0.16/Zend/zend_alloc.c:1473
#3  0x00000000007c1032 in xbuf_format_converter (xbuf=0x7ffd5fb54780, is_char=1 '\001', fmt=0xe037a7 "pool %s", ap=0x7ffd5fb547c0) at /home/xiaoju/gaorong/softs-src/php-7.0.16/main/spprintf.c:246
#4  0x00000000007c1fca in vspprintf (pbuf=0x7ffd5fb548a8, max_len=0, format=<value optimized out>, ap=<value optimized out>) at /home/xiaoju/gaorong/softs-src/php-7.0.16/main/spprintf.c:847
#5  0x00000000007c20b3 in spprintf (pbuf=<value optimized out>, max_len=<value optimized out>, format=<value optimized out>) at /home/xiaoju/gaorong/softs-src/php-7.0.16/main/spprintf.c:871
#6  0x00000000008b68e5 in fpm_env_init_child (wp=0x2d7fba0) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm_env.c:142
#7  0x00000000008b20c2 in fpm_child_init (wp=0x2d7fba0, in_event_loop=<value optimized out>, nb_to_spawn=<value optimized out>, is_debug=1) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm_children.c:155
#8  fpm_children_make (wp=0x2d7fba0, in_event_loop=<value optimized out>, nb_to_spawn=<value optimized out>, is_debug=1) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm_children.c:407
#9  0x00000000008bd490 in fpm_pctl_perform_idle_server_maintenance (ev=<value optimized out>, which=<value optimized out>, arg=<value optimized out>) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm_process_ctl.c:419
#10 fpm_pctl_perform_idle_server_maintenance_heartbeat (ev=<value optimized out>, which=<value optimized out>, arg=<value optimized out>) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm_process_ctl.c:478
#11 0x00000000008b6f6c in fpm_event_loop (err=0) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm_events.c:428
#12 0x00000000008b1c87 in fpm_run (max_requests=0x7ffd5fb54eec) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm.c:115
#13 0x00000000008b9d9f in main (argc=5, argv=0x7ffd5fb55008) at /home/xiaoju/gaorong/softs-src/php-7.0.16/sapi/fpm/fpm/fpm_main.c:1881


 in addition, it works well when we use php5.5 and max_children=512.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-12-01 14:17 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-12-01 14:17 UTC] cmb@php.net
Does this still happen to you with any of the actively supported
PHP versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-12-12 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC