Here is some possible ways to isolate the problem. When the error does not show up on a single processor but does on multiple processors, you are out of luck. The program is most likely to contain some race conditions.
Some programs use a considerable amount of stack space when run on multiple processors.
This happens when a program uses synchronizations between threads that are not in parent-child relationships. For example, -ss 4m sets the stack size of each worker to 4Mbytes. Also See Stacks and Contexts for examining stack size at various program points.