Debugging

Postmortems
Postmortems
This document covers postmortem documentation for incident response, including purpose, structure, essential components like root cause and prevention measures, focusing on learning rather than blame, and practicing postmortem writing for continuous improvement. Learning from incidents through documentation.
Communication and Documentation
Communication and Documentation
This document covers communication and documentation strategies during incident response, including tracking troubleshooting activities communicating with affected users, coordinating team roles like incident commander and communications lead, and creating effective post-incident summaries. Incident management best practices.
Debug With PDB
Debug With PDB
This document covers debugging Python programs using PDB interactive debugger including setting breakpoints, stepping through code, inspecting and modifying variables, and post-mortem debugging. Python's built-in interactive debugger.
Debug With Try-Except
Debug With Try-Except
This document covers debugging Python programs using try-except blocks for exception handling, including catching specific exceptions, custom exceptions finally clauses, and best practices for graceful error handling. Essential exception handling technique.
Debug With Print
Debug With Print
This document covers debugging Python programs using print statements including strategies for variable inspection, execution flow tracking formatted output techniques, and best practices for effective printf debugging. Simple yet powerful debugging technique.
Python Crash Debugging
Python Crash Debugging
This document demonstrates debugging Python exceptions using PDB debugger covering traceback analysis, KeyError investigation, and fixing UTF-8 BOM encoding issues in CSV files. Practical case study of database import script debugging.
Debugging Segmentation Faults
Debugging Segmentation Faults
This document demonstrates debugging segmentation faults using core files and GDB, covering commands like backtrace, up, list, and print to analyze crashes and identify off-by-one errors. Practical walkthrough of C program debugging.
Working with Someone Else's Code
Working with Someone Else's Code
This document covers strategies for understanding and fixing problems in code written by others, including reading comments and tests, navigating large codebases, and practicing with open-source projects. Essential skills for maintaining unfamiliar code.
Invalid Memory
Invalid Memory
This document explains invalid memory access errors, including segmentation faults, memory management in operating systems, debugging techniques with symbols, and tools like valgrind for detection. Coverage includes common programming errors and remediation strategies.
Resources For Understanding Crashes
Resources For Understanding Crashes
This document provides resources and tools for understanding computer crashes including hardware failures, OS errors, and software deficiencies. Coverage includes BSoD, system logs, Process Monitor, strace, and system call tracing across platforms.
Internal Server Error
Internal Server Error
This document demonstrates debugging a web server returning HTTP 500 errors by investigating logs, configuration files, process information, and file permissions. Focus is on systematic investigation and root cause identification.
Understanding Crash Application
Understanding Crash Application
This document summarizes techniques to analyse application crashes using logs tracing tools, change analysis, and minimal reproduction cases. Emphasis is on isolating root causes and collecting evidence for remediation or reporting.
System Crash
System Crash
This document describes steps to diagnose and resolve system crashes, covering hardware checks, OS and application troubleshooting, and remediation planning. Focus is on isolating root causes and selecting efficient fixes.
Crashing Programs
Crashing Programs
Learn how to troubleshoot and debug crashing programs effectively, including monitoring strategies, bug reporting, and long-term fixes.
Finding Invalid Data
Finding Invalid Data
This document demonstrates a practical bisecting troubleshooting example where a CSV import script fails due to corrupt data. It shows how to use Unix command-line tools like head, tail, and wc to systematically divide a 100-line file and identify the specific malformed record causing import errors.
Applying Binary Search in Troubleshooting
Applying Binary Search in Troubleshooting
This document explains how to apply the binary search algorithm to troubleshooting scenarios by bisecting problem spaces, reducing potential causes by half with each iteration, and efficiently identifying root causes in configuration files, code commits, browser extensions, and system components through systematic elimination.
Intermittent Failing Script
Intermittent Failing Script
This document presents a real-world case study of debugging a date formatting issue in a meeting reminder application. It demonstrates reproducing problems isolating faulty parameters, adding debug output, identifying root causes, and implementing fixes that work across different locale settings.
Intermittent Issues
Intermittent Issues
This document addresses the challenges of debugging intermittent problems that occur sporadically. It covers logging strategies, debugging modes environmental monitoring, Heisenbugs, resource management issues, and the underlying causes of problems resolved by system restarts.
Finding the Root Cause
Finding the Root Cause
This document explains the iterative hypothesis-testing cycle for identifying root causes, demonstrates using test environments for safe troubleshooting and explores diagnostic tools like iotop, iftop, and resource limiting commands to investigate and resolve server performance issues.
Reproducing the Problem
Reproducing the Problem
This document explains how to create clear reproduction cases for debugging tricky issues, explores system logs across different operating systems, and demonstrates techniques for isolating problem conditions through systematic testing and environmental analysis.