Summary: | Soft limits default to lowest potentially-applicable hard limit | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Luke-Jr <luke-jr+gentoobugs> |
Component: | [OLD] baselayout | Assignee: | PAM Gentoo Team (OBSOLETE) <pam-bugs+disabled> |
Status: | VERIFIED INVALID | ||
Severity: | minor | CC: | jer |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Luke-Jr
2010-07-16 22:19:18 UTC
where did you store the runtime configuration for that user's exception? luke-jr@tsuruki ~ $ cat /etc/security/limits.d/default.conf * hard nproc 256 luke-jr@tsuruki ~ $ cat /etc/security/limits.d/luke-jr.conf luke-jr hard nproc 1024 luke-jr soft nproc 1024 luke-jr hard nice -5 luke-jr soft nice -5 -- If I remove the 'luke-jr soft'* lines, I get a soft limit of 256 I have that directory but it is empty, so maybe pam stopped parsing that recently. In my case it was last touched quite a while back: drwxr-xr-x 2 root root 4096 Oct 19 2007 /etc/security/limits.d Maybe try setting everything up in /etc/security/limits.conf instead? I should ask again for NOTABUG: hard for enforcing hard resource limits. These limits are set by the superuser and enforced by the Kernel. The user cannot raise his requirement of system resources above such values. soft for enforcing soft resource limits. These limits are ones that the user can move up or down within the permitted range by any pre-existing hard limits. The values specified with this token can be thought of as default values, for normal system usage. - for enforcing both soft and hard resource limits together. Note, if you specify a type of ´-´ but neglect to supply the item and value fields then the module will never enforce any limits on the specified user/group etc. . Rephrased... the rules in limits.d are being parsed and applied correctly. The problem is with the default given to the soft limit when there is not one specifically set. The soft limit *used to* default to the (final) hard limit. Now it defaults to the lowest hard limit ever matching (in my case, the rule matching all users with a hard limit of 256). To summarize: 1. Given the limit ruleset: * hard nproc 256 luke-jr hard nproc 1024 2. Under baselayout 1, the soft limit for user 'luke-jr' would default to 1024 (the assigned hard limit for the user). 3. Under baselayout 2, the soft limit for user 'luke-jr' is now 256 (the lower hard limit given to all users) flameeyes, why do you feel this is not a bug? Your cited documentation does not talk about default values at all. Care to read? Setting the hard limit ALONE won't change the soft limit. You either use - or you use both soft and hard, it's so by design, and baselayout has nothing to do with it. I'm not expecting it to change the soft limit. The soft limit is at no time set to 256. This issue is dealing with *defaults*. It sounds a sane default to set, if you don't ask anything else, you can't expect the thing to be telepathic. Just stop wasting my time and set the limit with - if that's what you want! Whatever, it should at least be documented as a change from prior behaviour. |