#1 2024-06-24 11:31:51

ttomas
Member
Registered: 2013-03-08
Posts: 135

TSynDaemon Access violation on stop

Linux daemon raise exception on stop (systemctl stop ..)
EXCOS EAccessViolation (9df7d740) [Main] at 442bec ../../src/core/mormot.core.os.posix.inc  (3183)
./myapp --start # is OK
./myapp --stop # raise same exception
./myapp --c # console is OK

Offline

#2 2024-06-24 14:29:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: TSynDaemon Access violation on stop

The Info value is a pointer directly returned by the system, so if Info <> nil then Info^.si_code should never GPF, as it is documented:

si_signo, si_errno and si_code are defined for all signals.

https://www.man7.org/linux/man-pages/ma … ion.2.html

Are you sure you are not using another unit from the FPC RTL which is already playing with the signals (e.g. the crt unit)?
Can you provide a minimalistic realistic example?

Offline

#3 2024-06-24 15:09:21

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: TSynDaemon Access violation on stop

Offline

#4 2024-06-24 22:06:08

ttomas
Member
Registered: 2013-03-08
Posts: 135

Re: TSynDaemon Access violation on stop

Thanks @ab, problem solved with last changes, no more exception.
Problem is connected to firebird client lib, when aFbProps.Free; in Stop, (aFbProps: TSqlDBIbxConnectionProperties). When I remove aFbProps from app, no exception is raised!
Same code on Windows as console or service, or Linux console don't rise any exception, only as daemon forked/process.

Offline

Board footer

Powered by FluxBB