setrlimit(RLIMIT_STACK, RLIM_INFINITY) considered harmful
Russ Allbery
rra at stanford.edu
Sun Dec 19 21:49:59 UTC 2004
"Miquel van Smoorenburg" <list-inn-workers at news.cistron.nl> writes:
> Startinnfeed sets the DATA and STACK limits to infinity. I upgraded
> my feeders kernel from linux 2.6.7 to 2.6.9, and suddenly in
> some cases innfeed grabbed 2 GB (the 1 GB - 3GB address space)
> of stack. Nothing was allocated in it (as VSZ showed) but there
> was no space left to mmap() in articles to send, and that's bad.
> Now this might be a kernel bug, or a glibc bug, but why would any
> application set the stack size to unlimited ? Under Linux it's
> 8 MB by default, and innfeed only used 8-16k or so of stack.
I've dropped this call to setrlimit entirely. It was there originally to
work around some problem with some BSD varient years ago, but I really
doubt it's still needed, and we'd already dropped it in CURRENT.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers
mailing list