Bug 459628 - Problem with man page for limits.conf
Problem with man page for limits.conf
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: pam (Show other bugs)
4.7
All Linux
medium Severity medium
: rc
: ---
Assigned To: Tomas Mraz
:
Depends On: 459624
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-20 14:12 EDT by Justin Payne
Modified: 2009-05-18 16:25 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:25:07 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)
patch for man 5 limits.conf (1011 bytes, patch)
2008-08-21 11:41 EDT, Justin Payne
no flags Details | Diff

  None (edit)
Description Justin Payne 2008-08-20 14:12:19 EDT
+++ This bug was initially created as a clone of Bug #459624 +++

Escalated to Bugzilla from IssueTracker

--- Additional comment from tao@redhat.com on 2008-08-20 13:59:05 EDT ---

Description of problem:
On some machines in RHEL 5.1 and 5.2 we encounter the same problem, the max memory size field is bypassed by a shell script. 
How reproducible:
I attached the script foo.ksh which we use to simulate the problem.
I attached the file /etc/security/limits.conf and the sosreport
When we run foo.ksh we acheave and bypass the limit. In our case it is a problem because we arrive to use  oom killer. 
Steps to Reproduce:
setup the file limits.conf 
run  /tmp/foo.ksh >/dev/null
ps aux to check that we have more than 60M for that process.
Thanks for your help .
Christophe. 

Actual results:

Expected results:

Additional info:
This event sent from IssueTracker by jpayne  [Support Engineering Group]
 issue 181993

--- Additional comment from tao@redhat.com on 2008-08-20 13:59:06 EDT ---

File uploaded: foo.ksh
This event sent from IssueTracker by jpayne  [Support Engineering Group]
 issue 181993
it_file 134626

--- Additional comment from tao@redhat.com on 2008-08-20 13:59:07 EDT ---

File uploaded: limits.conf

This event sent from IssueTracker by jpayne  [Support Engineering Group]
 issue 181993
it_file 134628

--- Additional comment from tao@redhat.com on 2008-08-20 13:59:08 EDT ---

So..in pam, this is how the limit are initialised after pl has been
populated acording to the limits.conf value.

static int init_limits(struct pam_limit_s *pl)
{
    int i;
    int retval = PAM_SUCCESS;

    D(("called."));

    for(i = 0; i < RLIM_NLIMITS; i++) {
        int r = getrlimit(i, &pl->limits[i].limit);
...
...
...

Now, man getrlimit states:

       RLIMIT_RSS
              Specifies the limit (in pages) of the process's resident
set (the number of virtual pages resident
              in  RAM).  This limit only has effect in Linux 2.4.x, x <
30, and there only affects calls to mad-
              vise() specifying MADV_WILLNEED.


It looks to me like this will never works on a RHEL5 as it uses a 2.6
kernel.






Internal Status set to 'Waiting on Support'

This event sent from IssueTracker by jpayne  [Support Engineering Group]
 issue 181993

--- Additional comment from tao@redhat.com on 2008-08-20 13:59:10 EDT ---

I have received confirmation from Rik van Riel that this is the default
behavior. RLIMIT_RSS is not supported in the upstream kernel, or Red Hat
2.6.x kernels.

If necessary, we can submit a request to have the man page for limits.conf
edited to correct this.

Thanks,

Justin

Internal Status set to 'Waiting on Support'

This event sent from IssueTracker by jpayne  [Support Engineering Group]
 issue 181993

--- Additional comment from tao@redhat.com on 2008-08-20 14:02:45 EDT ---

This bug is for the limits.conf man page. In the <item> section of the
page, rss is described:

          rss
             maximum resident set size (KB)

RLIMIT_RSS is not supported in 2.6 kernels. Request this to be removed
from RHEL5 and RHEL4 (will clone bug for RHEL4).

-Justin


Issue escalated to RHEL 5 Base OS by: jpayne.
Internal Status set to 'Waiting on Engineering'

This event sent from IssueTracker by jpayne 
 issue 181993
Comment 1 Justin Payne 2008-08-21 11:41:58 EDT
Created attachment 314717 [details]
patch for man 5 limits.conf
Comment 2 RHEL Product and Program Management 2008-09-05 13:17:09 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 8 errata-xmlrpc 2009-05-18 16:25:07 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0995.html

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