Tcsh memory freakout!


Long time listener, first time poster. Love your programme!

I’m using Opensuse 13.1 on an Intel chip with 12GB of RAM, which has been stable and working well for many months.

So, in the last few days, my tcsh has started freaking out where each instance consumes 2.88 GB of RAM!

Firstly, please redirect “you should use bash” comments to /dev/null, I am dealing with a complex legacy pipeline that I’m sure should be re-written but won’t be anytime soon.

Secondly, I’ve removed any and all custom .tcshrc, .login etc files I can find in $HOME, and tried to run a trace with tcsh -X -V to no avail. It appears that tcsh itself is consuming all the memory after all of the startup scripts are run.

I did do an Update recently but only from official Suse repos, no other new software installed.

I’ve run “clamscan” in the off chance it was some sort of malware/virus, but nothing has come back.
Anyone hit this? Ideas on debugging/tracking it down? My system is currently unusable :frowning:



You should use bash :wink:

But seriously speaking, could you copy paste a few things after running tcsh in a terminal here and wrap them in CODE tags, like:

Woot woot!

ps axww | grep -i csh
rpm -qi tcsh

And zypper lr -d (even if you only have default repos)

Also looking at dmesg and /var/log/messages might give hints as to whether it’s tcsh causing the memory issues or something else.

I am not having any problems with “tcsh” in either 13.1 or 13.2 (or any other version). My default shell is “csh”.

Can you provide the output from:

% cd
% ls -l .history

The default setup using the included “/etc/csh.cshrc” saves history in “.history” on shutdown and restores it on startup. If you “.history” file is huge, that could account for the problem.

I’m just guessing that it might be related to history. I ignore the instructions and hack “/etc/csh.cshrc” to remove (comment out) parts that I don’t like. For me, csh does not save or restore history, and limits history to the most recent 100 lines.

Thanks everyone.

In fact it was the .history file, though I didn’t read your reply until after I’d spent 1/2 hour in ‘strace’ output figuring that out :slight_smile: Thanks for that! Deleting the .history file fixed it up.