Closed Bug 1730253 Opened 4 years ago Closed 4 years ago

Run `./mach build` with lower process priority by default

Categories

(Firefox Build System :: General, enhancement)

enhancement

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(1 file)

It would be nice to keep machines snappy and responsive when they're otherwise all-core-saturated during builds.

Keys are idle/less/normal/more/high, like the named categories on
Windows.

Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eed95dc1e702 Add `./mach build --priority(=less)`. r=firefox-build-system-reviewers,mhentges
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

Despite having just pulled central and running a successful bootstrap, I'm getting failures when I try to run any mach gtest after this change:

$ MOZCONFIG=~/mozconfig-rel-opt ./mach gtest --list-tests
Error running mach:

    ['gtest', '--list-tests']

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 can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file gtest| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

KeyError: "priority '' not in ['idle', 'less', 'normal', 'more', 'high']"

  File "/Users/jbauman/src/mozilla-unified/python/mozbuild/mozbuild/mach_commands.py", line 678, in gtest
    res = command_context._mach_context.commands.dispatch(
  File "/Users/jbauman/src/mozilla-unified/python/mach/mach/registrar.py", line 161, in dispatch
    return self._run_command_handler(handler, context, **kwargs)
  File "/Users/jbauman/src/mozilla-unified/python/mach/mach/registrar.py", line 107, in _run_command_handler
    result = fn(instance, **kwargs)
  File "/Users/jbauman/src/mozilla-unified/python/mozbuild/mozbuild/build_commands.py", line 169, in build
    if not _set_priority(priority, verbose):
  File "/Users/jbauman/src/mozilla-unified/python/mozbuild/mozbuild/build_commands.py", line 39, in _set_priority
    raise KeyError(f"priority '{priority}' not in {list(PRIO_CLASS_BY_KEY)}")

Sentry event ID: f6874d2ef61c4dae933952d43a5187f8
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
Regressions: 1730778
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: