I wrote an MPI Master-Slave program and sometimes I get segmentation fault on one of the slave nodes. It does not happen all the time. For example if I run it 10 times, this happens only once.
The problem is that it never happens inside the lldb. Maybe, because lldb initializes the memory even if there exist some uninitialized variable. I am not sure, though.
Does anyone has any suggestions how to find the problem in this case?
Unfortunately, the code is too long to be copied here.
if it never happens in the debugger there's a good chance its an uninitialized variable, go through the slave code and make sure everything is initialized, see if you still have the same problem.
If only i had a penny for every problem that turned out to be uninitialized data!