Whenever a fellow programmer or myself starts even considering that the OS, .NET-Framework, JVM etc. might be responsible for a bug, I have to smile.
In that moment, 2 things are almost certainly true:
1. The bug is in your code. 2. You are too tired/stressed/overfocused to see it.
So when I find myself in this state, I instantly stop working and go for a walk (or go home when its late enough).
Then, when rested, I tackle the problem again. I will find my bug, or, for the very rare case, find a way to prove that it really is the environment my code runs in.
But most importantly, I will have a sharp tool for the job.