Bug 238314

Summary: can not set 'ulimit -n 65536' in gnome-terminal in VNC's gnome-session
Product: Red Hat Enterprise Linux 4 Reporter: Hai Wu <hxwu>
Component: gnome-terminalAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: tsmetana
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: 2012-06-20 16:57:45 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 Hai Wu 2007-04-29 06:05:58 UTC
Description of problem:
Trying to install Oracle10g database using VNC gnome-session, and open
gnome-terminal inside this VNC gnome-session for user 'oracle', but it always
fails with the following error messages: "-bash: ulimit: open files: cannot
modify limit: Operation not permitted"

The reason it got the above reason, I guess, is because the
gnome-session/gnome-terminal can not go through PAM + limits.conf settings
properly. I am listing the following steps, many of them are copied from
Oracle10g DB doc. Please note: I didn't experience this same issue in RHEL3,
only in RHEL4. 

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

How reproducible:


Steps to Reproduce:
1. Add the following lines to /etc/security/limits.conf file:

*               soft    nproc   2047
*               hard    nproc   16384
*               soft    nofile  1024
*               hard    nofile  65536

2. Add the following line to the /etc/pam.d/login file, if it does not already
exist:

session    required     /lib/security/pam_limits.so

3. Add the following lines to the /etc/profile file:

if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi

(Note: It complains about 'ulimit -n 65536'). It works fine when going through
"su - oracle" or ssh as 'oracle' user into the server.
  
Actual results:
Getting error message:
-bash: ulimit: open files: cannot modify limit: Operation not permitted

[oracle@erd-tt-eproof1 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Expected results:
It should not give that error message. Also the following are the expect value
for ulimit -n: 65536, after su into oracle user:

[oracle@erd-tt-eproof1 ~]$ su - oracle
Password:
[oracle@erd-tt-eproof1 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Additional info: Please: This is via VNC session for 'oracle' user.

Comment 1 Hai Wu 2007-04-29 06:15:57 UTC
Forgot mentioned the following: 
In gnome-terminal:
Edit -> Profiles -> Edit -> "Title and Command" -> check "Run command as a login
shell".

Comment 2 Jiri Pallich 2012-06-20 16:57:45 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.