Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Bugs

[Bug 46467] Apache-childs segfault when number of childs reaches 130

 

 

Apache bugs RSS feed   Index | Next | Previous | View Threaded


bugzilla at apache

Jan 3, 2009, 1:31 AM

Post #1 of 17 (897 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Ruediger Pluem <rpluem[at]apache.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO




--- Comment #1 from Ruediger Pluem <rpluem[at]apache.org> 2009-01-03 01:31:12 PST ---
Please provide the following information:

- Kernel version
- glibc version
- Your httpd.conf
- Your ulimits (ulimit -a)

Please execute the following steps with gdb when you have loaded your core
dump:

frame 1
p num_listensocks


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 3, 2009, 1:26 PM

Post #2 of 17 (869 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #2 from Alex Pircher <Alexander_Pircher[at]yahoo.de> 2009-01-03 13:26:32 PST ---
Created an attachment (id=23075)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23075)
httpd.conf


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 3, 2009, 1:27 PM

Post #3 of 17 (871 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Alex Pircher <Alexander_Pircher[at]yahoo.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW




--- Comment #3 from Alex Pircher <Alexander_Pircher[at]yahoo.de> 2009-01-03 13:27:57 PST ---
- Kernel version
2.6.27.9-159 (x86_64)

- glibc version
2.9

- Your httpd.conf
Default httpd.conf installed during installation with the lines above added.
Attached is my httpd.conf

- Your ulimits (ulimit -a)
I have already tried set the limits as high as possible, the current settings
are:
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) unlimited
file size (blocks, -f) unlimited
pending signals (-i) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1000000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) unlimited
real-time priority (-r) 0
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

- gdb steps
(gdb) frame 1
#1 0x00000000004494b6 in child_main (child_num_arg=<value optimized out>) at
prefork.c:532
532 (void) apr_pollset_add(pollset, &pfd);
(gdb) p num_listensocks
$1 = 1


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 3, 2009, 2:02 PM

Post #4 of 17 (871 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #4 from Alex Pircher <Alexander_Pircher[at]yahoo.de> 2009-01-03 14:02:23 PST ---
An additional note which may be important. I have just tested it with the first
2.2-release of Apache 2.2.0 and got the same behaviour.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 6, 2009, 2:20 PM

Post #5 of 17 (851 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #5 from Jeff Trawick <trawick[at]apache.org> 2009-01-06 14:20:16 PST ---
Ruediger, is apr_pollset_create() failing due to some kernel limit?

Alex, you could confirm that by running with this tiny patch

Index: server/mpm/prefork/prefork.c
===================================================================
--- server/mpm/prefork/prefork.c (revision 731724 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=731724 ))
+++ server/mpm/prefork/prefork.c (working copy)
@@ -485,7 +485,12 @@

/* Set up the pollfd array */
/* ### check the status */
- (void) apr_pollset_create(&pollset, num_listensocks, pchild, 0);
+ status = apr_pollset_create(&pollset, num_listensocks, pchild, 0);
+ if (status != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
+ "Couldn't initialize pollset in child");
+ clean_child_exit(APEXIT_CHILDFATAL);
+ }


and seeing if you get the new message. If you do, you might be able to work
around whatever is causing the apr_pollset_create() failure by setting
"apr_cv_epoll=no" when you configure. (none of this tested ;) )


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 6, 2009, 2:29 PM

Post #6 of 17 (850 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Ruediger Pluem <rpluem[at]apache.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO




--- Comment #6 from Ruediger Pluem <rpluem[at]apache.org> 2009-01-06 14:29:27 PST ---
(In reply to comment #5)
> Ruediger, is apr_pollset_create() failing due to some kernel limit?

I don't know. I guess your patch will be very helpful in detecting why the
creation of the pollset fails. IMHO the main difference between 2.0.63 and
2.2.x is that epoll is used and I had the idea that we might be out of fd's,
but this does not seem to be the case.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 7, 2009, 2:09 AM

Post #7 of 17 (845 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #7 from Joe Orton <jorton[at]redhat.com> 2009-01-07 02:09:33 PST ---
The epoll_create failure looks like some kind of weird kernel bug; strace
output looks like the below:

read(9, "\2\0\0\0\1\0\0\0\0\0\0\0"..., 12) = 12
read(9, ""..., 0) = 0
close(9) = 0
setgroups(1, [48]) = 0
geteuid() = 0
setuid(48) = 0
epoll_create(1) = -1 EMFILE (Too many open files)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

the fact that an fd was closed right before epoll_create() seems like
sufficient evidence for this, and it's not some global fd limit being hit since
that would produce ENFILE.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 7, 2009, 2:17 AM

Post #8 of 17 (845 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Joe Orton <jorton[at]redhat.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |ASSIGNED




--- Comment #8 from Joe Orton <jorton[at]redhat.com> 2009-01-07 02:17:10 PST ---
Bleh, this is annoying :( It's a new tunable setting. If you do

echo 1024 > /proc/sys/fs/epoll/max_user_instances

where 1024 is some value larger than MaxClients, then it works.

http://lkml.indiana.edu/hypermail/linux/kernel/0812.0/01183.html


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 7, 2009, 8:48 AM

Post #9 of 17 (839 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #9 from Ruediger Pluem <rpluem[at]apache.org> 2009-01-07 08:48:03 PST ---
So I guess this transforms into a documentation bug and we should document it
somewhere. Maybe add a platform specific section for Linux, like the one for
Windows (http://httpd.apache.org/docs/2.2/en/platform/windows.html)?


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 7, 2009, 12:11 PM

Post #10 of 17 (836 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Ruediger Pluem <rpluem[at]apache.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FixedInTrunk




--- Comment #10 from Ruediger Pluem <rpluem[at]apache.org> 2009-01-07 12:11:01 PST ---
At least the segfault is now fixed in trunk (r732414 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=732414 ) by Jeff's patch. Instead
an error message is logged and the child exits.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 7, 2009, 12:18 PM

Post #11 of 17 (833 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #11 from Ruediger Pluem <rpluem[at]apache.org> 2009-01-07 12:18:07 PST ---
Patch proposed for backport to 2.2.x as r732465 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=732465 )


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 7, 2009, 3:04 PM

Post #12 of 17 (830 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #12 from Alex Pircher <Alexander_Pircher[at]yahoo.de> 2009-01-07 15:04:11 PST ---
I can confirm that the patch is working in 2.2.11 and that raising
max_user_instances solves the problem. Thanks for your efforts!

This may affect the worker-MPM as well if you have more than 128 workers which
is probably very unlikely.

A specific documentation-section for Linux would be a good idea.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 8, 2009, 3:15 AM

Post #13 of 17 (823 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #13 from Joe Orton <jorton[at]redhat.com> 2009-01-08 03:15:41 PST ---
I'm going to see if we can either get the default setting raised or whether
this can be turned into an rlimit which we can bump manually.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 9, 2009, 6:27 AM

Post #14 of 17 (803 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Eric Covener <covener[at]gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |werner[at]aloah-from-hell.de




--- Comment #14 from Eric Covener <covener[at]gmail.com> 2009-01-09 06:27:51 PST ---
*** Bug 46501 has been marked as a duplicate of this bug. ***


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 11, 2009, 8:48 AM

Post #15 of 17 (776 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467





--- Comment #15 from Stefan Fritsch <sf[at]sfritsch.de> 2009-01-11 08:48:40 PST ---
Created an attachment (id=23105)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23105)
add more error logging for apr_pollset_create and apr_pollset_add

CONNECT in mod_proxy and mod_cgi also use apr_pollset_create. Therefore it is
possible that this problem also occurs in worker or event mpm.

There is now also the new max_user_watches limit that may affect
apr_pollset_add (though the default seems high enough).

Here is a patch that does some more error checking for these calls.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 12, 2009, 6:46 AM

Post #16 of 17 (761 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Nick Kew <nick[at]webthing.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED




--- Comment #16 from Nick Kew <nick[at]webthing.com> 2009-01-12 06:46:58 PST ---
Fixed in r733698 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=733698 )


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org


bugzilla at apache

Jan 12, 2009, 8:32 AM

Post #17 of 17 (747 views)
Permalink
[Bug 46467] Apache-childs segfault when number of childs reaches 130 [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46467


Stefan Fritsch <sf[at]sfritsch.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |




--- Comment #17 from Stefan Fritsch <sf[at]sfritsch.de> 2009-01-12 08:32:00 PST ---
Please look at the patch I submitted. At least mpm_worker and mod_cgi need to
be changed, too.


--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: bugs-help[at]httpd.apache.org

Apache bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.