Bug 133460 - setrlimit/getrlimit should be per-process, not per-thread
setrlimit/getrlimit should be per-process, not per-thread
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
medium Severity low
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
:
Depends On:
Blocks: 142791
  Show dependency treegraph
 
Reported: 2004-09-24 03:07 EDT by Roland McGrath
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-03 03:31:46 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)
test program for multithreaded behavior of setrlimit (934 bytes, text/plain)
2004-09-24 03:08 EDT, Roland McGrath
no flags Details
patch vs 2.6.9-rc2-bk9 to fix the behavior (46.20 KB, patch)
2004-09-24 04:01 EDT, Roland McGrath
no flags Details | Diff

  None (edit)
Description Roland McGrath 2004-09-24 03:07:12 EDT
Description of problem:

POSIX specifies that 

Version-Release number of selected component (if applicable):
2.6.9-rc2

How reproducible:
100%

Steps to Reproduce:
1. Compile attached program with -lpthread.
2. Run it.  See it writes 3 bytes.
3. Realize it should have died with SIGXFSZ.
  
Actual results:
no SIGXFSZ

Expected results:
killed by SIGXFSZ

Additional info:
Fix on the way.
Comment 1 Roland McGrath 2004-09-24 03:08:45 EDT
Created attachment 104249 [details]
test program for multithreaded behavior of setrlimit

gcc -g -o mt-rlimit mt-rlimit.c -lpthread

Run with some args, demonstrates the single-threaded case and dies with
SIGXFSZ.
Run with no args, demonstrates the multi-threaded case and only dies with
SIGXFSZ if the kernel is fixed.
Comment 2 Roland McGrath 2004-09-24 04:01:17 EDT
Created attachment 104251 [details]
patch vs 2.6.9-rc2-bk9 to fix the behavior

I've submitted this patch upstream, waiting for feedback.
Comment 3 Roland McGrath 2004-10-20 02:13:55 EDT
This patch has gone in upstream, after 2.6.9; hopefully in 2.6.10 release.
Comment 4 Roland McGrath 2005-01-03 03:31:46 EST
2.6.10 has this fixed.  Only the RLIMIT_CPU behavior is not quite correct,
everything else should be right now.

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