[Lazarus] Why does linux+fpc2.2.4+modern lazarus hang?

Bernd Mueller mueller.b at gmx.net
Thu Nov 19 17:14:52 CET 2009


Mattias Gaertner wrote:
> On Thu, 19 Nov 2009 13:58:12 +0100
> Bernd Mueller <mueller.b at gmx.net> wrote:
> 
>> [...]
>> I am no Linux expert, but I think it should be impossible to freeze the 
>> kernel with a wild running "userland" application. I still think it is 
>> somehow hardware related.
> 
> It is ridiculously easy to "freeze" linux.
> Just start hundreds of threads or use a lot of memory.

yes, you are right, I would not have expected that:

procedure TForm1.Button1Click(Sender: TObject);
var
    p: Pointer;
    i: Integer;
begin
    i:= 0;
    repeat
       p:= GetMem(1024);
       inc(i);
       Caption:= IntToStr(i) + ' KB';
       Application.ProcessMessages;
    until FALSE;
end;

froze the desktop/console (Ubuntu 8.04) after a couple of minutes. The 
same with producing a lot of threads (377 in my case). This took only 
seconds.

But I was still able to ping the machine in both cases.

Regards, Bernd.





More information about the Lazarus mailing list