Detection of zigzag path and useless checkpoints in a distributed system.