Sometimes the bug is a full disk or a bad network cable.
Use specialized tools to detect race conditions that are nearly impossible to find manually.
Don't change code randomly hoping the bug disappears.
Observe, hypothesize, experiment, and conclude.
Once fixed, write a regression test so the bug never returns. To help you get the most out of this, let me know: