Closed Bug 1716860 Opened 3 years ago Closed 3 years ago

Intermittent [tier2] TV File "/opt/worker/tasks/task_162386645497752/build/venv/bin/mozinstall", line 8, in <module> | AttributeError: 'module' object has no attribute 'load'

Categories

(Firefox Build System :: Task Configuration, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell fixed:backout])

Filed by: abutkovits [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=342990356&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/JEXcXOu4Tz-mYZZBcwGsnQ/runs/0/artifacts/public/logs/live_backing.log
Reftest URL: https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/JEXcXOu4Tz-mYZZBcwGsnQ/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1


[task 2021-06-16T18:50:03.094Z] 18:50:03     INFO - Reading from file tmpfile_stdout
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO - Output received:
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO -  Usage: mozinstall [options] installer
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO -  Options:
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO -    -h, --help            show this help message and exit
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO -    -d DEST, --destination=DEST
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO -                          Directory to install application into. [default:
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO -                          "/opt/worker/tasks/task_162386645497752"]
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO -    --app=APP             Application being installed. [default: firefox]
[task 2021-06-16T18:50:03.095Z] 18:50:03     INFO - mkdir: /opt/worker/tasks/task_162386645497752/build/application
[task 2021-06-16T18:50:03.096Z] 18:50:03     INFO - Getting output from command: ['/opt/worker/tasks/task_162386645497752/build/venv/bin/mozinstall', '/opt/worker/tasks/task_162386645497752/installer.dmg', '--destination', '/opt/worker/tasks/task_162386645497752/build/application']
[task 2021-06-16T18:50:03.096Z] 18:50:03     INFO - Copy/paste: /opt/worker/tasks/task_162386645497752/build/venv/bin/mozinstall /opt/worker/tasks/task_162386645497752/installer.dmg --destination /opt/worker/tasks/task_162386645497752/build/application
[task 2021-06-16T18:50:23.221Z] 18:50:23    ERROR - Errors received:
[task 2021-06-16T18:50:23.221Z] 18:50:23     INFO - Reading from file tmpfile_stderr
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -  Traceback (most recent call last):
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -    File "/opt/worker/tasks/task_162386645497752/build/venv/bin/mozinstall", line 8, in <module>
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -      sys.exit(install_cli())
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -    File "/opt/worker/tasks/task_162386645497752/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 379, in install_cli
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -      binary = get_binary(install_path, app_name=options.app)
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -    File "/opt/worker/tasks/task_162386645497752/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 80, in get_binary
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -      path, "Contents/MacOS/", _readPlist(plist)["CFBundleExecutable"]
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -    File "/opt/worker/tasks/task_162386645497752/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 61, in _readPlist
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -      return plistlib.load(fp)
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR -  AttributeError: 'module' object has no attribute 'load'
[task 2021-06-16T18:50:23.222Z] 18:50:23    ERROR - Return code: 1
[task 2021-06-16T18:50:23.222Z] 18:50:23  WARNING - setting return code to 3
[task 2021-06-16T18:50:23.223Z] 18:50:23    FATAL - Halting on failure while running ['/opt/worker/tasks/task_162386645497752/build/venv/bin/mozinstall', '/opt/worker/tasks/task_162386645497752/installer.dmg', '--destination', '/opt/worker/tasks/task_162386645497752/build/application']
[task 2021-06-16T18:50:23.223Z] 18:50:23    FATAL - Running post_fatal callback...
[task 2021-06-16T18:50:23.223Z] 18:50:23    FATAL - Exiting 3
[task 2021-06-16T18:50:23.223Z] 18:50:23     INFO - Running post-action listener: _resource_record_post_action
[task 2021-06-16T18:50:23.223Z] 18:50:23     INFO - [mozharness: 2021-06-16 18:50:23.223296Z] Finished install step (failed)
[task 2021-06-16T18:50:23.223Z] 18:50:23     INFO - Running post-run listener: _resource_record_post_run
[task 2021-06-16T18:50:23.328Z] 18:50:23     INFO - instance_metadata.json not found; unable to determine instance type

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Task Configuration' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Task Configuration
Product: Firefox → Firefox Build System

Hi, Eitan. This showed up when bug 1691813 landed and it fails only on TV so far. Please take a look when you have time.
Thanks!

Flags: needinfo?(eitan)
Regressed by: 1691813
Whiteboard: [stockwell needswork:owner]
[task 2021-06-16T19:00:04.494Z] 19:00:04    ERROR - Errors received:
[task 2021-06-16T19:00:04.494Z] 19:00:04     INFO - Reading from file tmpfile_stderr
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -  Traceback (most recent call last):
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/bin/mozinstall", line 8, in <module>
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      sys.exit(install_cli())
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 379, in install_cli
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      binary = get_binary(install_path, app_name=options.app)
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 80, in get_binary
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      path, "Contents/MacOS/", _readPlist(plist)["CFBundleExecutable"]
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 61, in _readPlist
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      return plistlib.load(fp)
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -  AttributeError: 'module' object has no attribute 'load'
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR - Return code: 1

Mitchell, AttributeError: 'module' object has no attribute 'load' seems to be an error within testing/mozbase/mozinstall/mozinstall/mozinstall.py so we might have Bug 1714688 as the root cause?

Could you or Surajeet take a look at this?

Thank you.

Flags: needinfo?(surajeet310)
Flags: needinfo?(mhentges)

(In reply to Natalia Csoregi [:nataliaCs] from comment #4)

[task 2021-06-16T19:00:04.494Z] 19:00:04    ERROR - Errors received:
[task 2021-06-16T19:00:04.494Z] 19:00:04     INFO - Reading from file tmpfile_stderr
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -  Traceback (most recent call last):
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/bin/mozinstall", line 8, in <module>
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      sys.exit(install_cli())
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 379, in install_cli
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      binary = get_binary(install_path, app_name=options.app)
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 80, in get_binary
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      path, "Contents/MacOS/", _readPlist(plist)["CFBundleExecutable"]
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -    File "/opt/worker/tasks/task_162386618319829/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 61, in _readPlist
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -      return plistlib.load(fp)
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR -  AttributeError: 'module' object has no attribute 'load'
[task 2021-06-16T19:00:04.495Z] 19:00:04    ERROR - Return code: 1

Mitchell, AttributeError: 'module' object has no attribute 'load' seems to be an error within testing/mozbase/mozinstall/mozinstall/mozinstall.py so we might have Bug 1714688 as the root cause?

Could you or Surajeet take a look at this?

Thank you.

Python2 is being used I suppose, which is causing this.

The patch regarding removing the Python2 support for mozinstall.py might be causing this issue, i am not sure. Revoking this might be one thing to do .

Flags: needinfo?(surajeet310)
[taskcluster 2021-06-16T18:48:00.140Z] Executing command 1: /usr/local/bin/python3 run-task -- /usr/local/bin/python2 -u 'mozharness/scripts/desktop_unittest.py' --cfg 'mozharness/configs/unittests/mac_unittest.py' --verify '--setpref=media.peerconnection.mtransport_process=false' '--setpref=network.process.enabled=false' --enable-webrender '--setpref=layers.d3d11.enable-blacklist=false' --download-symbols ondemand

These tasks are still running python2.

They are covered by bug 1714406.

Flags: needinfo?(eitan)
No longer regressed by: 1691813
Summary: Intermittent [tier2] TV File "/opt/worker/tasks/task_162386645497752/build/venv/bin/mozinstall", line 8, in <module> → Intermittent [tier2] TV File "/opt/worker/tasks/task_162386645497752/build/venv/bin/mozinstall", line 8, in <module> | AttributeError: 'module' object has no attribute 'load'

Yeah, this is caused by 74fd8bb17de0.
Let's back it out until these tasks are running with Python 3.
(This was my mistake, didn't see that mozinstall.py was used in a Python 2 task.)
Thanks!

Flags: needinfo?(mhentges)

(NI-ing Natalia, but if there's a specific individual I should be NI-ing about this backout please redirect 😄)

Flags: needinfo?(ncsoregi)

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #10)

(NI-ing Natalia, but if there's a specific individual I should be NI-ing about this backout please redirect 😄)

Backed out changeset 74fd8bb17de0 (bug 1714688) for causing Bug 1716860.

backout: https://hg.mozilla.org/integration/autoland/rev/5bb44754f8119fefe1206bd0bf5e614b6452288d

Flags: needinfo?(ncsoregi)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Whiteboard: [stockwell needswork:owner] → [stockwell fixed:backout]
See Also: → 1714406
You need to log in before you can comment on or make changes to this bug.