Closed Bug 1622901 Opened 6 years ago Closed 2 years ago

Turn on HTTP/3 tests on Android

Categories

(Core :: Networking: HTTP, task, P2)

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: michal, Assigned: kershaw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file, 1 obsolete file)

Binary built on Android fails to execute with error "No such file or directory". ldd shows "invalid ELF header" error:

[task 2020-03-16T14:40:30.819Z] 14:40:30 INFO - + ldd /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server
[task 2020-03-16T14:40:30.819Z] 14:40:30 INFO - /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header

Blocks: QUIC
No longer blocks: 1587353
Depends on: 1587353
Whiteboard: [necko-triaged]

(In reply to Michal Novotny [:michal] from comment #0)

Binary built on Android fails to execute with error "No such file or directory". ldd shows "invalid ELF header" error:

[task 2020-03-16T14:40:30.819Z] 14:40:30 INFO - + ldd /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server
[task 2020-03-16T14:40:30.819Z] 14:40:30 INFO - /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header

The fuller error is:

[task 2020-03-16T14:40:30.819Z] 14:40:30     INFO -  + ldd /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server
[task 2020-03-16T14:40:30.819Z] 14:40:30     INFO -  /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header
[task 2020-03-16T14:40:30.819Z] 14:40:30     INFO -  + file /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server
[task 2020-03-16T14:40:30.819Z] 14:40:30     INFO -  /builds/worker/workspace/build/tests/xpcshell/http3server/http3serverDB/../http3server: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, BuildID[sha1]=4bebb33b3750c1b52899343545646d8992332f78, not stripped

So if I'm reading this correctly, this means that something on the test machine (x86-64 linux) is trying to execute http3server, which is an x86-64 Android binary (notice that http3server's interpreter is /system/bin/linker64 which I assume is an Android thing, and not a Linux thing). Where do you want http3server to execute during these tests?

Flags: needinfo?(michal.novotny)

http3server is started and shut down in runxpcshelltest.py, see https://phabricator.services.mozilla.com/D48670#change-CiIor6BCZ08p
The binary is built during building of firefox (https://phabricator.services.mozilla.com/D48666#change-Nh01ZR3y0ZaJ), so it's compatible with the target platform.

Flags: needinfo?(michal.novotny)

Right, so I don't think that's going to work very well for the Android case, because that code in runxpcshelltest.py is running binaries on the host platform rather than the target. I think in the Android case, you want to make http3server a host binary...possibly building http3server outside of the normal Firefox process itself.

Perhaps http3server can be added to the hostutils ?

If the binary ends up in the artifact that I use to make hostutils, it will automatically be part of the next build. The process I use to build new hostutils is at https://wiki.mozilla.org/Packaging_Android_host_utilities.

The recent trend has been for things to be built by taskcluster jobs vs being tooltool packages. The turnaround is faster (the machines do it vs humans). Android emulator has recently gone that route (Bug 1624649).

Blocks: 1586794
No longer blocks: QUIC

http3server is in hostutils now, and I can run it on the host and redirect the emulator ports fine, but I find that the http3 tests still fail.

Have I missed something in the harness support? Do we expect http3 to work on android?

:valentin - Any ideas?

Flags: needinfo?(valentin.gosu)

This bug is in my to-do list.
I'll get to this one later.

Assignee: nobody → kershaw
Severity: normal → N/A
Flags: needinfo?(valentin.gosu)

Some of the tests that use TRRServer.registerPathHandler are executed by node moz-http2.js on the host in a new node instance, on a new port.
While MOZNODE_EXEC_PORT is properly forwarded, the port for the newly spawned instance is not, and I am not sure how to do that programatically from JS.

We'd also have to change httpd.js to use 10.0.2.2 when running on Android.

Attachment #9215925 - Attachment is obsolete: true

Note that this patch only enables some HTTP/3 tests that use http3_setup_tests to start the server.

For tests that use HTTPS RR to discover the http3Server, we need more works.

await trrServer.registerDoHAnswers("test.h3_example.com", "HTTPS", {
    answers: [
      {
        name: "test.h3_example.com",
        ttl: 55,
        type: "HTTPS",
        flush: false,
        data: {
          priority: 1,
          name: "test.h3_example.com",
          values: [
            { key: "alpn", value: "h3-29" },
            { key: "port", value: h3Port },
          ],
        },
      },
    ],
  });
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0054503ef97c Enable some HTTP3 test on Android, r=mxinden
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
Regressions: 1929348
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: