Closed
Bug 1082910
Opened 11 years ago
Closed 11 years ago
Race condition for sdk/bootstrap.js
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox34+ fixed, firefox35 unaffected, firefox36 unaffected)
RESOLVED
FIXED
mozilla34
| Tracking | Status | |
|---|---|---|
| firefox34 | + | fixed |
| firefox35 | --- | unaffected |
| firefox36 | --- | unaffected |
People
(Reporter: nthomas, Assigned: glandium)
References
Details
Attachments
(1 file)
make[7]: Leaving directory `/builds/slave/rel-m-beta-l64_bld-00000000000/build/obj-firefox/addon-sdk'
make[6]: Leaving directory `/builds/slave/rel-m-beta-l64_bld-00000000000/build/obj-firefox/addon-sdk'
cannot make symbolic link /builds/slave/rel-m-beta-l64_bld-00000000000/build/obj-firefox/dist/bin/modules/sdk/bootstrap.js: File exists
make[7]: *** [../dist/bin/modules/sdk/bootstrap.js] Error 1
make[7]: *** Deleting file `../dist/bin/modules/sdk/bootstrap.js'
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [libs] Error 2
make[5]: *** [addon-sdk/libs] Error 2
Full log at http://ftp.mozilla.org/pub/mozilla.org/firefox/candidates/34.0b1-candidates/build2/logs/release-mozilla-beta-linux64_build-bm82-build1-build10.txt.gz
But:
[cltbld@b-linux64-ix-0010.build.releng.scl3.mozilla.com ~]$ ls -l /builds/slave/rel-m-beta-l64_bld-00000000000/build/obj-firefox/dist/bin/modules/sdk/bootstrap.js
ls: cannot access /builds/slave/rel-m-beta-l64_bld-00000000000/build/obj-firefox/dist/bin/modules/sdk/bootstrap.js: No such file or directory
The parent directory exists and is empty.
| Reporter | ||
Comment 1•11 years ago
|
||
That was while building 34.0b1 on http://hg.mozilla.org/releases/mozilla-beta/rev/7a12de89326b
| Reporter | ||
Comment 2•11 years ago
|
||
And again in http://ftp.mozilla.org/pub/mozilla.org/firefox/candidates/34.0b1-candidates/build2/logs/release-mozilla-beta-linux_build-bm86-build1-build12.txt.gz
Changes since we didn't hit this in 34.0b1 build1:
http://hg.mozilla.org/releases/mozilla-beta/rev/35b93d3f5d65
http://hg.mozilla.org/releases/mozilla-beta/rev/9e9e53d15011
http://hg.mozilla.org/releases/mozilla-beta/rev/00cf6dd17a10
I don't see anything relevant there.
| Reporter | ||
Comment 3•11 years ago
|
||
[Tracking Requested - why for this release]: Causing builds to fail in buildbot, so far one dep build and two release builds.
tracking-firefox34:
--- → ?
Comment 4•11 years ago
|
||
The code that copies that file is new to 34 from bug 1044162, maybe a bug in it? A little worried by that bug having an unreviewed "fixup patch" in it. I defer to build peers.
Flags: needinfo?(nfroyd)
Comment 5•11 years ago
|
||
(In reply to Dave Townsend [:mossop] from comment #4)
> The code that copies that file is new to 34 from bug 1044162, maybe a bug in
> it? A little worried by that bug having an unreviewed "fixup patch" in it. I
> defer to build peers.
I would have expected a bug from that to show up long before now.
I see six reviewed patches in bug 1044162; are you looking at a different bug?
Flags: needinfo?(nfroyd)
| Assignee | ||
Comment 6•11 years ago
|
||
The bug is that the Makefile.in does a make -f copy_source.mk libs, and that triggers the rules for what was added in bug 1044162. So there's a race between that happening and the current invocation of the makefile triggering that rule as well.
Something like the following should fix it (patch edited by hand because I don't have a beta tree ready to use and that code is gone on trunk):
--- a/addon-sdk/Makefile.in
+++ b/addon-sdk/Makefile.in
@@ -7,17 +7,17 @@
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
MOZ_B2G=1
else
MOZ_B2G=0
endif
libs::
$(PYTHON) $(srcdir)/copy_source.py $(topsrcdir) $(srcdir)/source/lib $(FINAL_TARGET)/modules/commonjs $(MOZ_B2G) >copy_source.mk
- $(MAKE) -f copy_source.mk libs
+ $(MAKE) -f copy_source.mk copy_source
include $(topsrcdir)/config/rules.mk
TEST_FILES = \
source/app-extension \
source/bin \
source/python-lib \
source/test \
--- a/addon-sdk/copy_source.py
+++ b/addon-sdk/copy_source.py
@@ -53,11 +53,12 @@
]:
continue
varname = "COMMONJS%s" % relative.replace('/', '_')
print "%s_FILES = \\" % varname
for name in filenames:
print " %s/%s \\" % (dirpath, name)
print " $(NULL)"
print "%s_DEST = %s%s" % (varname, target_dir, relative)
+ print "%s_TARGET = copy_source" % varname
print "INSTALL_TARGETS += %s\n" % varname
print "include $(topsrcdir)/config/rules.mk"
Comment 7•11 years ago
|
||
(In reply to Nathan Froyd (:froydnj) from comment #5)
> (In reply to Dave Townsend [:mossop] from comment #4)
> > The code that copies that file is new to 34 from bug 1044162, maybe a bug in
> > it? A little worried by that bug having an unreviewed "fixup patch" in it. I
> > defer to build peers.
>
> I would have expected a bug from that to show up long before now.
>
> I see six reviewed patches in bug 1044162; are you looking at a different
> bug?
Sorry yes reviewed, just no indication it landed.
Comment 8•11 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #6)
> The bug is that the Makefile.in does a make -f copy_source.mk libs, and that
> triggers the rules for what was added in bug 1044162. So there's a race
> between that happening and the current invocation of the makefile triggering
> that rule as well.
>
> Something like the following should fix it (patch edited by hand because I
> don't have a beta tree ready to use and that code is gone on trunk):
>
> --- a/addon-sdk/Makefile.in
> +++ b/addon-sdk/Makefile.in
> @@ -7,17 +7,17 @@
> ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
> MOZ_B2G=1
> else
> MOZ_B2G=0
> endif
>
> libs::
> $(PYTHON) $(srcdir)/copy_source.py $(topsrcdir) $(srcdir)/source/lib
> $(FINAL_TARGET)/modules/commonjs $(MOZ_B2G) >copy_source.mk
> - $(MAKE) -f copy_source.mk libs
> + $(MAKE) -f copy_source.mk copy_source
>
> include $(topsrcdir)/config/rules.mk
>
> TEST_FILES = \
> source/app-extension \
> source/bin \
> source/python-lib \
> source/test \
> --- a/addon-sdk/copy_source.py
> +++ b/addon-sdk/copy_source.py
> @@ -53,11 +53,12 @@
> ]:
> continue
> varname = "COMMONJS%s" % relative.replace('/', '_')
> print "%s_FILES = \\" % varname
> for name in filenames:
> print " %s/%s \\" % (dirpath, name)
> print " $(NULL)"
> print "%s_DEST = %s%s" % (varname, target_dir, relative)
> + print "%s_TARGET = copy_source" % varname
> print "INSTALL_TARGETS += %s\n" % varname
>
> print "include $(topsrcdir)/config/rules.mk"
I was able to reproduce this locally in beta by adding a sleep(1) in nsinstall.c:
@@ -419,6 +420,7 @@ main(int argc, char **argv)
(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
exists = 0;
}
+ sleep(1);
if (!exists && symlink(name, toname) < 0)
fail("cannot make symbolic link %s", toname);
(Without this I wasn't able to get a double nsinstall on bootstrap.js, even with hundreds of builds - I guess it is just much more rare on my machine configuration).
In any case, I can confirm that glandium's patch fixes the issue.
Updated•11 years ago
|
status-firefox34:
--- → affected
Comment 9•11 years ago
|
||
Can one of you take this to get a proper patch up and a fix into the trees?
Flags: needinfo?(mshal)
Flags: needinfo?(mh+mozilla)
| Assignee | ||
Comment 10•11 years ago
|
||
Assignee: nobody → mh+mozilla
Flags: needinfo?(mh+mozilla)
Attachment #8508384 -
Flags: review?(mshal)
Updated•11 years ago
|
Flags: needinfo?(mshal)
Attachment #8508384 -
Flags: review?(mshal) → review+
| Reporter | ||
Comment 11•11 years ago
|
||
<lmandel> nthomas: This is build config. I'm happy for you to land this. If you want approval, I'm also happy to give the a+.
So I landed a=lmandel: https://hg.mozilla.org/releases/mozilla-beta/rev/8c63e1286d75
Target Milestone: --- → mozilla34
| Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Summary: Race condition for sdk/bootstrap.js ? → Race condition for sdk/bootstrap.js
Updated•11 years ago
|
status-firefox35:
--- → unaffected
status-firefox36:
--- → unaffected
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•