csh (20110502-7) takes too long to run.. several of prlimit64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
csh (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When running csh (bsd-csh), its very slow compared to tcsh or bash.
Running strace on it pointed that its filled with several thousand (actually million) of prlimit64 calls.
Not sure if it's a bug or it's due to some limits in /etc/sysctl.conf or some user setting.
But tcsh and bash dont suffer from this slowness. It's causing heavy system usage on the scripts running under csh, doesn't happen under tcsh or bash. tTe CPU under system spikes up as high as 90% when several scripts are running.
How to reproduce..
======
strace bsd-csh --version >&e
grep -c 'prlimit64' e
1024002
=====
Vs tcsh
=====
strace tcsh --version >&e1
grep -c 'prlimit64' e1
1
=====
Vs bash
====
strace bash --version > & e2
grep -c 'prlimit64' e2
1
======
==== starts like this ====
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=
close(0) = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=
close(1) = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=
close(2) = 0
=== And finally ends like this ====
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=
close(1023997) = -1 EBADF (Bad file descriptor)
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=
close(1023998) = -1 EBADF (Bad file descriptor)
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=
close(1023999) = -1 EBADF (Bad file descriptor)
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=
getcwd("XXXXXX", 4096) = 27
newfstatat(
=====