Debugging with gdb on FreeNAS
In case the UrBackup server crashes on FreeNAS a gdb stacktrace is a very helpful tool in finding the cause of the crash.
Steps to get a gdb backtrace:
- Enter the shell of the UrBackup jail
- Install gdb in the shell via the command
pkg_add -r gdb - Shutdown the urbackup server:
killall urbackupsrv - Install tmux:
pkg_add -r tmux - Run tmux:
tmux - Start the UrBackup server in gdb:
gdb --args/usr/local/sbin/urbackupsrv run -g 104857600 -u root
- Start the program in gdb:
run - Once it crashed enter the shell of the plugin jail again and attach to the tmux session:
tmux attach - Enter "bt" to get the backtrace to the location it crashed:
bt - Add the trace information to your bug report
How to get debug logging info:
- Export the Plugin filesystem via filesharing
- Access debug logfile at JAIL_ROOT/var/log