LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 04-23-2009, 02:29 PM   #1
NilesBor
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Rep: Reputation: 0
Telnet session consumes 8KB which is never released after session is terminated


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.
 
Old 04-24-2009, 11:14 AM   #2
NilesBor
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Original Poster
Rep: Reputation: 0
telnetd daemon

I have been looking at the differences in the telnet daemon on my system:

In /etc/inetd.conf:
Code:
telnet  stream  tcp     nowait  root    /usr/sbin/tcpd /usr/sbin/in.telnetd
On another system where things are fine, there is a difference:
Code:
telnet  stream  tcp     nowait  telnetd    /usr/sbin/telnetd  telnetd -l /bin/sh
I tried the telnetd instead of in.telnetd but I get a segmenation fault on my system. In both systems, the in.telnetd/telnetd is supplied by Busybox. However, in the system that works, they are using BusyBox v1.11.1 whereas I am using Busybox v1.01. Anyone know if there is a known problem in v1.01 wrt telnetd? Is it worth it for me to upgrade to v1.11.1 (or later)?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
get output from telnet session? Manana Linux - Networking 4 01-24-2007 02:20 AM
tcpdump of a telnet session Paul McLean Linux - Networking 2 11-26-2004 01:33 PM
See a telnet session log Linux - Newbie 5 01-13-2003 08:11 AM
Run a telnet session?... lhoff Linux - Newbie 1 12-30-2001 06:58 PM
Automatic telnet session kobilevi Programming 2 03-18-2001 04:20 PM


All times are GMT -5. The time now is 10:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration