Closed Bug 1492632 Opened 1 year ago Closed 1 year ago

Intermittent Test Verify ImportError: No module named twisted.internet

Categories

(Firefox for Android :: Testing, defect, P5)

defect

Tracking

()

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

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

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

Filed by: btara [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=200284239&repo=mozilla-central

https://queue.taskcluster.net/v1/task/OsbcJ2bVRqeZW9VVh1oKMQ/runs/0/artifacts/public/logs/live_backing.log

[task 2018-09-19T22:32:31.503Z] 22:32:31     INFO -  SUITE-START | Running 1 tests
[task 2018-09-19T22:32:31.504Z] 22:32:31     INFO -  Running manifest: dom/media/tests/mochitest/mochitest.ini
[task 2018-09-19T22:32:33.328Z] 22:32:33     INFO -  adb Ignoring attempt to chmod external storage
[task 2018-09-19T22:32:33.696Z] 22:32:33     INFO -  pk12util: PKCS12 IMPORT SUCCESSFUL
[task 2018-09-19T22:32:33.744Z] 22:32:33     INFO -  MochitestServer : launching [u'/builds/worker/workspace/build/hostutils/host-utils-61.0a1.en-US.linux-x86_64/xpcshell', '-g', '/builds/worker/workspace/build/hostutils/host-utils-61.0a1.en-US.linux-x86_64', '-f', '/builds/worker/workspace/build/hostutils/host-utils-61.0a1.en-US.linux-x86_64/components/httpd.js', '-e', "const _PROFILE_PATH = '/tmp/tmp4r_hzj.mozrunner'; const _SERVER_PORT = '8854'; const _SERVER_ADDR = '10.0.2.2'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = false;", '-f', '/builds/worker/workspace/build/tests/mochitest/server.js']
[task 2018-09-19T22:32:33.744Z] 22:32:33     INFO -  runtests.py | Server pid: 1004
[task 2018-09-19T22:32:33.749Z] 22:32:33     INFO -  runtests.py | Websocket server pid: 1007
[task 2018-09-19T22:32:33.762Z] 22:32:33     INFO -  runtests.py | websocket/process bridge pid: 1010
[task 2018-09-19T22:32:33.779Z] 22:32:33     INFO -  Traceback (most recent call last):
[task 2018-09-19T22:32:33.779Z] 22:32:33     INFO -    File "websocketprocessbridge/websocketprocessbridge.py", line 6, in <module>
[task 2018-09-19T22:32:33.780Z] 22:32:33     INFO -      from twisted.internet import protocol, reactor
[task 2018-09-19T22:32:33.781Z] 22:32:33     INFO -  ImportError: No module named twisted.internet
[task 2018-09-19T22:32:33.864Z] 22:32:33     INFO -  0 ERROR runtests.py | websocket/process bridge failed to launch. Are all the dependencies installed?
[task 2018-09-19T22:32:33.870Z] 22:32:33     INFO -  runtests.py | SSL tunnel pid: 1028
[task 2018-09-19T22:32:34.919Z] 22:32:34     INFO -  adb Ignoring attempt to chmod external storage
[task 2018-09-19T22:32:34.919Z] 22:32:34     INFO -  runtests.py | Running with e10s: False
[task 2018-09-19T22:32:34.920Z] 22:32:34     INFO -  runtests.py | Running tests: start.
[task 2018-09-19T22:32:35.334Z] 22:32:35     INFO -  adb launch_application: am start -W -n org.mozilla.fennec_aurora/org.mozilla.gecko.BrowserApp -a android.intent.action.VIEW --es env9 MOZ_CRASHREPORTER_NO_REPORT=1 --es env8 R_LOG_DESTINATION=stderr --es args '-no-remote -profile /sdcard/tests/profile//' --es env3 DISABLE_UNSAFE_CPOW_WARNINGS=1 --es env2 R_LOG_VERBOSE=1 --es env1 XPCOM_DEBUG_BREAK=stack --es env0 MOZ_CRASHREPORTER=1 --es env7 MOZ_LOG_FILE=/sdcard/tests/mozlog/moz.log --es env6 MOZ_CRASHREPORTER_SHUTDOWN=1 --es env5 MOZ_IN_AUTOMATION=1 --es env4 MOZ_DISABLE_NONLOCAL_CONNECTIONS=1 --es env12 MOZ_HIDE_RESULTS_TABLE=1 --es env11 R_LOG_LEVEL=6 --es env10 MOZ_PROCESS_LOG=/tmp/tmpowMigSpidlog -d 'http://mochi.test:8888/tests/dom/media/tests/mochitest?autorun=1&closeWhenDone=1&logFile=%2Fsdcard%2Ftests%2Flogs%2Fmochitest.log&fileLevel=INFO&consoleLevel=INFO&hideResultsTable=1&runUntilFailure=1&repeat=10&testname=tests/dom/media/tests/mochitest/test_peerConnection_simulcastAnswer.html&manifestFile=tests.json&dumpOutputDirectory=%2Fsdcard%2Ftests'
[task 2018-09-19T22:32:48.270Z] 22:32:48     INFO -  INFO | automation.py | Application pid: 815
[task 2018-09-19T22:36:13.108Z] 22:36:13     INFO -  1 INFO SimpleTest START
[task 2018-09-19T22:36:13.109Z] 22:36:13     INFO -  2 INFO TEST-START | dom/media/tests/mochitest/test_peerConnection_simulcastAnswer.html
[task 2018-09-19T22:43:07.696Z] 22:43:07     INFO -  <snipped 206 output lines - if you need more context, please use SimpleTest.requestCompleteLog() in your test>
[task 2018-09-19T22:43:07.697Z] 22:43:07     INFO -  Buffered messages logged at 22:39:17
[task 2018-09-19T22:43:07.697Z] 22:43:07     INFO -  3 INFO pcLocal: iceCandidate = {"candidate":"candidate:0 1 UDP 2122252543 10.0.2.15 52450 typ host","sdpMid":"0","sdpMLineIndex":0}
This may be fall out from bug 1491424 where I changed the signatures of the super __init__ call for CodeCoverageMixin but failed to do so for VerifyToolsMixin. I am testing the hypothesis now.
Blocks: 1491424
After much tribulations of trial and error to reproduce I finally checked if this occurred with bug 1491424 backed out to see if the Mixin work was the cause:

https://treeherder.mozilla.org/#/jobs?repo=try&tier=1,2,3&group_state=expanded&revision=bc7d79c3d5f99e61e2178283d3eb264318b4d7af

It is not. The issue is with mochitest-media where self.test_suite is None instead of 'mochitest-media'.

https://searchfox.org/mozilla-central/source/testing/mozharness/scripts/android_emulator_unittest.py#655

gbrown: Thoughts?
No longer blocks: 1491424
Flags: needinfo?(gbrown)
That's an interesting special case. I'd be happy to sort it out.
Assignee: nobody → gbrown
Flags: needinfo?(gbrown)
See Also: → 1483292
In test-verify (or per-test coverage), multiple test suites can be run; if any one of these is mochitest-media, we need to install the mochitest-media requirements. Theoretically, there's a similar issue for marionette tests, although TV doesn't currently support marionette tests. Theoretically, these issues apply to android_hardware_unittest (but it won't happen currently because we don't run TV there). These issues apply to desktop unittests, but those already account for multiple suites -- no need for changes there.

_query_suites() for a normal mochitest-media task returns [('mochitest-media', 'mochitest-media')]. _query_suites() for TV that includes a mochitest-media test and a crashtest might look like [('crashtest', 'crashtest'), ('mochitest-media', 'mochitest-media')].

https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&revision=30084bad6c636bce90c4ab64d6a9ade30ce0da38
Attachment #9011027 - Flags: review?(bob)
Sorry, I included my test case in the original patch; cleaned up here.
Attachment #9011027 - Attachment is obsolete: true
Attachment #9011027 - Flags: review?(bob)
Attachment #9011028 - Flags: review?(bob)
I'm embarrassed by how much time I spent on this. ;-) Running some of my try runs now, but looks good. Will circle back soon.
Comment on attachment 9011028 [details] [diff] [review]
generalize "suite" definition to allow for per-test cases like TV

Review of attachment 9011028 [details] [diff] [review]:
-----------------------------------------------------------------

Wonderful. My runs haven't completed but they have all installed websocketprocessbridge_requirements.txt. r+. Thanks!
Attachment #9011028 - Flags: review?(bob) → review+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b11a8172db4
Ensure correct installation requirements for Android per-test suites; r=bc
https://hg.mozilla.org/mozilla-central/rev/6b11a8172db4
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in before you can comment on or make changes to this bug.