debug-troubleshoot

Diagnose runtime issues in Rust async code with Tokio, Turso, and redb.

11|Updated Nov 5, 2025
One-click install
npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill debug-troubleshoot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-troubleshoot
Source: https://github.com/d-o-hub/rust-self-learning-memory/tree/main/.claude/skills/debug-troubleshoot
Command: npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill debug-troubleshoot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured debugging approach for Rust async code with Tokio, Turso, and redb, covering runtime issues, performance, deadlocks, and panics.

Core Features & Use Cases

  • Logging & tracing: recommended patterns with tracing and console.
  • Deadlock diagnosis: timeouts, locks, and race conditions strategies.
  • Connection diagnostics: Turso and redb health checks with actionable fixes.

Quick Start

Enable tracing, run the program, and follow debugging steps to identify and resolve issues.

Frequently Asked Questions about debug-troubleshoot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug deadlocks in Rust async code with Tokio?

Debugging Tokio deadlocks requires identifying lock contention and async task blocking using tracing instrumentation and Tokio Console. Enable tracing spans around lock acquisition, set timeouts on critical sections, and use Tokio Console to visualize task states and detect tasks waiting indefinitely on locks or channels.

What's the best way to diagnose Turso and redb connection issues?

Diagnose connection problems by implementing health checks on Turso and redb clients, logging connection lifecycle events with tracing, and monitoring for exhausted connection pools. Check database availability, validate credentials, and trace query execution to pinpoint where connections fail or hang.

How do I trace and fix panics in Rust async services?

Capture panics in async services using tracing to log panic context, backtrace, and task information before the panic propagates. Integrate with panic hooks, use LLDB or GDB to inspect memory state at crash time, and correlate panic timing with tracing spans to identify the triggering condition.

Can I detect memory leaks in Tokio-based Rust applications?

Memory leak detection in Tokio services combines tracing to track resource allocation and cleanup, heap profiling with tools like Valgrind or heaptrack, and LLDB/GDB inspection of live processes. Monitor task lifetimes, connection counts, and buffer sizes to identify resources not being released.

What instrumentation do I need to debug Rust async runtime issues?

Effective async debugging requires tracing crates for structured logging, Tokio Console for runtime introspection, and debugger integration with LLDB or GDB. Install tracing subscribers, enable Tokio Console support in your async runtime, and configure debugger symbols to inspect task state and lock contention.

How do I approach troubleshooting performance degradation in async Rust code?

Performance troubleshooting uses tracing to measure span durations, Tokio Console to identify task scheduling delays and work-stealing inefficiencies, and profilers to find CPU or I/O bottlenecks. Correlate slow traces with database query latency on Turso or redb, and check for blocking operations on the async executor.