Debugging a deadlock/hang
Posted: Thu Jun 28, 2018 4:32 pm
My app will sometimes just freeze -- it stops logging and responding to network requests. I'd like to interrupt it and drop into the GDB stub and look at the thread/task stacks. Is there a way to do this? I can't find a monitor command for it.
My dev board (a SparkFun ESP32 Thing) has two physical buttons, but one just restarts the app and the other does nothing. Maybe there's a way to hook up the second button to raise an NMI whose handler will drop into the GDB stub?
(I know about the task watchdog; it isn't triggering. I suspect what I have is a deadlock, not an infinite loop.)
My dev board (a SparkFun ESP32 Thing) has two physical buttons, but one just restarts the app and the other does nothing. Maybe there's a way to hook up the second button to raise an NMI whose handler will drop into the GDB stub?
(I know about the task watchdog; it isn't triggering. I suspect what I have is a deadlock, not an infinite loop.)