debugging 101 - wordpress.com...happy debugging! title debugging101.key created date 6/28/2016...

16
Debugging 101 Neelima Mukiri

Upload: others

Post on 15-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Debugging 101Neelima Mukiri

Page 2: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Case Studies (Please refer to the blog

post)

Page 3: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Define the Problem

Who?

What?

Where? When?

How?

Why?

Define the Problem

Page 4: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Understand the System• Product ecosystem

• Programming Language

• Frameworks

• Operating System

• Networking

• Storage

• Hardware

Page 5: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Collect More Information

• Software, hardware configurations

• Work loads

• State of the system at panic

• Compare with a working system

• User and privilege information

Page 6: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Recreate the Failure

http://www.youtube.com/watch?v=gIdcvIqkSBA&t=0m55s

Page 7: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Identify Potential Causes

• Brainstorm

• Clues from data

• Experience and Intuition

• Potential Cause and effect analysis

Page 8: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Divide and Conquer

• Software Instrumentation

• Hardware Dumps

• Hardware assisted memory virtualization

• Software/Hardware Versions Involved

Page 9: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Track the Changes

• Document EVERYTHING

• It is easy to lose track of experiments done, results and side effects

• Recreate the failure after every change

• Absence of failure means nothing…almost

Page 10: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Cause and effect analysis

• Zoom in on probable cause

• Does it explain all the symptoms

• Does anything in the system state contradict expected behavior for this cause

• Test fixes

Page 11: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

DON’T PANIC

Page 12: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Method to the madness• Define the problem precisely

• Understand the system in depth

• Collect data

• Catch the failure

• Identify potential causes

• Divide and conquer

• Track changes and effects

• Document everything

• Test the fixes

• Diversity Rocks

Page 13: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Collaborate

Brainstorm

Page 14: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Discuss, explain, get a fresh look

Page 15: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Design for Debugging• Bugs are inevitable

• Logs, monitoring, configuration collection

• Replication Tools

• Stress Options

• Debug tools are Products

• Can you Ping your system?

• Workarounds and Feature Switches

Page 16: Debugging 101 - WordPress.com...Happy Debugging! Title debugging101.key Created Date 6/28/2016 6:35:55 PM

Happy Debugging!