Closed Bug 1293784 Opened 3 years ago Closed 3 years ago

No such file or directory: './' (or './') in during incremental builds


(Firefox Build System :: General, defect)

Not set


(firefox51 fixed)

Tracking Status
firefox51 --- fixed


(Reporter: mshal, Assigned: mshal)



(1 file)

We end up recursing into xpcom/idl-parser/xpidl twice, once from and once from xpcom/xpidl/


During a clobber build this happens to work fine - either we only get one invocation, or the second doesn't conflict with the first because there are no outputs to remove. And since we generally don't touch, incremental builds work fine since both invocations of make see that is up-to-date and don't re-run

However, if is touched (as in bug 1293387), and we're doing an incremental build, there is an and left over from the previous build. In this case, it is possible that is invoked twice simultaneously, and both see that & exist (along with .pyc), and try to remove them:

The first one to remove succeeds, and the second one fails. This race condition is pretty difficult to hit, but seems to happen a lot on OSX for some reason. It is much easier to reproduce by adding a sleep:

+    print("Running")
     for fileglobs in [os.path.join(cachedir, f) for f in ["*", "*"]]:
         for filename in glob.glob(fileglobs):
+            print("Sleeping....")
+            time.sleep(5)
+            print("Done sleeping...")

$ ./mach configure
$ ./mach build export
$ (make a meaningless change to
$ ./mach build export
# This fails with the 'No such file or directory' message

I'm currently testing out a patch.
Comment on attachment 8779536 [details]
Bug 1293784 - Only recurse into xpcom/idl-parser/xpidl once;

I think I've written a similar patch myself!

This patch should fix things. One downside is we can no longer evaluate the `export` target in xpcom/xpidl. But I don't think we care.
Attachment #8779536 - Flags: review?(gps) → review+
Pushed by
Only recurse into xpcom/idl-parser/xpidl once; r=gps
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.