Closed Bug 1743578 Opened 2 years ago Closed 2 years ago

Permanent perftest AssertionError: A Mach-managed site must be active before doing work with command sites

Categories

(Testing :: mozperftest, defect, P5)

defect

Tracking

(firefox-esr91 unaffected, firefox94 unaffected, firefox95 unaffected, firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox94 --- unaffected
firefox95 --- unaffected
firefox96 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: mhentges)

References

(Regression)

Details

(Keywords: assertion, intermittent-failure, regression)

Attachments

(1 file)

Filed by: archaeopteryx [at] coole-files.de
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=359659999&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/AOTL3EQCSNS6YGWtNj5YlA/runs/0/artifacts/public/logs/live_backing.log


[task 2021-11-30T04:27:51.894Z] script.py: running command 'bash -cx mkdir -p $MOZ_FETCHES_DIR/../artifacts && cd $GECKO_PATH && python3 python/mozperftest/mozperftest/runner.py --flavor mobile-browser --android --android-app-name org.mozilla.fenix --perfherder-metrics name:processLaunchToNavStart,shouldAlert:True --android-install-apk fenix_nightly_arm64_v8a --android-activity org.mozilla.fenix.IntentReceiverActivity --android-clear-logcat --android-capture-logcat logcat --android-perf-tuning --hooks testing/performance/hooks_android_view.py --perfherder --perfherder-app fenix --browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver --browsertime-iterations 25 --output $MOZ_FETCHES_DIR/../artifacts testing/performance/perftest_android_view.js --test-date 2021.11.29'
[task 2021-11-30T04:27:51.894Z] + mkdir -p /builds/task_163824619799518/fetches/../artifacts
[task 2021-11-30T04:27:51.894Z] + cd /builds/task_163824619799518/checkouts/gecko
[task 2021-11-30T04:27:51.894Z] + python3 python/mozperftest/mozperftest/runner.py --flavor mobile-browser --android --android-app-name org.mozilla.fenix --perfherder-metrics name:processLaunchToNavStart,shouldAlert:True --android-install-apk fenix_nightly_arm64_v8a --android-activity org.mozilla.fenix.IntentReceiverActivity --android-clear-logcat --android-capture-logcat logcat --android-perf-tuning --hooks testing/performance/hooks_android_view.py --perfherder --perfherder-app fenix --browsertime-geckodriver /builds/task_163824619799518/fetches/geckodriver --browsertime-iterations 25 --output /builds/task_163824619799518/fetches/../artifacts testing/performance/perftest_android_view.js --test-date 2021.11.29
[task 2021-11-30T04:27:51.894Z] Traceback (most recent call last):
[task 2021-11-30T04:27:51.894Z]   File "python/mozperftest/mozperftest/runner.py", line 227, in <module>
[task 2021-11-30T04:27:51.894Z]     sys.exit(main())
[task 2021-11-30T04:27:51.894Z]   File "python/mozperftest/mozperftest/runner.py", line 223, in main
[task 2021-11-30T04:27:51.894Z]     run_tests(mach_cmd, args, user_args)
[task 2021-11-30T04:27:51.894Z]   File "python/mozperftest/mozperftest/runner.py", line 138, in run_tests
[task 2021-11-30T04:27:51.894Z]     mach_cmd.activate_virtualenv()
[task 2021-11-30T04:27:51.894Z]   File "/builds/task_163824619799518/checkouts/gecko/python/mozbuild/mozbuild/base.py", line 876, in activate_virtualenv
[task 2021-11-30T04:27:51.894Z]     self.virtualenv_manager.activate()
[task 2021-11-30T04:27:51.894Z]   File "/builds/task_163824619799518/checkouts/gecko/python/mozbuild/mozbuild/base.py", line 300, in virtualenv_manager
[task 2021-11-30T04:27:51.894Z]     os.path.join(self.topobjdir, "_virtualenvs"),
[task 2021-11-30T04:27:51.894Z]   File "/builds/task_163824619799518/checkouts/gecko/python/mach/mach/site.py", line 450, in from_environment
[task 2021-11-30T04:27:51.894Z]     ), "A Mach-managed site must be active before doing work with command sites"
[task 2021-11-30T04:27:51.894Z] AssertionError: A Mach-managed site must be active before doing work with command sites
Summary: Permanent Android perftest AssertionError: A Mach-managed site must be active before doing work with command sites → Permanent perftest AssertionError: A Mach-managed site must be active before doing work with command sites

:mhentges, can you look into this please?

Flags: needinfo?(gmierz2) → needinfo?(mhentges)

When activating a command virtualenv, it rightfully complains if it
isn't already running within an active Mach site - the abstraction has
restrictions to act as guardrails around the risky business that is
sys.path patching.

Replace mozperftest/runner.py's ad-hoc sys.path initializing with
MachSiteManager's activate() instead.

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Flags: needinfo?(mhentges)
Attachment #9253081 - Attachment description: WIP: Bug 1743578: Activate Mach site in mozperftest/runner.py → Bug 1743578: Activate Mach site in mozperftest/runner.py
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19346211a50e
Activate Mach site in mozperftest/runner.py r=sparky
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Regressions: 1744713
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: