Hi Petr,
thanks for reporting this!
Yes, building with --debug is the right thing to do. That drops compiler
optimizations and adds more debugging info.
If gdb is installed, the built-in "(printf...|gdb..." command should
then log a somewhat detailed backtrace. On Linux, a prior
echo 0 > /proc/sys/kernel/yama/ptrace_scope
will be required to enable the debugger to attach to the crashed process.
you can use a different debugger, too, by specifying a custom debug
command. Default is
debug-cmd = "(printf 'bt
q
';sleep 3)|gdb -n -q -p $CRASHPID 2>/dev/null"
Alternatively, you can easily run a debugger (gdb, lldb) via the CLI,
e.g. "lldb -p <pid>", then "cont" and wait until the SEGV occurs.
Thanks,
Marc
On 19.07.2024 09:45, Petr Issakov wrote:
> Hi Marc!
> In log of tac_plus-ng service I notices periodically messages:
>
> / GDB: backtrace start
> Jul 19 09:44:48 t2ru-tacacs-vm-01 tac_plus-ng[663270]: GDB: running:
> "(printf 'bt
> q
> ';sleep 3)|gdb
> -n -q -p $CRASHPID 2>/dev/null"
> /