I am seeking assistance to this memory problem in Linux:
My distro: MontaVista version 2.6.10 (mvl401-ep852)
In "steady state", I execute the "free" command to display info about free and used memory on my system:
Code:
> free
total used free shared buffers
Mem: 127396 42884 84512 0 0
Swap: 0 0 0
Total: 127396 42884 84512
I noted I have 84512 KB free. I then telnet into the kernel (via telnet <ip>) and note the following:
Two new processes are created for my telnet:
Code:
> ps
PID Uid VmSize Stat Command
250 root 884 S in.telne
251 root 1536 S -bash
and memory is consumed:
Code:
> free
total used free shared buffers
Mem: 127396 43380 84016 0 0
Swap: 0 0 0
Total: 127396 43380 84016
Then, I "exit" (terminate) my telnet session. Process 250 is removed but 251 has become a Zombie process:
Code:
> ps
PID Uid VmSize Stat Command
251 root Z [bash]
Also, all but 8K is freed (84512 - 84504 = 8 KB):
Code:
> free
total used free shared buffers
Mem: 127396 42892 84504 0 0
Swap: 0 0 0
Total: 127396 42892 84504
I can repeat this process continuously and another 8K is used up never to be freed again (until I reboot the system). I have read up on Zombie processes and understand that it is a terminated process that has not been reaped by its parent. So, one cannot kill a Zombie process since it is already dead. And, I cannot kill the parent as it is already killed. I also read that it then becomes the responsiblity of the "init" process to watch over the Zombie processes and eventually zap them if the parent has not done so. But this doesn't seem to be happening in my system (the Zombie's are still here after almost a full day). I have concern from the end-user that memory is being eaten away every time someone logs in (albeit it is small, but it adds up).
I have patched the kernel with a recent patch tar file with no luck. Is this a known issue? I have tried this on another system and don't get this problem (memory is free'd cleanly). I'm open for any resolutions or opinions. Much thanks.