[fpc-pascal]Another crashes with multithreading

Andrey Kubyshev email at vtc.ru
Mon Dec 11 13:27:19 CET 2000


Hello Programmers,

While writing my multithreading web server on pthreads from my
previous letter, i found strange fact after what it crashes.
i inserted many debug WriteLns in constructors, destructors , in loops
. I found following : sometimes it do WriteLn TWICE !
i checked it inserting this:

Writeln (format ('destructor called %d times. Thread id=%d',[counter,pthread_self()]);
inc (counter);

and before crash i have 2 same outputs ! it happens not only in
destructor, it happens in random places. Then i'm flooded with a lot
of messages 'Something happened' and used memory by application grows
~ 1 Mb in second, then segmentation fault. I dont know where that
'Something happened' comes from is it linux suse message or something
belongs to FPC ? i have not found this message in sources.
Can you please somehow explain possible errors ?

  

-- 
Best regards,
Kubyshev Andrey                          mailto:email at vtc.ru






More information about the fpc-pascal mailing list