Subject: bin/8503: ksh on vax leaks memory
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Buelow <mkb@moghedien.mayn.de>
List: netbsd-bugs
Date: 09/27/1999 20:20:47
>Number: 8503
>Category: bin
>Synopsis: ksh on vax leaks memory
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 27 20:20:01 1999
>Last-Modified:
>Originator: Matthias Buelow
>Organization:
>Release: NetBSD 1.4.1
>Environment:
System: NetBSD moghedien.mayn.de 1.4.1 NetBSD 1.4.1 (GENERIC) #13: Fri Aug 13 05:35:08 PDT 1999 root@futplex:/usr/src/sys/arch/vax/compile/GENERIC vax
>Description:
On the VAX port, /bin/ksh (pdksh 5.2.12) leaks quite some memory.
This can be observed very easily by repeatedly typing "ps ux" into
a started ksh prompt. Here, ksh leaks ~24-28K each time.
This doesn't seem to happen with /bin/ksh on 1.4/i386.
Here is an example:
$ ps ux|grep ksh|grep -v grep
mkb 20979 1.2 1.1 308 256 p1 S 5:09AM 0:00.35 ksh
$ r
ps ux|grep ksh|grep -v grep
mkb 20979 1.5 1.2 308 288 p1 S 5:09AM 0:00.44 ksh
$ r
ps ux|grep ksh|grep -v grep
mkb 20979 2.0 1.3 308 316 p1 S 5:09AM 0:00.52 ksh
$ r
ps ux|grep ksh|grep -v grep
mkb 20979 1.4 1.4 308 340 p1 S 5:09AM 0:00.61 ksh
[...]
Since this doesn't happen with other programs it looks like the
problem is with the shell, not with ps or something.
>How-To-Repeat:
Execute commands interactively, watch rss with ps.
>Fix:
Don't use ksh on vax or maybe upgrade to a newer version of pdksh
(5.2.12 is ancient).
Haven't tested if a newer version still exhibits this problem.
>Audit-Trail:
>Unformatted: