Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219858 - default process limit is too small in /etc/rc.conf from sys-apps/openrc-0.2.3
Summary: default process limit is too small in /etc/rc.conf from sys-apps/openrc-0.2.3
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 16:00 UTC by Mark Tiefenbruck
Modified: 2008-05-02 10:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Tiefenbruck 2008-04-30 16:00:51 UTC
The /etc/rc.conf that came with openrc contains the following:

# Pass ulimit parameters
rc_ulimit="-u 30"

I figured this was a reasonable setting, so I left it. On the next reboot, I found that my user was unable to compile and install even medium sized software (e.g. fluxbox), and I don't run many programs at all. The shell would print an error like this:

/bin/sh: fork: Resource temporarily unavailable

Changing 30 to 50 sufficed for me, but I suspect that's still too small for people who use gnome or kde or lots of terminals. Given that this setting is not obvious or easy to find, especially since -u isn't even mentioned in "man ulimit", I feel this default definitely needs to be increased. I was lucky that I happened to read through /etc/rc.conf after installing, which required actually reading the emerge messages, and then bothered to google what that setting even does.

Reproducible: Always

Steps to Reproduce:
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2008-04-30 16:22:49 UTC
Firstly, the parameter is commented out by default. Secondly, it says that these are configurations that you can put in specific init scripts configurations and should not have on a global basis. If you uncomment this line in the /etc/rc.conf it will affect your whole system and it shouldn't be done and it's going to hurt people.
Comment 2 Mark Tiefenbruck 2008-05-01 02:58:58 UTC
Hmmm, I don't remember uncommenting it, but I suppose that's possible, since I was going to add "-c unlimited" to it. Maybe I'm going crazy.

Anyway, 30 is still too small for somebody who really does want to limit the number of processes for his users. Whether or not the setting is "recommended" is irrelevant: people will still use it as long as it's in the file. It should have a reasonable default. And this setting doesn't really make sense for individual init scripts. It will still have a global effect.
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2008-05-01 13:49:51 UTC
Reasonable default is "Read the documentation". The 30 setting is not for a global setting but for a subshell that's launching a daemon. It's sensible that if you launch a daemon that 30 processes in it scope are enough.
Comment 4 Mark Tiefenbruck 2008-05-02 10:32:02 UTC
> Reasonable default is "Read the documentation".

I'm a developer. I spend a large amount of time providing support. You can't fool me with that. And for the record, there's no `man openrc', there's no `man rc.conf', and `man ulimit' is less than useful. You have to go into `info bash' and navigate to the bash built-in commands to get any information at all about what this setting does. Or google, of course.

> The 30 setting is not for a
> global setting but for a subshell that's launching a daemon. It's sensible that
> if you launch a daemon that 30 processes in it scope are enough.

I think I've demonstrated that isn't the case if the daemon happens to allow user logins. It also wouldn't be enough for apache in many cases.

Anyway, this is very easy to change. It's by no means urgent, but I think you should consider this a little bit longer. If you need another excuse to edit the file, there's a typo near the end of that section:

# This is mainly used for saying which servies do NOT provide net.