Debugging out of order bugs
Some bugs are the result of operations happening in the wrong order. These usually show up in distributed, asynchronous, or parallel systems. They can also be intermittent, making them extra difficult to debug.
The first thing you want to do is understand the complete order of execution, and logging is a good place to start. If you can’t log centrally, make sure log messages have a timestamp (and that all system have synchronized clocks).
For systems spanning clients, servers, and services, there are Correlation Vectors.
Temporarily making things serial can help narrow down the nature of or particular area of the bug.
What techniques have you used to debug out of order bugs?