query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)

Post by abk964 »

Hi.

Use Zeos r7867, Lazarus 2.2.2, FPC 3.2.2, Ubuntu 16.04 32bit, Firebird 3.0.

Testing reconnection after connection lost. Found, that if TZReadOnlyQuery.Open executed in different (not main) thread on connection lost raises SIGSEGV, so connection can not be reopened. Seems, connection object is broken. ExecuteDirect instead of Query.Open works right.

Test project attached.

Code: Select all

'select ''Now'' from rdb$database'
must work with any DB.

Run application, stop Firebird, SIGSEGV raise, start Firebird, after ENTER Reconnect raise one more SIGSEGV.

TFPTimer used with option "UseTimerThread" to run in separate thread.

Similar code in Delphi 7 works right.
You do not have the required permissions to view the files attached to this post.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1962
Joined: 17.01.2011, 14:17

Re: query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)

Post by marsupilami »

I can confirm the bug. Unfortunately it is hard to debug on Windows. I will have to see what happens on Linux.

What timer do you use for testing this on Windows?
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

Re: query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)

Post by abk964 »

I use TThread instead of timer on Windows.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1962
Joined: 17.01.2011, 14:17

Re: query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)

Post by marsupilami »

Could you please also post the code that uses TTimer? It would help me in debugging this.
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

Re: query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)

Post by abk964 »

I had not use TTimer. As I understand it works in same thread.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1962
Joined: 17.01.2011, 14:17

Re: query raise SIGSEGV in not main thread if connection lost (Linux, Firebird)

Post by marsupilami »

I am sorry - I meant the code using TThread. I just want to see if I can add an example to the test suites and if I can modify it to generate the problem on FPC too without using TFPTimer.
Post Reply