Here (
http://oscomp.hu/depot/lazarus_openbsd_signaltest.zip) is a simple GUI program for Lazarus, which starts two simple threads and on close, stops them. The app can be signaled with
SIGTERM,
SIGHUP,
SIGINT and
SIGQUIT which will call
Form1.Close and terminate the program.
Now, if i close the program with the close button, then everything is ok. However, if i do this with one of the terminating signals, then the thread
created as second will fail to stop correctly and crashes the program.
Here is the log when thread 1 is created first:
http://oscomp.hu/depot/lazarus_openbsd_signaltest_terminate.logAnd here is the log when thread 2:
http://oscomp.hu/depot/lazarus_openbsd_signaltest_terminate2.logI would like to highlight again, the crash only occurs if the threads are created and i terminate the app via signals. Either if i do it with the close button, or there are no threads, then no error occurs.
This program works flawlessly under Linux, FreeBSD and Solaris, so in theory the bug is either in FreePascal or Lazarus, or in OpenBSD and not in the program.
It's the latest ( 6.8 ) AMD64 OpenBSD. FreePascal is 3.2.0 and Lazarus is 2.0.10-2.
Any help is appreciated in founding the cause behind this.
And to make things easier for anybody who is willing to help, here is my installscript of Lazarus for OpenBSD:
http://oscomp.hu/depot/install_lazarus_openbsd.shYou can just call it like this:
install_lazarus_openbsd.sh x86_64 3.2.0 2.0.10 2And it will automatically handle installing FreePascal, it's sources, the dependencies of Lazarus and then the build of Lazarus.