A heisenbug is a bug that changes your behavior when you study [1] . It has its name derived from the principle that Heisenberg detected that the simple "passive observation" of quantum processes changes the final result.
Typical heisenbugs happen with race conditions , since any type of measurement you do (such as trace debugging or break points ) ends up synchronizing concurrent processes in one way or another. The André LFS Bacci has indicated that using floating point for monetary purposes can cause heisenbugs [2] .
*: In quantum physics there are no purely passive observations, but that's details
So, imagine that I am in a complicated situation trying to solve a problem in the system and I can even reproduce the bug, but when I try to see more things about the bug by putting a strategic break point , this bug leaves to happen. At that moment, I come across that situation:"OMG! A heisenbug!"
The PHB asks me what's going on. Support is with the customer on the line. I need to give an answer about how the study of this problem is going, I need to ask for more time to try to heal because it is not a simple bug, but a heisenbug!
How can I explain to the boss and support about heisenbug? They are not the deepest connoisseurs of programming, they think that only by if (stuff_will_bug()) { dont_do_stuff(); } else { do_stuff(); }
solves the problem magically.
*: Preferably, explanations that do not result in my resignation