D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] RH8 bash memory leak?



Hi,

Anyone want to have a stab at explaining why under RH8 if I run:

  #! /bin/sh

  while true; do
    sleep 5
  done
  exit

in the background and monitor it with 'top', then the memory used keeps
climbing. I created a startup script with a loop on a server and only
noticed last week that top showed its memory usage at around 27GB!! The
system doesn't have anywhere near that sort of memory (real or
virtual):-)

However, if I run it at home it works fine - no memory increase. On
another RH8 server at work, no problem. But on two of them it does the
same thing - increases in memory. I tried using 'ash' as well as perl
but got the same thing.

The only thing I have noticed is that it seems to be the execution of 
external commands (e.g. sleep) which could be the problem. If I replace
'sleep' with say an 'if' test then I get no problem.

Any ideas?

John.


-- 
------------------------------------------------------------------------
John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
E-mail: J.Horne@xxxxxxxxxxxxxx
PGP key available from public key servers

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly