'artifact install' task fails on subsequent builds: Exception: Can't find config.status

RESOLVED FIXED in Firefox 50

Status

defect
--
major
RESOLVED FIXED
3 years ago
7 months ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

unspecified
mozilla50
Dependency tree / graph

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(3 attachments)

Assignee

Description

3 years ago
+++ This bug was initially created as a clone of Bug #1277841 +++

My setup:
* Repository: fx-team
* MacOS X
* --enable-artifact-builds

The first build (after clobber) works. However on every subsequent build I get an error and mach just hangs:

> TheSilence:fx-team sebastian$ ./mach build
>  0:00.18 Running |mach artifact install|.
>  0:00.18 /Users/sebastian/Projects/Mozilla/fx-team/mach artifact install
> Error running mach:
> 
>     ['artifact', 'install']
> 
> The error occurred in code that was called by the mach command. This is either
> a bug in the called code itself or in the way that mach is calling it.
> 
> You should consider filing a bug for this issue.
> 
> If filing a bug, please include the full output of mach, including this error
> message.
> 
> The details of the failure are as follows:
> 
> Exception: Can't find config.status
> 
>   File "/Users/sebastian/Projects/Mozilla/fx-team/python/mozbuild/mozbuild/mach_commands.py", line 1551, in artifact_install
>     artifacts = self._make_artifacts(tree=tree, job=job, skip_cache=skip_cache)
>   File "/Users/sebastian/Projects/Mozilla/fx-team/python/mozbuild/mozbuild/mach_commands.py", line 1535, in _make_artifacts
>     from mozbuild.artifacts import Artifacts
>   File "/Users/sebastian/Projects/Mozilla/fx-team/build/mach_bootstrap.py", line 442, in __call__
>     module = self._original_import(name, globals, locals, fromlist, level)
>   File "/Users/sebastian/Projects/Mozilla/fx-team/python/mozbuild/mozbuild/artifacts.py", line 66, in <module>
>     import buildconfig
>   File "/Users/sebastian/Projects/Mozilla/fx-team/build/mach_bootstrap.py", line 442, in __call__
>     module = self._original_import(name, globals, locals, fromlist, level)
>   File "/Users/sebastian/Projects/Mozilla/fx-team/build/buildconfig.py", line 13, in <module>
>     raise Exception("Can't find config.status")
> Error running mach:
> 
>     ['build']
> 
> The error occurred in code that was called by the mach command. This is either
> a bug in the called code itself or in the way that mach is calling it.
> 
> You should consider filing a bug for this issue.
> 
> If filing a bug, please include the full output of mach, including this error
> message.
> 
> The details of the failure are as follows:
> 
> Exception: Process executed with non-0 exit code 1: [u'/Users/sebastian/Projects/Mozilla/fx-team/mach', u'artifact', u'install']
> 
>   File "/Users/sebastian/Projects/Mozilla/fx-team/python/mozbuild/mozbuild/mach_commands.py", line 421, in build
>     self._run_mach_artifact_install()
>   File "/Users/sebastian/Projects/Mozilla/fx-team/python/mozbuild/mozbuild/mach_commands.py", line 694, in _run_mach_artifact_install
>     pass_thru=True, ensure_exit_code=True)
>   File "/Users/sebastian/Projects/Mozilla/fx-team/python/mozbuild/mozbuild/base.py", line 650, in _run_command_in_srcdir
>     return self.run_process(cwd=self.topsrcdir, **args)
>   File "/Users/sebastian/Projects/Mozilla/fx-team/python/mach/mach/mixin/process.py", line 147, in run_process
>     raise Exception('Process executed with non-0 exit code %d: %s' % (status, args))
Assignee

Comment 1

3 years ago
There are two issues here:
- the fact that the artifacts mach command uses the buildconfig module (and that is dealt with in bug 1277841)
- the fact that buildconfig fails to be imported in that case (this bug)

As per discussion on irc, the way forward here is to phase out the buildconfig module, which was created before mach was a thing. The first step is to make buildconfig use the same thing mach uses to find config.status and get its data.
Assignee

Comment 2

3 years ago
The buildconfig module predates MozbuildObject.from_environment, and
it's about time to start factoring things out such that we only have
one way to get config.status data. This is step 1: making the
buildconfig module use MozbuildObject.from_environment.

Eventually, we'll want to remove the buildconfig module uses everywhere.

Review commit: https://reviewboard.mozilla.org/r/58082/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58082/
Attachment #8760506 - Flags: review?(gps)
Assignee

Comment 3

3 years ago
Comment on attachment 8760506 [details]
Bug 1278415 - Also write a mozinfo for js standalone builds.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58082/diff/1-2/
Assignee

Comment 4

3 years ago
Comment on attachment 8760506 [details]
Bug 1278415 - Also write a mozinfo for js standalone builds.

... and that breaks buildbot-driven standalone JS builds somehow...
Attachment #8760506 - Flags: review?(gps)
Assignee

Comment 5

3 years ago
(In reply to Mike Hommey [:glandium] from comment #4)
> Comment on attachment 8760506 [details]
> Bug 1278415 - Make the buildconfig module use
> MozbuildObject.from_environment.
> 
> ... and that breaks buildbot-driven standalone JS builds somehow...

... and that's because of the long-standing issue that mozbuild entirely ignores that we're in an objdir and still uses its default objdir, which is different.
Assignee

Comment 6

3 years ago
This is frustrating... The easy way out for the objdir problem is to generate a mozinfo for js standalone builds.... but that causes even more problems, where we have build jobs that set a MOZ_OBJDIR for a firefox build and do a separate js standalone build in a different directory, that we then identify as not matching MOZ_OBJDIR...
Assignee

Comment 7

3 years ago
Fun problems are fun. I have two different patch approaches that work... except they both break OSX universal builds.
Assignee

Comment 8

3 years ago
The topobjdir-finding logic in mozbuild relies on MOZ_CURRENT_PROJECT
being set, and it's currently only set when going through client.mk.

On automation, during universal builds, make check is invoked directly
in one of the objdirs, so MOZ_CURRENT_PROJECT is not set. We've had
other similar problems in the past. Ensuring MOZ_CURRENT_PROJECT is set
in the objdir itself should reduce the risk of other such issues in the
future.

Review commit: https://reviewboard.mozilla.org/r/58654/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58654/
Attachment #8760506 - Attachment description: Bug 1278415 - Make the buildconfig module use MozbuildObject.from_environment. → Bug 1278415 - Also write a mozinfo for js standalone builds.
Attachment #8761533 - Flags: review?(gps)
Attachment #8761534 - Flags: review?(gps)
Attachment #8760506 - Flags: review?(gps)
Assignee

Comment 9

3 years ago
The buildconfig module predates MozbuildObject.from_environment, and
it's about time to start factoring things out such that we only have
one way to get config.status data. This is step 1: making the
buildconfig module use MozbuildObject.from_environment.

Eventually, we'll want to remove the buildconfig module uses everywhere.

Review commit: https://reviewboard.mozilla.org/r/58656/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58656/
Assignee

Comment 10

3 years ago
Comment on attachment 8760506 [details]
Bug 1278415 - Also write a mozinfo for js standalone builds.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58082/diff/2-3/
Comment on attachment 8760506 [details]
Bug 1278415 - Also write a mozinfo for js standalone builds.

https://reviewboard.mozilla.org/r/58082/#review56360
Attachment #8760506 - Flags: review?(gps) → review+
Attachment #8761533 - Flags: review?(gps) → review+
Comment on attachment 8761533 [details]
Bug 1278415 - Ensure MOZ_CURRENT_PROJECT is set when running make directly in objdir.

https://reviewboard.mozilla.org/r/58654/#review56366
Comment on attachment 8761534 [details]
Bug 1278415 - Make the buildconfig module use MozbuildObject.from_environment.

https://reviewboard.mozilla.org/r/58656/#review56434
Attachment #8761534 - Flags: review?(gps) → review+

Comment 14

3 years ago
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/08093ab05dd4
Also write a mozinfo for js standalone builds. r=gps
https://hg.mozilla.org/integration/mozilla-inbound/rev/ba333bc43814
Ensure MOZ_CURRENT_PROJECT is set when running make directly in objdir. r=gps
https://hg.mozilla.org/integration/mozilla-inbound/rev/a2e4369f86dc
Make the buildconfig module use MozbuildObject.from_environment. r=gps

Comment 17

3 years ago
https://hg.mozilla.org/comm-central/rev/3706aefd2bdc7748a40822de36fff19d82cfb4cb
Port Bug 1278415 - Ensure MOZ_CURRENT_PROJECT is set when running make directly in objdir for c-c. rs=bustage-fix
I think this patch outdated the MDN document:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation

Since now user (I'm using MacOSX) will encounter configure error like:

> mozbuild.base.ObjdirMismatchException: Objdir mismatch: /mozilla-central/js/src/build_DBG != /mozilla-central/obj-ff-dbg

if the commit is not reverted or no special flag added as the current MDN page states. Maybe some comments about this patch should be updated on MDN as well?
Flags: needinfo?(mh+mozilla)
Depends on: 1283052
Assignee

Comment 19

3 years ago
See bug  1283052 and its dupe.
Flags: needinfo?(mh+mozilla)
Assignee

Updated

3 years ago
Depends on: 1282256

Updated

7 months ago
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.