Currently, when starting ninja multiple times in the same directory the deps log and the build log can get clobbered such that ninja crashes the next time it tries to read the deps log. Build log recovery is more graceful, fortunately. Try to come up with a locking scheme that prevents writing bad data but also doesn't prevent multiple builds (if possible).