Access Violation / Segmentation Fault when stopping LazDaemon daemon + OnStop/OnDestroy event not called in Debian.
Original Reporter info from Mantis: touchring
-
Reporter name: joshua
Original Reporter info from Mantis: touchring
- Reporter name: joshua
Description:
I'm using Lazarus 0.9.30, FPC 2.4.2, testing on Debian 6.
On issuing kill -9 or -15 or -TERM, the daemon will either stop with AV or show segmentation fault - this affects cleandir example also.
I was told by my programmer that this might have something to do with fpsigaction or signaling procedure call.
Also, only OnShutdown event is called on kill -15/-9 or OS reboot. OnDestroy, OnStop are not called.
Attached the test program. Thanks.
Additional information:
Trace from GDB.
joshua@debian:~/Desktop/Data/testapps/basicdaemon$ gdb ./project1
.............
Reading symbols from /home/joshua/Desktop/Data/testapps/basicdaemon/project1...done.
(gdb) run -r
Starting program: /home/joshua/Desktop/Data/testapps/basicdaemon/project1 -r
^C
Program received signal SIGINT, Interrupt.
0xb7fe2424 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fe2424 in __kernel_vsyscall ()
#1 0x08048732 in SYSTEM_FPSYSCALL$LONGINT$LONGINT$LONGINT$$LONGINT ()
#2 0x0809f481 in BASEUNIX_FPSIGSUSPEND$SIGSET_T$$LONGINT ()
#3 0x0809f56a in BASEUNIX_SIGPAUSE$LONGINT$$LONGINT ()
#4 0x00000000 in ?? ()
(gdb)
Mantis conversion info:
- Mantis ID: 19510
- Fixed in version: 3.1.1
- Fixed in revision: 35624 (#d831c578)
- Monitored by: » forest (Boguslaw Brandys)
- Target version: 3.2.0