Code that debugs itself: Fixing a deadlock with a watchdog
Rare, hard to reproduce bugs are the hardest. We recently fixed a deadlock that had plagued our code for nearly a year, but only showed up about once a month. We would notice something was stuck, debug it for a bit, then finally…