Closed Bug 1660880 Opened 4 years ago Closed 4 years ago

./mach build faster fails with complaints about "OSError: [Errno 30] Read-only file system: '/js'"

Categories

(Firefox Build System :: General, defect)

Unspecified
All
defect

Tracking

(firefox-esr68 unaffected, firefox-esr78 unaffected, firefox79 unaffected, firefox80 unaffected, firefox81 fixed, firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox79 --- unaffected
firefox80 --- unaffected
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: mconley, Assigned: glandium)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

This just started happening today after I did a local opt build. The work around is to use an artifact build, or run ./mach build instead of ./mach build faster - but I'd really rather use ./mach build faster since it's, well, faster. :)

mconleys-MBP:mozilla-central mikeconley$ ./mach build faster
 0:00.98 /usr/bin/make -C faster -j16 -s
 0:01.34 Elapsed: 0.00s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/gmp-fake/1.0: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:01.35 Elapsed: 0.00s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/browser/features/webcompat-reporter@mozilla.org: Kept 1 existing; Added/updated 2; Removed 0 files and 0 directories.
 0:01.38 Elapsed: 0.02s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/localization: Kept 47 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:01.38 Elapsed: 0.00s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/gmp-fakeopenh264/1.0: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:01.39 Elapsed: 0.02s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/browser/features/formautofill@mozilla.org: Kept 52 existing; Added/updated 2; Removed 0 files and 0 directories.
 0:01.39 Elapsed: 0.05s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/gmp-clearkey/0.1: Kept 0 existing; Added/updated 1; Removed 0 files and 0 directories.
 0:01.40 Elapsed: 0.02s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/browser/localization: Kept 74 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:01.43 Error opening file "/js"
 0:01.43 Error opening file "/js"
 0:01.43 Traceback (most recent call last):
 0:01.43 Traceback (most recent call last):
 0:01.43   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/action/file_generate.py", line 111, in main
 0:01.43     mk.dump(dep_file)
 0:01.43   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 338, in __exit__
 0:01.43     self.close()
 0:01.43   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 276, in close
 0:01.43     ensureParentDir(self.name)
 0:01.43   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 158, in ensureParentDir
 0:01.43     os.makedirs(d)
 0:01.43   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   [Previous line repeated 2 more times]
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 221, in makedirs
 0:01.44     mkdir(name, mode)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/action/file_generate.py", line 111, in main
 0:01.44     mk.dump(dep_file)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 338, in __exit__
 0:01.44     self.close()
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 276, in close
 0:01.44     ensureParentDir(self.name)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 158, in ensureParentDir
 0:01.44     os.makedirs(d)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44 OSError: [Errno 30] Read-only file system: '/js'
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44 During handling of the above exception, another exception occurred:
 0:01.44   [Previous line repeated 1 more time]
 0:01.44 Traceback (most recent call last):
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 221, in makedirs
 0:01.44     mkdir(name, mode)
 0:01.44 OSError: [Errno 30] Read-only file system: '/js'
 0:01.44 During handling of the above exception, another exception occurred:
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/action/file_generate.py", line 114, in main
 0:01.44     output.avoid_writing_to_file()
 0:01.44 Traceback (most recent call last):
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 338, in __exit__
 0:01.44     self.close()
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 276, in close
 0:01.44     ensureParentDir(self.name)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 158, in ensureParentDir
 0:01.44     os.makedirs(d)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/action/file_generate.py", line 114, in main
 0:01.44     output.avoid_writing_to_file()
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 338, in __exit__
 0:01.44     self.close()
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 276, in close
 0:01.44     ensureParentDir(self.name)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/python/mozbuild/mozbuild/util.py", line 158, in ensureParentDir
 0:01.44     os.makedirs(d)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   [Previous line repeated 1 more time]
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 211, in makedirs
 0:01.44     makedirs(head, exist_ok=exist_ok)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 221, in makedirs
 0:01.44     mkdir(name, mode)
 0:01.44   File "/Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/_virtualenvs/init_py3/lib/python3.7/os.py", line 221, in makedirs
 0:01.44     mkdir(name, mode)
 0:01.44 OSError: [Errno 30] Read-only file system: '/js'
 0:01.44 OSError: [Errno 30] Read-only file system: '/js'
 0:01.45 make: *** [/js/src/ctypes/libffi/.deps/fficonfig.h.stub] Error 1
 0:01.45 make: *** Waiting for unfinished jobs....
 0:01.45 make: *** [/js/src/ctypes/libffi/include/.deps/ffi.h.stub] Error 1
 0:01.97 Elapsed: 0.36s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin: Kept 1708 existing; Added/updated 39; Removed 0 files and 0 directories.
 0:02.14 Elapsed: 0.76s; From /Users/mikeconley/Projects/mozilla-central/obj-x86_64-apple-darwin19.5.0/dist/bin/browser: Kept 3824 existing; Added/updated 42; Removed 0 files and 0 directories.
 0:02.17 332 compiler warnings present.

A clobber build does not solve this, fwiw.

This looks rather like a path interpolation error. The message looks like it's triggering https://superuser.com/a/1495146 by trying to write /js, which is just wrong:

0:01.44 OSError: [Errno 30] Read-only file system: '/js'

Seems like some directory in there isn't set, or we have a repeated slash, or ...

This is macOS-specific, and looks to be new in Catalina (10.15) and greater.

OS: Unspecified → macOS

Backing out the two patches from bug 1659906 seems to fix this (thanks, Aryx!)

Regressed by: 1659906
Has Regression Range: --- → yes

IIRC, I saw this error on my Linux box (yesterday).

OS: macOS → All

I see this on Fedora 32. The error message is : machBuildFaster> 0:00.68 PermissionError: [Errno 13] Permission denied: '/js' I bisected to the same regressing bug.

The summary is a bit too specific in terms of the error message.

Assignee: nobody → mh+mozilla
Flags: needinfo?(mh+mozilla)

This makes working on Android impossible :( since mach install uses mach build faster

(In reply to Agi Sferro | :agi | ⏰ PST | he/him from comment #7)

This makes working on Android impossible :( since mach install uses mach build faster

Workaround: export GRADLE_INVOKED_WITHIN_MACH_BUILD=1 in your shell, which should avoid running anything mach from within Gradle. I think that mach build will still work fine.

Bug 1659906 removed ../s from some generated files paths which turned
up not being supported by the faster make backend. Instead of returning
to those relative paths, just support the topobjdir-relative paths
correctly. The new code is derived from the equivalent code in the
recursive make backend.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/84f586dbbe1f
Support topobjdir-relative generated files in the faster make backend. r=froydnj
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Comment on attachment 9171832 [details]
Bug 1660880 - Support topobjdir-relative generated files in the faster make backend.

Beta/Release Uplift Approval Request

  • User impact if declined: Build failure in some cases
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Build system change only, that only affects one specific kind of build.
  • String changes made/needed:
Attachment #9171832 - Flags: approval-mozilla-beta?

Comment on attachment 9171832 [details]
Bug 1660880 - Support topobjdir-relative generated files in the faster make backend.

approved for 81.0b3

Attachment #9171832 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: