'kill' does not reclaim the process' resources, causes memory leak
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > 'kill' does not reclaim the process' resources, causes memory leak




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    'kill' does not reclaim the process' resources, causes memory leak  
guybas@yahoo.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-15-06 12:49 PM

This is my problem on a number of systems (including embedded):

I have to run arbitrary binary programs, killing each "from outside".
This is done for a few hundred times, under speed measurements.

It seems that each 'kill'/'killall' causes the system to leak memory.
Thus, the system slows down and speed measurements degrade.

Did somebody encounter such or similar problem? Any solution?
Is there some trick to kill a process and reclaim all its resources?






[ Post a follow-up to this message ]



    Re: 'kill' does not reclaim the process' resources, causes memory leak  
Mark Rafn


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-15-06 10:52 PM

<guybas@yahoo.com> wrote:
>I have to run arbitrary binary programs, killing each "from outside".
>This is done for a few hundred times, under speed measurements.

What a horrible design.

>It seems that each 'kill'/'killall' causes the system to leak memory.
>Thus, the system slows down and speed measurements degrade.

Kill itself almost certainly does not leak memory.  If you have binaries tha
t
don't clean up properly when killed, they can leak resources.  In Unix, it's
fairly difficult for this to happen, though, if all the processes are really
gone.

>Did somebody encounter such or similar problem? Any solution?
>Is there some trick to kill a process and reclaim all its resources?

When a process dies, all it's resources should be released.  If that's not
happening, you'll need to figure out what specific resources these specific
binaries are failing to release and why.

My first guess would be that you're looking in the wrong place.  Something
else is causing the slowdown.
--
Mark Rafn    dagon@dagon.net    <http://www.dagon.net/>





[ Post a follow-up to this message ]



    Re: 'kill' does not reclaim the process' resources, causes memory leak  
Helmut Kreft


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-15-06 10:52 PM

On 15 Jan 2006 03:24:53 -0800, guybas@yahoo.com wrote:
>
> It seems that each 'kill'/'killall' causes the system to leak memory.
> Thus, the system slows down and speed measurements degrade.
>

Usually this happens if System V IPC resources were allocated by the
programs in question. These resources will not be cleared automatically
if a program is terminated. The command ipcs can be used to show the
active message queues/semaphores/shared memory segments.

Helmut

--
Almost everything in life is easier to get into than out of.
(Agnes' Law)





[ Post a follow-up to this message ]



    Re: 'kill' does not reclaim the process' resources, causes memory leak  
Bill Vermillion


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-16-06 07:50 AM

In article <1137324293.779005.31240@f14g2000cwb.googlegroups.com>,
<guybas@yahoo.com> wrote:
>This is my problem on a number of systems (including embedded):
>
>I have to run arbitrary binary programs, killing each "from outside".
>This is done for a few hundred times, under speed measurements.
>
>It seems that each 'kill'/'killall' causes the system to leak memory.
>Thus, the system slows down and speed measurements degrade.
>
>Did somebody encounter such or similar problem? Any solution?
>Is there some trick to kill a process and reclaim all its resources?
>

kill -15 gives an app time to clean up after itself.
kill -9 is 'shoot on site' and can leave files open - including any
temp things that may have been used.  Could that have anything to
do with your problem?

Bill
--
Bill Vermillion - bv @ wjv . com





[ Post a follow-up to this message ]



    Re: 'kill' does not reclaim the process' resources, causes memory leak  
mtfester@netMAPSONscape.net


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-16-06 07:50 AM

Mark Rafn <dagon@dagon.net> wrote:
> <guybas@yahoo.com> wrote: 
[vbcol=seagreen]
> What a horrible design.
 
[vbcol=seagreen]
> Kill itself almost certainly does not leak memory.  If you have binaries t
hat
> don't clean up properly when killed, they can leak resources.  In Unix, it
's
> fairly difficult for this to happen, though, if all the processes are real
ly
> gone.

You haven't worked with many perle programmers.

Mike





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:38 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register