BTRACEBACK(1)

πŸ“¦
version 15.0.3 Β· 3 versions
, in epel 10, fedora 43, fedora 44

πŸ’– BTRACEBACK πŸ’–

okay bestie, gather round, because this one is the little script that catches your Bacula daemons when they fall πŸ’… it lives in the "Network backup, recovery and verification" section of the manual, and it is literally just a wrapper script around gdb and bsmtp.


✨ NAME ✨

btraceback β€” a wrapper script around gdb and bsmtp 🫢


🌸 SYNOPSIS 🌸

btraceback /path/to/binary pid

that's it. that's the whole vibe. two args: where the binary is, and which pid you're snooping on πŸ’«


πŸ¦‹ DESCRIPTION πŸ¦‹

so btraceback is a wrapper shell script around the gdb debugger (or dbx on Solaris systems, hi Solaris besties πŸ‘‹) and bsmtp, and it exists purely for debugging purposes. it's giving backstage pass to your process's soul. no cap.


πŸŽ€ USAGE πŸŽ€

btraceback gets called by the exception handlers of the Bacula daemons during a crash β€” like, when things go boom, this is the girl who shows up with a notepad πŸ“

you can also call it interactively to view the current state of the threads belonging to a process, but lowkey this is not recommended unless you're actively trying to debug a problem (see below, babe πŸ‘‡).


πŸ’œ NOTES πŸ’œ

okay so, important stuff, listen up:

  • for this to actually 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. no symbols, no stack trace, that's just the rules βœ‹
  • if the Director or Storage daemon runs under a non-root uid, you will probably need to modify the btraceback script to elevate privileges for the call to gdb/dbx, so it has the proper permissions to debug when called by the daemon. like, permissions are the whole plot here πŸ”
  • 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. bestie. i am begging you. do not do it in prod for funsies πŸ’€

🌈 ENVIRONMENT 🌈

btracback relies on $PATH to find the debugger. that's the whole environment section, she's short and she's iconic πŸ‘‘


πŸ“ FILES πŸ“

  • /usr/libexec/bacula/btraceback β€” the script itself. the main character πŸ’…
  • /usr/sbin/btraceback β€” a symbolic link to /usr/libexec/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> 🫢 ty for your service king


⭐ SEE ALSO ⭐

this man page document is released under the BSD 2-Clause license πŸ“„βœ¨


and that's the page, bestie!! brought to you by Kern Sibbald, dated 6 December 2009 β€” yes she's an elder but she still ate πŸ’– go read bsmtp(1) next, ily, bye πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from