InterviewStack.io LogoInterviewStack.io

Debugging and Systematic Troubleshooting Questions

Diagnosing defects methodically: reproducing failures, forming and testing hypotheses, reading stack traces and logs, bisecting changes, and reasoning about error handling and edge cases. Covers a disciplined root-cause approach that applies from local bugs to production issues, distinct from embedded hardware-level debugging. A universally probed engineering-craft skill.

HardTechnical
28 practiced

A long-running C++ process intermittently crashes with heap corruption. Describe a diagnostic plan that includes running under ASAN or Valgrind, enabling core dumps, analyzing stack traces and allocator patterns, and identifying buffer overflows or use-after-free bugs, plus strategies to fix and validate such memory-safety issues in CI.

EasyTechnical
25 practiced

Given a function that sometimes throws an exception deep inside a library you cannot modify, explain how you would instrument the codebase to capture a stack trace and the relevant contextual variables without changing the library's own code. Describe approaches for at least two of Python, Java, or Node.js.

EasyTechnical
24 practiced

Find and explain the bug in this Python function, then provide a corrected implementation:

python
def append_item(item, lst=[]):
    lst.append(item)
    return lst

# append_item(1) -> [1]
# append_item(2) -> [1, 2]  # unexpected: shared across calls

Explain why the sharing happens and show the safe fix for the default argument.

EasyBehavioral
21 practiced

Provide a succinct example of a recent small bug you fixed. Include the minimal code before and after in a language of your choice, explain the root cause, why your fix works, how you tested it, and what you learned that will help you avoid similar bugs in the future.

MediumTechnical
26 practiced

Your payment provider intermittently returns 502 errors, causing checkout failures for customers. Describe the debugging steps you would take to determine whether the root cause is your own integration, the provider itself, the network, or a configuration issue, and describe short-term mitigations to reduce customer impact while you investigate.

Unlock Full Question Bank

Get access to all 42 Debugging and Systematic Troubleshooting interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.