btraceback man page

btraceback — wrapper script around gdb and bsmtp

Synopsis

btraceback /path/to/binary pid

Description

btraceback is a wrapper shell script around the gdb debugger (or dbx on Solaris systems) and bsmtp, provided for debugging purposes.

Usage

btraceback is called by the exception handlers of the Bacula daemons during a crash. It can also be called interactively to view the current state of the threads belonging to a process, but this is not recommended unless you are trying to debug a problem (see below).

Notes

In order to work properly, debugging symbols must be available to the debugger on the system, and gdb, or dbx (on Solaris systems) must be available in the $PATH.

If the Director or Storage daemon runs under a non-root uid, you will probably need to be modify the btraceback script to elevate privileges for the call to gdb/dbx, to ensure it has the proper permissions to debug when called by the daemon.

Although Bacula's use of btraceback within its exception handlers is always safe, manual or interactive use of btraceback is subject to the same risks than live debugging of any program, which means it could cause Bacula to crash under rare and abnormal circumstances. Consequently we do not recommend manual use of btraceback in production environments unless it is required for debugging a problem.

Environment

btracback relies on $PATH to find the debugger.

Files

/usr/lib/bacula/btraceback
The script itself.
/usr/sbin/btraceback
symbolic link to /usr/lib/bacula/btraceback
/etc/bacula/scripts/btraceback.gdb
the GDB command batch used to output a stack trace

Author

This manual page was written by Lucas B. Cohen <lbc@members.fsf.org>

See Also

bsmtp(1) This man page document is released under the BSD 2-Clause license.

Info

6 December 2009 Kern Sibbald Network backup, recovery and verification