Closed Bug 1744713 Opened 4 years ago Closed 4 years ago

Permanent perftest http3 ModuleNotFoundError: No module named 'runxpcshelltests'

Categories

(Testing :: mozperftest, defect, P5)

defect

Tracking

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

RESOLVED FIXED
97 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox95 --- unaffected
firefox96 --- fixed
firefox97 --- fixed

People

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

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(2 files)

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


[task 2021-12-07T05:27:34.541Z] executing ['bash', '-cx', 'mkdir -p $MOZ_FETCHES_DIR/../artifacts && cd $MOZ_FETCHES_DIR && python3.8 python/mozperftest/mozperftest/runner.py xpcshell/tests/netwerk/test/unit/test_http3_perf.js --flavor xpcshell --perfherder --perfherder-metrics name:speed,unit:bps --output $MOZ_FETCHES_DIR/../artifacts --xpcshell-binary ${MOZ_FETCHES_DIR}/bin/xpcshell --xpcshell-mozinfo ${MOZ_FETCHES_DIR}/target.mozinfo.json --xpcshell-nodejs ${MOZ_FETCHES_DIR}/node/bin/node --xpcshell-cycles 13 --xpcshell-xre-path ${MOZ_FETCHES_DIR}/firefox']
[task 2021-12-07T05:27:34.542Z] + mkdir -p /home/cltbld/tasks/task_163885484330226/fetches/../artifacts
[task 2021-12-07T05:27:34.543Z] + cd /home/cltbld/tasks/task_163885484330226/fetches
[task 2021-12-07T05:27:34.543Z] + python3.8 python/mozperftest/mozperftest/runner.py xpcshell/tests/netwerk/test/unit/test_http3_perf.js --flavor xpcshell --perfherder --perfherder-metrics name:speed,unit:bps --output /home/cltbld/tasks/task_163885484330226/fetches/../artifacts --xpcshell-binary /home/cltbld/tasks/task_163885484330226/fetches/bin/xpcshell --xpcshell-mozinfo /home/cltbld/tasks/task_163885484330226/fetches/target.mozinfo.json --xpcshell-nodejs /home/cltbld/tasks/task_163885484330226/fetches/node/bin/node --xpcshell-cycles 13 --xpcshell-xre-path /home/cltbld/tasks/task_163885484330226/fetches/firefox
[task 2021-12-07T05:27:36.003Z] created virtual environment CPython3.8.8.final.0-64 in 30ms
[task 2021-12-07T05:27:36.003Z]   creator CPython3Posix(dest=/home/cltbld/tasks/task_163885484330226/fetches/_virtualenvs/common, clear=False, no_vcs_ignore=False, global=False)
[task 2021-12-07T05:27:36.003Z]   activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator
[task 2021-12-07T05:27:36.055Z]  0:00.77 Created profile at /tmp/tmpzo6_3v2p.mozrunner
[task 2021-12-07T05:27:36.056Z] Traceback (most recent call last):
[task 2021-12-07T05:27:36.056Z]   File "python/mozperftest/mozperftest/runner.py", line 209, in <module>
[task 2021-12-07T05:27:36.056Z]     sys.exit(main())
[task 2021-12-07T05:27:36.056Z]   File "python/mozperftest/mozperftest/runner.py", line 205, in main
[task 2021-12-07T05:27:36.056Z]     run_tests(mach_cmd, args, user_args)
[task 2021-12-07T05:27:36.056Z]   File "python/mozperftest/mozperftest/runner.py", line 152, in run_tests
[task 2021-12-07T05:27:36.056Z]     e.run(metadata)
[task 2021-12-07T05:27:36.056Z]   File "/home/cltbld/tasks/task_163885484330226/fetches/python/mozperftest/mozperftest/environment.py", line 93, in run
[task 2021-12-07T05:27:36.056Z]     metadata = testlayer(syslayer(metadata))
[task 2021-12-07T05:27:36.056Z]   File "/home/cltbld/tasks/task_163885484330226/fetches/python/mozperftest/mozperftest/layers.py", line 156, in __call__
[task 2021-12-07T05:27:36.056Z]     metadata = layer(metadata)
[task 2021-12-07T05:27:36.056Z]   File "/home/cltbld/tasks/task_163885484330226/fetches/python/mozperftest/mozperftest/layers.py", line 68, in __call__
[task 2021-12-07T05:27:36.056Z]     metadata = self.run(metadata)
[task 2021-12-07T05:27:36.056Z]   File "/home/cltbld/tasks/task_163885484330226/fetches/python/mozperftest/mozperftest/test/xpcshell.py", line 92, in run
[task 2021-12-07T05:27:36.056Z]     import runxpcshelltests
[task 2021-12-07T05:27:36.056Z] ModuleNotFoundError: No module named 'runxpcshelltests'

I originally thought that the result of all_site_packages_dirs() would
be reused while building the new sys.path list, but some local
debugging on Windows was affected by brutally slow start-times - which
was caused by these lines.

Looking back, it makes sense now: Python doesn't know that the value can
be reused, so it's recalculating the entire
predicate (path not in $dirs_fn()) every time.

Though most of the old paths that used to be defined in
mozperftest/runner.py exist in common_virtualenv_packages.txt,
"xpcshell" was not because it's put in a different location depending on
whether the source directory is sourced from the "target.xpcshell.tests"
artifact or from VCS directly.

As part of this change, I've verified that all of the other
path changes in D132503 are fulfilled by the "mach" site.

Depends on D133214

Attachment #9254339 - Attachment description: WIP: Bug 1744713: Don't resolve external site-packages dirs multiple times → Bug 1744713: Don't resolve external site-packages dirs multiple times
Attachment #9254340 - Attachment description: WIP: Bug 1744713: Manually add "xpcshell" to the sys.path for perftests → Bug 1744713: Manually add "xpcshell" to the sys.path for perftests
Assignee: nobody → mhentges
Status: NEW → ASSIGNED

Patches deployed 😎

Flags: needinfo?(mhentges)
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/82d49f10e2b4 Don't resolve external site-packages dirs multiple times r=ahal https://hg.mozilla.org/integration/autoland/rev/dad925fc1c6e Manually add "xpcshell" to the sys.path for perftests r=sparky
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch

The patch landed in nightly and beta is affected.
:mhentges, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(mhentges)

Comment on attachment 9254340 [details]
Bug 1744713: Manually add "xpcshell" to the sys.path for perftests

Beta/Release Uplift Approval Request

  • User impact if declined: None
  • Is this code covered by automated tests?: Yes
  • 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): Regressions will only affect performance tests, which are already broken and this patch intends to fix.
  • String changes made/needed:
Flags: needinfo?(mhentges)
Attachment #9254340 - Flags: approval-mozilla-beta?

Comment on attachment 9254340 [details]
Bug 1744713: Manually add "xpcshell" to the sys.path for perftests

Approved for 96.0b8

Attachment #9254340 - 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: