Bug 478496 - Apache-childs segfault when reaching more than 130 childs
Apache-childs segfault when reaching more than 130 childs
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
10
x86_64 Linux
low Severity urgent
: ---
: ---
Assigned To: Joe Orton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-30 20:45 EST by Alex Pircher
Modified: 2009-08-18 08:03 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-18 08:03:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Pircher 2008-12-30 20:45:41 EST
Description of problem:
When reaching more than about 130 Apache-childs, the childs segfault:
# tail -f /var/log/httpd/error_log
[Wed Dec 31 02:29:07 2008] [notice] child pid 29022 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:07 2008] [notice] child pid 29023 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:07 2008] [notice] child pid 29024 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:07 2008] [notice] child pid 29025 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:07 2008] [notice] child pid 29026 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:07 2008] [notice] child pid 29027 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:07 2008] [notice] child pid 29028 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:07 2008] [notice] child pid 29029 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:08 2008] [notice] child pid 29030 exit signal Segmentation fault (11)
[Wed Dec 31 02:29:11 2008] [notice] child pid 29031 exit signal Segmentation fault (11)

Version-Release number of selected component (if applicable):
# rpm -qa | grep httpd 
httpd-tools-2.2.10-2.x86_64
httpd-2.2.10-2.x86_64

How reproducible:
Reaching more than 130 Apache-Childs e.g. with ApacheBench:
ab -n 100000 -c 1000 -r http://localhost/
or by setting MinClients to 150 and MaxClients and the other values to a bigger value than 150.

Steps to Reproduce:
See above
  
Actual results:
Some Childs segfault

Expected results:
No Child should segfault

Additional info:
Only the following Modules are enabled:
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule cgi_module modules/mod_cgi.so
Comment 1 Alex Pircher 2008-12-31 12:37:22 EST
An strace showed the following:
...
31234 16:49:59.676953 read(10,  <unfinished ...>
31232 16:49:59.676970 <... epoll_create resumed> ) = -1 EMFILE (Too many open files)
31234 16:49:59.676987 <... read resumed> ""..., 4096) = 0
31232 16:49:59.677002 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
...

However, increasing the limits (open files, max user processes) in
/etc/security/limits.d/ and/or /etc/init.d/httpd resulted in the same effect.
Comment 2 Alex Pircher 2009-01-12 15:51:44 EST
Reason of this is a new kernel-option in 2.6.27 which limits the maximum number of epoll-instances to 128 for default. The next version of apache will output a more meaningful error-message.

See https://issues.apache.org/bugzilla/show_bug.cgi?id=46467
Comment 3 Joe Orton 2009-08-18 08:03:17 EDT
The kernel limits were also removed.

Note You need to log in before you can comment on or make changes to this bug.