[m-dev.] Filesystem race condition?

Paul Bone paul at bone.id.au
Thu Sep 17 16:47:38 AEST 2015

Has anyone else seen something like this, during ./tools/bootstrap.sh -j8:

/srv/scratch/dev/mercury_new/clean/stage2/scripts/mmc --make-interface
--grade hlc.gc.par     --mercury-linkage static --flags ../TESTS_FLAGS
--flags ../WS_FLAGS  --no-intermodule-optimization   children
cp: cannot stat ‘children.child2.int2.tmp’: No such file or directory
Error creating `children.child2.int2': can't open input file: No such file
or directory
Error: problem updating interface files.

It looks as if mmc writes the .int2.tmp file and then invokes cp to copy it
to .int2 but cp cannot find the .tmp file.  (see
update_interface_return_changed in module_cmds.m) My filesystem is ext3 with
the options rw,noatime,data=ordered.

Note that mmc attempts to read both the int2 and .int2.tmp files before
invoking cp, but if it cannot open .int2 it will not try to open .int2.tmp

Paul Bone

More information about the developers mailing list