Signals are unrealiable and non-portable.
I've seen this sort of non-deterministic signals behaviour when under stress also on Linux. Plus, if you ever plan to run this under Win32, forget it.
The best advice I can give is to try not using signals and to do it some other way around.