To the outside observer, it looked like a mechanical failure. To Elias, looking at the disassembly, it looked like chaos.

Inside ivthandleinterrupt , the code:

An interrupt handler should do the bare minimum. If you need to do heavy data processing, use the handler to "flag" the work for a background task and exit immediately.

A common bug in custom ivthandleinterrupt implementations is failing to write to the End of Interrupt (EOI) register. Without that, the CPU will re-enter the same ISR immediately after returning, causing a hang or stack overflow.