nginx-c-module-debug

Debug Nginx C modules with GDB and core dump analysis.

193|17|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/pproenca/dot-skills --skill nginx-c-module-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nginx-c-module-debug
Source: https://github.com/pproenca/dot-skills/tree/main/skills/.experimental/nginx-c-module-debug
Command: npx skills add https://github.com/pproenca/dot-skills --skill nginx-c-module-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a comprehensive methodology for debugging C modules in Nginx, addressing critical issues like crashes, memory corruption, and complex request flow problems.

Core Features & Use Cases

  • Systematic Debugging: Follows a prioritized approach from crash diagnosis to build configuration.
  • Memory Bug Detection: Identifies use-after-free, leaks, and buffer overflows.
  • GDB & Core Dump Analysis: Guides effective use of debugging tools for post-mortem analysis.
  • Request Flow Tracing: Helps trace requests through various Nginx phases and subrequests.
  • Use Case: When an Nginx worker crashes with a segfault, use this Skill to analyze the core dump, pinpoint the exact memory corruption, and identify the faulty C module code.

Quick Start

Use the nginx-c-module-debug skill to diagnose a segfault crash by analyzing the core dump using GDB.

Frequently Asked Questions about nginx-c-module-debug

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

FAQPage Schema
How do I debug an nginx C module segfault using a core dump?

Debug an nginx C module segfault by analyzing the core dump with GDB to pinpoint exact memory corruption and identify the faulty code. This methodology provides post-mortem analysis to trace crashes back to specific C module failures.

What is the best way to trace an nginx request flow through processing phases?

Tracing nginx request flow involves tracking requests through various Nginx phases and subrequests to diagnose intermittent processing failures. This systematic approach helps identify where complex request handling breaks down inside custom C modules.

How do I detect memory leaks and use-after-free errors in nginx C modules?

Detect memory leaks and use-after-free errors in nginx C modules by applying a structured memory bug detection methodology. This process identifies buffer overflows and memory corruption issues systematically during module development.

Can I use GDB for post-mortem analysis of an nginx worker crash?

Yes, you can use GDB for post-mortem analysis of an nginx worker crash by examining the generated core dump. This guides effective use of debugging tools to diagnose segfaults and memory corruption after a crash.

What build configurations are needed to debug nginx C modules effectively?

Debugging nginx C modules effectively requires specific build configurations that enable core dump generation and proper symbol resolution. Correct build setups ensure tools like GDB can accurately map crashes to the source code.

Why does my nginx worker process crash intermittently during request processing?

Intermittent nginx worker crashes during request processing often stem from memory corruption or complex request flow issues in custom C modules. Systematic diagnosis using request tracing and memory error detection identifies the faulty logic.