Closed AbdallaDalleh closed 1 year ago
I had run tests under Debian 12(bookworm) and did not see such crashes.
Now I ran the tests under a RockyLinux 8 VM and see the crash on exit command. It points to the camera_.Close function call. Actually even a call of camera_.IsOpen inside shutdown function will cause a crash.
I push a change to remove the shutdown hook. Please give it a try.
I suppose the crash does not happen anymore and close the issue.
After upgrading to Pylon SDK 7.3.0 on Rocky Linux, IOC crashes on exit.
#0 0x00007ffff4b5faff in raise () from /lib64/libc.so.6
#1 0x00007ffff4b32ea5 in abort () from /lib64/libc.so.6
#2 0x00007ffff550109b in __gnu_cxx::__verbose_terminate_handler() [clone .cold.1] () from /lib64/libstdc++.so.6
#3 0x00007ffff550753c in __cxxabiv1::__terminate(void (*)()) ()
from /lib64/libstdc++.so.6
#4 0x00007ffff5507597 in std::terminate() () from /lib64/libstdc++.so.6
#5 0x00007fffed4033a5 in ?? ()
from /home/l_wang/pylon-7.3.0.27189_linux-x86_64/lib/libuxapi.so.7.3
#6 0x00007ffff4b6229c in __run_exit_handlers () from /lib64/libc.so.6
#7 0x00007ffff4b623d0 in exit () from /lib64/libc.so.6
#8 0x00007ffff583e6cc in epicsExit (status=status@entry=0)
at ../misc/epicsExit.c:187
#9 0x0000000000408c2d in main (argc=<optimized out>, argv=<optimized out>)
at ../pylonAppMain.cpp:21
The crash point is in an exit handler of libuxapi.so.7.3.
Now on a Debian Bullseye 11.7 Linux, Pylon SDK 7.3.0 also crashes on exit, while version 7.2.1 has no such issue.
It seems one has to call PylonTerminate
before program exits. So I add back the shutdown handler in 0421ef9.
The good news is that now IOC exits cleanly on both Debian and Rocky Linux with both 7.2 and 7.3 Pylon SDK.
Hi
For some reason when you type exit at the IOC shell, the IOC exits but while receiving a Segmentation Fault error. While acquiring images, suddenly the IOC crashes because of a segmentation fault when it was trying to exit for some reason.
Here is the output while running under gdb, the IOC immediately exits:
Here is the output from the backtrace from the core dump:
I thought maybe because we are using the latest 7.2.1 so I tried different versions until version 6.2 I think and I got the same behavior. Again, this behavior happens randomly, sometimes within 2 to 3 hours sometimes more than 12 hours.