From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13246 invoked from network); 23 Nov 1999 22:19:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Nov 1999 22:19:56 -0000 Received: (qmail 4286 invoked by alias); 23 Nov 1999 22:19:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8763 Received: (qmail 4279 invoked from network); 23 Nov 1999 22:19:46 -0000 Date: Tue, 23 Nov 1999 15:17:26 -0700 (MST) From: James Kirkpatrick Subject: zsh 3.0.7 hogs memory In-reply-to: <991123214038.ZM29906@candle.brasslantern.com> To: zsh-workers@sunsite.auc.dk Cc: James Kirkpatrick , Susan L Hanna Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII X-Authentication-warning: asuwlink.uwyo.edu: jimkirk owned process doing -bs We've run across an interesting problem where zsh 3.0.7 will grow in size, consuming memory until the system paralyzes itself with swapping, then suddenly break itself free. Environment: zsh 3.0.7, Sun Enterprise 5000 with 2 Gig memory and 6 processors, Solaris 2.5.1. It usually seems to happen to people running Pine (4.10). My guess at this point is that they dial in, start pine, and then either disconnect or become disconnected. This has often caused problems with programs that try to handle exceptions and fail in some cases (I've seen this a lot starting with SAS on Cyber mainframes in 1980). I tried running a script that sleeps for 1 second then asks "how long have I been sleeping?". If the answer is over 2 seconds it does a "ps -eo pmem,user,pcpu,rss,vsz,fname | sort | tail" to a log file. Some of the entries include: %MEM USER %CPU RSS VSZ COMMAND 12.3 hbear 3.1 252832 599944 zsh 71.3 skuyper 8.1 1466520 1941360 zsh 86.1 renee 13.2 1772384 1941352 zsh 86% of 2 Gig is 1.72 Gig, a ridiculous amount for a shell to consume, so clearly there is a problem. One other clue: This only started happening when I added the following to /etc/zshenv: export HISTSIZE=200 export HISTFILE=~/.zsh_history export SAVEHIST=200 Once I commented it out, the problem went away. SO, I'm suspicious of problems in exception handling (disconnect) with history files turned on. Of course I might be wrong about the exceptions issue. Any suggestions/fixes? Jim