Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 7339

Summary: ulimit -v doesn't work
Product: [Retired] Red Hat Linux Reporter: Bradley <disabled>
Component: bashAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: bbaetz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-11-28 13:46:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Bradley 1999-11-26 05:15:22 UTC
No matter what options I pass to ulimit -v, I get:

ulimit: cannot raise limit: Invalid argument

ulimit -AnythingElse appears to work fine.

An strace of bash shows 2 getrlimit calls (for RLIMIT_DATA and
RLIMIT_STACK), which return 0, but no setrlimit calls. There is a setrlimit
call if I do ulimit -m, for example.

Comment 1 Bernhard Rosenkraenzer 1999-11-28 13:46:59 UTC
Works here... Are you sure you aren't using bash2?

Comment 2 Bradley 2000-01-26 12:17:59 UTC
(Sorry for the delay. I didn't get your reply because I ended up with duplicate
bugzilla accounts, and my old email address got deleted from the records, so
your reply got sent to "disabled". See bug #7338).

I'm not using bash2:

~$ bash -version
GNU bash, version 1.14.7(1)
~$ ulimit -v 1000000
ulimit: cannot raise limit: Invalid argument

An strace of bash from another xterm shows the following:

~$ strace -p7379
read(0, "\r", 1)                        = 1
write(2, "\n", 1)                       = 1
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
ioctl(0, SNDCTL_TMR_START, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {0x804bf34, [], 0x4000000}, {0x8088d5c, [], 0x4000000}, 8)
= 0
rt_sigaction(SIGALRM, {0x804bb38, [], 0x4000000}, {0x8088d5c, [], 0x4000000}, 8)
= 0
rt_sigaction(SIGWINCH, {SIG_DFL}, {0x8088d00, [], 0x4000000}, 8) = 0
rt_sigaction(SIGINT, {0x804bf34, [], 0x4000000}, {0x804bf34, [], 0x4000000}, 8)
= 0
getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
write(2, "ulimit: cannot raise limit: Inva"..., 45) = 45
rt_sigaction(SIGINT, {0x804bf34, [], 0x4000000}, {0x804bf34, [], 0x4000000}, 8)
= 0
time(NULL)                              = 948889516
geteuid()                               = 500
geteuid()                               = 500
rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0
ioctl(255, TIOCSPGRP, [7379])           = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {0x804bf34, [], 0x4000000}, {0x804bf34, [], 0x4000000}, 8)
= 0
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_START, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {0x8088d5c, [], 0x4000000}, {0x804bf34, [], 0x4000000}, 8)
= 0
rt_sigaction(SIGALRM, {0x8088d5c, [], 0x4000000}, {0x804bb38, [], 0x4000000}, 8)
= 0
rt_sigaction(SIGWINCH, {0x8088d00, [], 0x4000000}, {SIG_DFL}, 8) = 0
write(2, "~$ ", 3)                      = 3