Στις 6/1/2012 23:17, ο/η Uwe Klein έγραψε:
> George Petasis wrote:
>> Hi all,
>>
>> I have a linux server which recently started to lock-up, and I suspect
>> a tcl script of consuming all system memory.
>>
>> If I remember correctly, the core memory allocation functions will
>> never return NULL, but wait until memory is available again.
>> Does this still hold?
>>
>> Is it possible that a tcl script may consume all the available memory,
>> and stopped there waiting for more memory?
>> And the process gets never killed, but makes the server inaccessible?
>> (I observe this on a Fedora 14 64-bit linux system).
>>
>> George
>
> lockup should have other reasons.
>
> OOM condition is met by the OOM-killer ;-)
>
http://prefetch.net/blog/index.php/2009/09/30/how-the-linux-oom-killer-works/
>
>
> You can have situations that consumes all available cpu cycles.
>
> you can test by pinging the host ( should return with normal delay )
Yes, the host responds to ping.
> and then doing an ssh login ( usually you get a login prompt and
> then things get sticky )
No prompt in ssh.
> if it takes ages or forever to get a shell prompt "someone" takes all
> cycles.
>
> Have an ssh session active before anything happens with top running.
> I have seen applications or the X-Server going into that mode.
> Typical effect is that the culprit is running an ultrafast loop over
> timeofday() and ?poll/select? . I've never fathomed why that happens.
> My tentative guess is someone miscalculated the timeout ;-)
>
> uwe
There are no X applications running, except a realvnc server with a
gnome session, which contains a terminal.
I have been waiting for 4 days (!) now for the OOM killer to kick-in,
but I don't know if it is going to happen. The server runs for two years
now (without problems), but it is the second time it locks the last
three weeks (the previous was resolved with a reset).
And I know before-hand that the app that can consume almost all physical
RAM is a tcl script. This is why I am suspecting the tcl allocation
routines. If tcl panics after a while it cannot get more memory, the
server will come back again. But will tcl panic?
George