Skills

Debug

Debug FalkorDB crashes, hangs, panics, and incorrect query results - attach lldb/gdb to...

Install

npx skills add FalkorDB/FalkorDB --skill debug -g -a claude-code -y
Repository
FalkorDB/FalkorDB10.5k
Category
Testing
Updated
3d ago
License
See repository
Context cost
Lightabout 903 tokens
Runs scripts
No, instructions only

What it does

Debug FalkorDB crashes, hangs, panics, and incorrect query results - attach lldb/gdb to redis-server with the module loaded, understand panic/crash behavior, step through query execution, and triage failing CI runs. Use when investigating a crash, hang, wrong query result, or a red CI job.

Debug

1. Attach a debugger to the module

Build a debug binary first (cargo build), then launch redis-server with the module loaded under a debugger (mirrors .vscode/launch.json):

# macOS
lldb -- redis-server --loadmodule target/debug/libfalkordb.dylib

# Linux
lldb -- redis-server --loadmodule target/debug/libfalkordb.so
# or: gdb --args redis-server --loadmodule target/debug/libfalkordb.so

Then run inside the debugger, reproduce the issue from a second terminal with redis-cli (or the failing test/query), and let it trap on crash/signal. Use bt (backtrace), frame select/up/down, and thread list to inspect the failure. Swap target/debug for target/release to debug a release build instead.

For a specific failing flow test under the debugger, use RLTest directly instead of flow.sh so it doesn't spawn/manage the server itself (activate the venv first so python -m RLTest resolves, it lives at /data/venv in the devcontainer/CI):

source venv/bin/activate 2>/dev/null || source /data/venv/bin/activate
lldb -- python -m RLTest --test tests/flow/<file>.py --module target/debug/libfalkordb.so --no-progress -v

2. Understand crash/panic behavior before you dig in

Read the whole SKILL.md on GitHub

More in Testing