Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-12

Another crashes with multithreading

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrey Kubyshev

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

Reply by email

Marco van de Voort
to Andrey Kubyshev
~ 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 ?

Something happened is a debug writeln when I was debugging the new signal handling (the mergure from Linux and FreeBSD).

It should never have been commited, but now it is removed. It simply means that either a signal was caught, or a specificly a SIGFPE, I can't remember exactly.

Marco van de Voort ( or )

Reply by email