So, someone filed a bug and there are no steps to reproduce it; the user forgot to include them, or they do not repro in your setup, or they are crashes where no instructions were given.
What can you do to deal with these effectively?
- Post-mortem debugging. I've written about this a long time ago but it's still
- Attached logs. Crawling through logs will often give you a sense of what the user was doing before the problem occurred. Good use of diagnostic levels, warnings for unusual conditions, and durable state transitions (and occasionaly "state dumping" where you include a summary of where things are at important points) can be very effective.
- Telemetry. If logs aren't attached to the issue, you might still be able to understand what was going on if you can see the user's activity in remote systems, whether specific logs meant for tracing or sometimes as "side effects" like web server or database transaction logs.
- Reaching back to the user. If you need details, sometimes you can simply reach back to the user. Two important considerations are 1/ the ability to identify who to reach back to at all, and 2/ users will very very quickly forget what they were doing and observing, so you need to be fast here.
Catch it next time
- Add more state. Is there a piece of data you need that's no longer accessible when something crashes? Add the state or leave traces to make it available for post-mortem debugging if you're set up for that.
- Add more logging or telemetry. If you have infrastructure to access logs or telemetry for a reported failure, trace the codepaths and values that lead to the issue. You might need to be mindful of how much you're working with, so this might depend on how expensive these mechanisms are, but this is a classic approach.
- Add more checks. If things are horribly confused by the time the issue is detected, consider adding checks that will trigger an issue report at an earlier point in the program. Pre-condition and post-condition checks are a classic approach to scope these things down.
Happy bug fixing!
Tags:
debugging
Home