Bug 185603 - csh(1) eats memory
Summary: csh(1) eats memory
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-09 10:20 UTC by yerenkow
Modified: 2018-05-20 23:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yerenkow 2014-01-09 10:20:01 UTC
csh launching eats more and more memory each time.


#first times - mem is low, but when I launch 4-5 csh-es in tmux, each time i relogin (with csh default shell) I see this:

PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
99711 root          1  52    0   105M 70600K pause   2   0:01  4.98% csh
99717 root          1  52    0   173M   127M pause   3   0:02  7.96% csh
99724 root          1  52    0   305M   228M pause   2   0:03  7.96% csh

After this, I killed all cshes, changed default shell to /bin/sh:


# ps  ax | grep csh | grep -v grep
# 

Again launch csh:
99782 root          1  52    0   313M   235M pause   1   0:03 17.97% csh

I have plenny of ram - about 1.5Gb of free ram in normal state, and I don't have swap at all.
Comment 1 yerenkow 2014-01-09 10:46:48 UTC
Seems corrupted history was culprit

https://access.redhat.com/site/solutions/41146

I'd suggest to not parse whole history if it's corrupted, and warn user
(maybe).

-- 
Regards,
Alexander Yerenkow
Comment 2 Pedro F. Giffuni freebsd_committer 2016-07-25 02:28:29 UTC
misliled: csh (actually tcsh) is not in the GNU category.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:50:55 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"