I could not quite aunderstand if the "new" version of your program, the one with the changes you inserted with the mutex, runs on both systems, or is it that the version with the changes only runs on one system.
You should try to run the "problematic" version on more than one system and see how it behaves.
If it only has problem on one system/configuration then it is more likely the problem is the system (but ofcourse, not 100%), but if the problem is the same on other systems as well, then it is likely that the porblem is your program.
NEVER asume that threads are trivial!!
Small changes in mulithreaded programs can introduce "hidden" problems very easely.