Closed Bug 1733258 Opened 5 years ago Closed 4 years ago

websocketprocessbridge does not seem to launch properly on android testers

Categories

(Core :: WebRTC: Networking, defect, P2)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: bwc, Unassigned)

References

Details

See https://treeherder.mozilla.org/jobs?repo=try&revision=6d14c0efd3be42c9f52211dd57542d0a8cfebdc3

Note that we see the following, indicating that we have successfully started the process for the websocketprocessbridge:

[task 2021-09-29T16:30:11.127Z] 16:30:11 INFO - runtests.py | websocket/process bridge pid: 2795

But then, we see the following lines right after one another, much later on, when the tests have finished:

[task 2021-09-29T16:35:49.893Z] 16:35:49 INFO - websocket/process bridge listening on port 8191
[task 2021-09-29T16:35:50.055Z] 16:35:50 INFO - Stopping websocket/process bridge

This seems to imply that we are not reaching this logging until the kill signal is sent:

https://searchfox.org/mozilla-central/rev/b022ae1fc071ad7a29f64f281bc19b7b093df538/testing/tools/websocketprocessbridge/websocketprocessbridge.py#124

I think that means we're hanging somewhere in __main__.

https://treeherder.mozilla.org/jobs?repo=try&revision=0b5e5e52a59eb56a0c9a5cc1d1c99ded87a6677a&selectedTaskRun=JUYKpeg-QmqwuZKMlcOAJA.0

Looks like the harness just batches up the output and dumps it all when killing the process. It appears that the bridge is being launched successfully after all. Maybe the port isn't actually reachable for some reason, or maybe websockets are busted still (see bug 1266217).

See Also: → 1266217

Ok, maybe not. Seems like --env does not work for android mochitest or something? Any ideas here?

Flags: needinfo?(ahal)

I'm a doofus, and nsWebWocket is not a thing.

Flags: needinfo?(ahal)

Ok, even without the typo I'm not seeing nsWebSocket logging. Maybe we're hitting some other error earlier? Here's a push with logging that should definitely show up, if MOZ_LOG is in fact working:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=89719c79d33347d6e941e879164eb66622a3a496

Yeah, MOZ_LOG is definitely not working on android.

Any ideas on why this is? Is MOZ_LOG getting stomped somewhere?

Flags: needinfo?(jmaher)

possibly :gbrown knows the answer?

Flags: needinfo?(jmaher) → needinfo?(gbrown)

In comment 7, MOZ_LOG is set in the host environment, but not the device environment. You can see it is not in the environment passed to the test runner app:

[task 2021-09-30T22:32:04.832Z] 22:32:04     INFO -  adb launch_application: am start -W -n org.mozilla.geckoview.test/org.mozilla.geckoview.test.TestRunnerActivity -a android.intent.action.MAIN --es env0 MOZ_CRASHREPORTER_NO_REPORT=1 --es env1 MOZ_CRASHREPORTER=1 --es env2 MOZ_CRASHREPORTER_SHUTDOWN=1 --es env3 MOZ_DISABLE_NONLOCAL_CONNECTIONS=1 --es env4 MOZ_IN_AUTOMATION=1 --es env5 R_LOG_LEVEL=6 --es env6 R_LOG_DESTINATION=stderr --es env7 R_LOG_VERBOSE=1 --es env8 XPCOM_DEBUG_BREAK=stack --es env9 MOZ_WEBRENDER=1 --es env10 MOZ_ACCELERATED=1 --es env11 MOZ_UPLOAD_DIR=/data/local/tmp/test_root/mozlog --es env12 MOZ_HIDE_RESULTS_TABLE=1 --es arg0 -no-remote --es arg1 -profile --es arg2 /data/local/tmp/test_root/profile/ --ez use_multiprocess True -d 'http://mochi.test:8888/tests/dom/media/webrtc/tests/mochitests?autorun=1&closeWhenDone=1&logFile=%2Fdata%2Flocal%2Ftmp%2Ftest_root%2Flogs%2Fmochitest.log&fileLevel=INFO&consoleLevel=INFO&hideResultsTable=1&manifestFile=tests.json&dumpOutputDirectory=%2Fdata%2Flocal%2Ftmp%2Ftest_root'

To set MOZ_LOG on device, use something like

https://searchfox.org/mozilla-central/rev/eecd2dd4ba630bea4ce103623a4bfb398065b64b/testing/mochitest/runtests.py#116

or set it more directly in

https://searchfox.org/mozilla-central/rev/eecd2dd4ba630bea4ce103623a4bfb398065b64b/testing/mochitest/runtestsremote.py#307

Flags: needinfo?(gbrown)

So I tried both places in comment 10, but no change.

Flags: needinfo?(gbrown)

I see nsWebSocket logging in both comment 11 and 12: On treeherder, select your M(mda) task, select the Artifacts tab, and open mozLogs.zip. afaik, that's the only place we can display MOZ_LOGS on android (not the main test log, unfortunately).

Flags: needinfo?(gbrown)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.