Bug 144299 - setrlimit( RLIMIT_STACK, ... ) sets an unstable stack limit
setrlimit( RLIMIT_STACK, ... ) sets an unstable stack limit
Status: CLOSED DUPLICATE of bug 126297
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Jim Paradis
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-05 14:08 EST by Darin Ohashi
Modified: 2013-08-05 21:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-05 16:02:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
code to reproduce (875 bytes, text/plain)
2005-01-05 14:10 EST, Darin Ohashi
no flags Details

  None (edit)
Description Darin Ohashi 2005-01-05 14:08:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:

Setting a stack limit using setrlimit( RLIMIT_STACK, ... ) causes the
actual stack limit to be very unstable and generally much smaller than
the desired value.

In the attached example, the stack limit is set to 100*1024 bytes,
however when executing the example, the segfault (stack limit
exceeded) occurs when only about 3000-6000 bytes of stack have been used.

I am running on an EM64T machine.  The same code executed on an
opteron running suse linux runs fine.


Version-Release number of selected component (if applicable):
kernel-2.4.21-20.0.1.EL

How reproducible:
Always

Steps to Reproduce:
1.  Compile the attached code.
2.  Run the resulting binary multiple times.
    

Actual Results:  em64t> repeat 10 ./a.out
11 = 3624, 142
11 = 5952, 239
11 = 5568, 223
11 = 5136, 205
11 = 5616, 225
11 = 5352, 214
11 = 5664, 227
11 = 6432, 259
11 = 4200, 166
11 = 5016, 200


Expected Results:  opteron> repeat 10 ./a.out
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111
11 = 98880, 4111

Additional info:
Comment 1 Darin Ohashi 2005-01-05 14:10:07 EST
Created attachment 109388 [details]
code to reproduce
Comment 2 Arjan van de Ven 2005-01-05 14:13:35 EST
to double check; this is with a 64 bit kernel and app, right?
Comment 3 Darin Ohashi 2005-01-05 14:18:10 EST
Yes.
Comment 4 Ernie Petrides 2005-01-05 16:02:56 EST
An errata 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 the 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-2004-550.html


*** This bug has been marked as a duplicate of 126297 ***

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