When cout is called in multiple threads it is possible that its internal data structures are corrupted. It seems to have been solved in C++11 ( http://stackoverflow.com/a/6374525/574082 ). Locally I'm compiling against C++98/C++03 to keep compatibility with older versions of GCC.