From 3d04a2fe80a49c0e918faa76c032bc8c5657c3ce Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 14 Apr 2025 17:45:09 -0400 Subject: added some notes to the readme --- README.md | 36 ++++++++++++++++++++++++++++++++++++ docker-compose.yaml | 24 ++++++++++++++++-------- 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8fc4c35..64210a8 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,39 @@ You can use [grype](https://github.com/anchore/grype) to check for CVEs affectin ```sh grype bitlbee-purple --scope all-layers ``` + +## Debugging + +For debugging, you can use the docker compose file provided in the repo. Enable the plugin you want, and run. + +This command will run until we crash, after which it will print the backtrace and exit: + +```yaml +command: + [ + "gdb", + "-ex", + "'handle SIGPIPE nostop noprint pass'", + "-ex", + "run", + "-ex", + "bt", + "--args", + "/usr/sbin/bitlbee", + "-Dnv", + "-d", + "/var/lib/bitlbee", + ] +``` + +This command prints debug information for bitlbee: + +```yaml +command: + [ + "/usr/sbin/bitlbee", + "-Dnv", + "-d", + "/var/lib/bitlbee", + ] +``` diff --git a/docker-compose.yaml b/docker-compose.yaml index 8dd9e25..3033246 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,6 @@ # DO NOT RUN THIS FOR ANYTHING OTHER THAN DEBUGGING. SERIOUSLY. # https://wiki.bitlbee.org/DebuggingCrashes +# https://wiki.bitlbee.org/Debugging services: bb_dbg: image: bb_dbg @@ -22,16 +23,23 @@ services: ports: - "127.0.0.1:9667:6667" - "172.17.0.1:9667:6667" + # command: + # [ + # "gdb", + # "-ex", + # "'handle SIGPIPE nostop noprint pass'", + # "-ex", + # "run", + # "-ex", + # "bt", + # "--args", + # "/usr/sbin/bitlbee", + # "-Dnv", + # "-d", + # "/var/lib/bitlbee", + # ] command: [ - "gdb", - "-ex", - "'handle SIGPIPE nostop noprint pass'", - "-ex", - "run", - "-ex", - "bt", - "--args", "/usr/sbin/bitlbee", "-Dnv", "-d", -- cgit v1.2.3