Bug 86182

Summary: Raising, lowering, and attempting to raise again ulimit for stacksize in bash fails
Product: [Retired] Red Hat Linux Reporter: Victor J. Orlikowski <vjo>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-16 11:50:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Victor J. Orlikowski 2003-03-16 06:09:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

Description of problem:
In the specified bash, on 7.3:
1) ulimit -s 65536
2) ulimit -s 32768
3) ulimit -s 65536

The attempt to re-raise the stacksize fails with the following error:
bash: ulimit: cannot modify stack size limit: Operation not permitted

This does not occur when running bash as root, nor when using tcsh instead of bash.

This can be triggered by lowering the stacksize to *any* value lower than the
initial value set; for example, if step 2 above used 65535, rather than 32768,
the error would still occur.

Version-Release number of selected component (if applicable):
bash-2.05a-13

How reproducible:
Always

Steps to Reproduce:
See above description.
    

Actual Results:  Unable to raise stacksize ulimit again, until new shell started.

Expected Results:  As in tcsh, one should be able to raise and lower the
stacksize ulimit within the range permitted by the soft and hard system limits
(whether architectural, or set by the administrator).

Additional info:

Comment 1 Tim Waugh 2003-03-16 11:50:30 UTC
This is exactly as the man page describes.  You are setting the hard limit too,
and you forgot to use the -S option.