Android WebTransport CI tests don't seem to have an accessible server
Categories
(Core :: Networking: HTTP, task, P2)
Tracking
()
People
(Reporter: jesup, Unassigned)
References
Details
(Whiteboard: [necko-triaged])
Server isn't started, or the port/etc info needed to access the server isn't getting fed in properly so the test machine can access it.
See bug this blocks for pref-on patches
Updated•3 years ago
|
| Reporter | ||
Comment 1•3 years ago
|
||
Any updates? Pref-on for nightly (including android) is in autoland. Thanks
As discussed with :jesup and :jgraham on Matrix, this is probably an issue with ADB not supporting UDP.
I'll quote :jgraham here:
To set out a bit more of the context:
For wpt we run the actual servers on the host machine. But for the browser this is transparent; in Firefox we configure all the wpt domains (e.g. web-platform.test) as local domians using the network.dns.localDomains pref, so that connections go to the loopback device, just like we do on desktop where everything's on the same (virtual) machine. To make this work, we set up a confusingly named "reverse forward" using a command like adb reverse tcp:8000 tcp:8000 which routes packets from port 8000 in the emulator to port 8000 on the host machine. But that doesn't work for UDP based protocols. There's also an emulator command redir which allows you to set up UDP forwarding from the host to the emulator (adb emu redir udp 11000:1000 for example), but that's the opposite of what we want; it's for the case where you have a UDP server inside the emulator and want to connect to it from the host machine.I assume this is possible somehow, either via ADB or using something in QEMU, but I'm not a networking expert :) I've asked on the web-platform-tests channel in case Google already have this set up and can provide pointers (but the code in the Chrome Android wpt implementation doesn't seem to handle this case, so there's at least nothing obvious to copy there).
:jgraham is currently on PTO, but he did mention that :gbrown should know about the ADB stuff, so I'll add a needinfo for them here.
I will be trying to distance myself from this issue, as it's pretty far outside of my scope and I don't think my time spent is very effective. If you do think there's something I can help with, feel free to ping me. Hopefully :gbrown has some insights that help resolve this.
Comment 3•3 years ago
|
||
It's been a while since I was involved in anything like this, but let's see if I can jog my memory...
My initial recollection is that wpt uses mozrunner which uses mozdevice to communicate by adb with the android device.
mozdevice has port forwarding support, https://searchfox.org/mozilla-central/rev/98397ff4eac3d32b815fbb33bff147297fb972d7/testing/mozbase/mozdevice/mozdevice/adb.py#1754-1925
Do we know what's failing exactly, which ports, etc?
I notice, from a current m-c wpt run:
https://firefoxci.taskcluster-artifacts.net/bs-_U8EiTRqM_9Gqx5tuNg/0/public/logs/live_backing.log
[task 2023-04-04T16:28:17.814Z] 16:28:17 INFO - TEST-FAIL | /infrastructure/server/webtransport-h3.https.sub.any.sharedworker.html | WebTransport server should be running and should handle a bidirectional stream - promise_test: Unhandled rejection with value: object "WebTransportError: WebTransport connection rejected"
[task 2023-04-04T16:28:17.814Z] 16:28:17 INFO - TEST-FAIL | /infrastructure/server/webtransport-h3.https.sub.any.html | WebTransport server should be running and should handle a bidirectional stream - promise_test: Unhandled rejection with value: object "WebTransportError: WebTransport connection rejected"
[task 2023-04-04T16:28:17.814Z] 16:28:17 INFO - TEST-KNOWN-INTERMITTENT-TIMEOUT | /infrastructure/server/webtransport-h3.https.sub.any.serviceworker.html | WebTransport server should be running and should handle a bidirectional stream - Test timed out
Are these good examples of the issue?
Comment 4•3 years ago
|
||
[task 2023-04-04T15:57:16.788Z] 15:57:16 INFO - wptserve Starting http server on http://127.0.0.1:8000
[task 2023-04-04T15:57:17.041Z] 15:57:17 INFO - wptserve Starting http server on http://127.0.0.1:8001
[task 2023-04-04T15:57:17.279Z] 15:57:17 INFO - wptserve Starting http server on http://127.0.0.1:8002
[task 2023-04-04T15:57:17.524Z] 15:57:17 INFO - wptserve Starting http server on http://127.0.0.1:8003
[task 2023-04-04T15:57:17.772Z] 15:57:17 INFO - wptserve Starting https server on https://127.0.0.1:8443
[task 2023-04-04T15:57:18.015Z] 15:57:18 INFO - wptserve Starting https server on https://127.0.0.1:8444
[task 2023-04-04T15:57:18.256Z] 15:57:18 INFO - wptserve Starting https server on https://127.0.0.1:8445
[task 2023-04-04T15:57:18.496Z] 15:57:18 INFO - wptserve Starting https server on https://127.0.0.1:8446
[task 2023-04-04T15:57:18.748Z] 15:57:18 INFO - wptserve Create socket on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
[task 2023-04-04T15:57:18.749Z] 15:57:18 INFO - wptserve Bind on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
[task 2023-04-04T15:57:18.749Z] 15:57:18 INFO - wptserve Listen on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
[task 2023-04-04T15:57:18.990Z] 15:57:18 INFO - wptserve Create socket on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
[task 2023-04-04T15:57:18.991Z] 15:57:18 INFO - wptserve Bind on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
[task 2023-04-04T15:57:18.992Z] 15:57:18 INFO - wptserve Listen on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
[task 2023-04-04T15:57:19.232Z] 15:57:19 INFO - wptserve Starting http2 server on https://127.0.0.1:9000
[task 2023-04-04T15:57:19.516Z] 15:57:19 INFO - wptserve Starting WebTransport over HTTP/3 server on 127.0.0.1:11000
Are we just having trouble with 127.0.0.1:11000?
Comment 5•3 years ago
•
|
||
All the ports, including 11000, are listed at https://searchfox.org/mozilla-central/rev/98397ff4eac3d32b815fbb33bff147297fb972d7/testing/web-platform/tests/tools/wptrunner/wptrunner/environment.py#182-191 . And those should be setup for android via https://searchfox.org/mozilla-central/rev/98397ff4eac3d32b815fbb33bff147297fb972d7/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py#263-267 . That looks right to me (but I don't know anything about WebTransport over HTTP/3).
Note that those port forwards are for tcp only and won't work for udp. Comment 2 suggests we want to extend the port forwarding to udp. I don't know how to do that.
Comment 6•3 years ago
|
||
https://treeherder.mozilla.org/jobs?repo=try&revision=26da085a45666d8f85a9faff5c0bc046c75b8594 is a brute-force addition of "adb emu redir add udp:11000:11000". I agree with the sentiment of comment 2 that this is not expected to help, and indeed, the tests still intermittently timeout.
Comment 7•3 years ago
|
||
Is 10.0.2.2 an option? Recall this is the emulator's alias to your host loopback interface (i.e., 127.0.0.1 on your development machine) - no special adb or emulator redirection required, but only available on the emulator.
Finally, I'll note that :kershaw worked on bug 1809843, so might have related knowledge / thoughts.
Comment 8•3 years ago
|
||
I don't think we can trivially change the IP address; we're just setting network.dns.localDomains to bypass DNS entirely: https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py#123 I suppose if we're able to set up the equivalent of a hosts file in the emulator we could use that instead of the Firefox pref, but I'm not sure if that's easy / possible (it looks like in theory it works, but I couldn't trivially find any prior art in mozilla-central).
Description
•