Repository navigation
Conversation
Adds GnuTLS, nettle/hogweed, GMP, libtasn1, nghttp2, nghttp3, and ngtcp2 (+ its GnuTLS crypto glue), all cross-compiled for the cortex-a9/armv7/ soft-float/no-NEON baseline via ci/build-curlstack.sh, SONAME-renamed to this project's existing `-plx` convention, and wired into net.rs/curlio.rs as the preferred dlopen candidate ahead of the television's system libcurl 7.53.1 (HTTP/1.1+HTTP/2 only, no QUIC). Falls back to the system library automatically if the bundle is missing or any dependency fails to load — net.rs owns the one bundled-vs-system decision via `bundled()`, and curlio.rs's separate multi table mirrors it rather than deciding on its own, since an easy handle from one libcurl handed to another's curl_multi_add_handle would be an ABI violation. Motivated by a reverse proxy in front of the Plex server advertising HTTP/3 on its entrypoint, which the television's own libcurl could never speak. GnuTLS over OpenSSL: the firmware's own libcurl links its own OpenSSL 1.0.2p unconditionally (`libplayerAPIs.so.1`'s own NEEDED entry pulls it in at process start regardless of anything this app does), and a second, newer OpenSSL in the same process corrupts the first's RNG/atfork/ provider state well before any symbol collision theory would predict — confirmed by a crash that got MORE deterministic after isolating the bundle's symbols with RTLD_LOCAL, which ruled out ordinary interposition. GnuTLS has no such global state to collide with. That system libcurl dependency has a second consequence this stack works around directly: it is always resident in the process's global symbol scope before main() runs, so the bundled curl's own internal self-calls were getting hijacked by the identically-named system curl via ordinary PLT resolution — a second, independent crash, reproducing at a fixed file-relative offset inside the system library regardless of which libcurl our own code successfully resolved its symbols from. Fixed by loading the bundled curl and its 9 dependencies with RTLD_DEEPBIND (dynlib.rs's new `open_in_deepbind`/`dlopen_str_deepbind`), so each library prefers its own dependency chain over the process-wide scope. Two more fixes were needed before the bundle actually verified anything: - net.rs's TLS verify-result predicates (date failure, untrusted issuer, the plex.direct roots-mode trigger) were written against OpenSSL's X509_V_ERR_* enum. GnuTLS reports an entirely different bitmask (confirmed against the vendored gnutls.h), so every one of them silently misread a real verification failure as not one at all. Each now decodes by backend, gated on `bundled()`. - curl's GnuTLS backend never calls gnutls_certificate_set_x509_system_trust() unless CURLOPT_SSL_OPTIONS / CURLSSLOPT_NATIVE_CA is set at runtime, so net.rs and curlio.rs now set it on the ordinary (strict) TLS path. GnuTLS's own default trust store also points at /etc/ssl/certs as a directory rather than the device's stale concatenated ca-certificates.crt, which is missing ISRG Root X1 despite the individual cert file sitting right next to it. With connectivity restored, wired up actual HTTP/3 use: CURLOPT_ALTSVC / CURLOPT_ALTSVC_CTRL with a cache file shared between the control and media planes, so curl opportunistically upgrades to QUIC once the far end's Alt-Svc header is seen, rather than staying on HTTP/2 forever. Also fixes ci/check-package.py's THIRD-PARTY-NOTICES SONAME regex, which only ever anticipated letters-only library basenames (nghttp2/nghttp3/ ngtcp2 carry digits, libngtcp2_crypto_gnutls an underscore). Co-Authored-By: Claude Sonnet 5 <[email protected]> Signed-off-by: fraygox <[email protected]>
The bundled GnuTLS/HTTP/3 curl stack becomes opt-in. A plain `make`, `make ipk` and CI's cross-build no longer build, link or package it, and the binary carries no loader for it. - Makefile: CURLSTACK=1 (only `1` accepted) stages the ten libraries, copies licenses/curlstack/*.txt into the package, passes `--features http3-curlstack`, writes `+curlstack` into pkg/.build-config and uses its own target-curlstack dir. Without it every CURLSTACK_* list is empty. - Cargo: `http3-curlstack` gates only the loader (net::curlstack, glibc only) and dynlib::Handle::open_in_deepbind. `libcurl-plx.so.4` leaves both candidate lists; net binds it through the new `dynlib!` `load_from`, and curlio binds its multi table from the same handle (net::bundled_curl). The GnuTLS verify-bitmask decoding (keypin::VerifyScheme, now unit-tested), NATIVE_CA and Alt-Svc stay compiled and sit behind net::bundled(), which is constant false without the feature, so the system-curl path is upstream's. - check-package: decodes `+curlstack`; THIRD-PARTY-NOTICES' section 2.8 is marked "(CURLSTACK=1 builds only)", and a package must ship all of its libraries and licence texts with the flag and none without. - ci/dependencies.json: the eight pins stay in the one manifest, now `bundled: false` (no release ships them, and `bundled` entries need a release-source recipe). The shared deps-cache skips the group (new `fetch-all --exclude-group`). - ci/build-curlstack.sh: a keyed output cache under $PLX_BUILD_CACHE/curlstack, modelled on build-ffmpeg.sh's. - ci.yml: a cross-build-curlstack job running the same artifact gates with the flag. It caches the script's tree, has its own 30 min budget and is not waited on by any required check. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
ci/test_deps_update.py requires every github-release entry to round-trip its pinned version through tag_pattern and tag_format; their tags are v-prefixed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
… gates The cargo feature now rides RUST_FEATFLAGS (tools/build-bench.py mirrors the staticlib line), with the stamp's features field taken without it (RUST_CFG_FEATFLAGS). The Alt-Svc cache path drops its /tmp literal fallback (check-deps tmppath) and names its file through a constant. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
libcurl-plx.so.4 was opened RTLD_GLOBAL, and glibc's RTLD_GLOBAL adds the opened object's whole search list to the global scope: GMP, Nettle, Hogweed, libtasn1 and GnuTLS with it. Every gated firmware ships its own older libgnutls.so.28, libnettle.so.4, libhogweed.so.2 and libgmp.so.3 (libtasn1.so.6 through 7.4.0), so a firmware library dlopen'd later could bind its unversioned references to this stack's newer ABIs. The curl and multi tables dlsym through the returned handle, so nothing needs the stack to be global: open_in_deepbind now always uses RTLD_NOW | RTLD_DEEPBIND | RTLD_LOCAL, and the Scope enum is gone. The loader and open_in_deepbind are gated on target_env = "gnu" as well as linux, since RTLD_DEEPBIND is glibc's. The doc comments now name the TV's libcurl by release (libplayerAPIs.so.1 NEEDs libcurl.so.5 through 4.10.0 and libcurl.so.4 from 5.3.1, read from the firmware inventory), and say the two-worker crash's cause was not determined; the explicit gnutls_global_init call is kept but is only a refcount bump on GnuTLS 3.3 and later. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
- agent-reference, curlio.rs: curlio binds its multi table from net.rs's bundled handle when there is one and from the system candidate list otherwise; it never makes the choice itself. The dynlib caller count is replaced by the git grep that lists them (it had already missed platform/src/playback_trace.rs). - agent-reference: the TV's libcurl by release, and RTLD_LOCAL's reason. - THIRD-PARTY-NOTICES 2.8: quote the real curl and GnuTLS configure flags and the protocol and feature lists curl-config reports for the built library (no --disable-guile; libz is the TV's own); drop the "only GET" claim; add nghttp2/nghttp3/ngtcp2 copyright holders, the libunistring code GnuTLS compiles in, and where the GPL-3.0 text that LGPL-3.0 incorporates is shipped (LICENSE, in every package). - build-curlstack.sh: the strict path sets no CAINFO (NATIVE_CA plus GnuTLS's default trust-store dir); drop a stale libssl-plx reference. - ci.yml: the curlstack cache restore is ~4 MB (zstd), not ~1 MB. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
The opt-in CURLSTACK=1 bundle now builds curl 8.23 over OpenSSL 3.5.9 (libcrypto-plx.so.3, libssl-plx.so.3) with ngtcp2's crypto_ossl glue, replacing GnuTLS, Nettle/Hogweed, libtasn1 and GMP. OpenSSL's linux-armv4 assembly carries ARMv8 Crypto Extension paths for AArch32 (AES, PMULL, SHA-1, SHA-256), chosen at run time from OPENSSL_armcap_P; Nettle has no such paths on 32-bit ARM. The -plx names come from OpenSSL's own shlib_variant, so the symbol-version needs name the bundled files rather than a firmware libcrypto.so.3. Its config and module directories point at a path no television has, the default provider is built in (no-module), and curl takes its trust anchors from the television's hashed /etc/ssl/certs through --with-ca-path. libcrypto is linked --as-needed, which drops the NEEDED libatomic.so.1 that linux-latomic adds and that four supported firmwares do not ship. Every library is still opened RTLD_DEEPBIND | RTLD_LOCAL. The verify-result numbering in keypin now follows the TLS library the bound curl reports (curl_version_info()->ssl_version, net::tls_backend) instead of whether the bundled curl was bound. Notices: OpenSSL is Apache-2.0; the LGPL-3.0 text only GMP and Nettle needed is gone from licenses/curlstack/. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nuTLS TlsBackend::from_ssl_version took the first word with its parentheses stripped, so a MultiSSL curl's "(SecureTransport) LibreSSL/3.3.6" read as Other; curl marks every backend NOT in use with parentheses, so the one in use is the word without them. The new tls_backend_tests fail on the old parse. CURLSSLOPT_NATIVE_CA followed bundled(), which now means OpenSSL: there it loads no anchors on Linux and only turns off curl's shared CA-store cache. It now follows the reported TLS library (net::native_ca_needed), like the verify-result numbering, in both net.rs and curlio.rs; Alt-Svc stays behind bundled(). A test maps the same verify results through each backend's scheme. Comments, notices and docs describe the OpenSSL stack as it is built: how it is kept apart from the television's OpenSSL, the firmware's libcrypto names in the RTLD_LOCAL rationale, OpenSSL's tag, copyright and the config target the build adds, the CI job's tool list (no m4) and counts, and a test that the pins, the script and the Makefile name the same five-library stack. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
One conflict, the app's link line in the Makefile: upstream added $(EXIT_INTERPOSER_LDFLAG) and this branch $(CURLSTACK_STAGED) as a prerequisite; both are kept. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
install_sw installs libcrypto.a and libssl.a, which nothing links: ngtcp2 is handed the shared files by name and curl's -lssl -lcrypto resolve through the .so links. They were 11 MB of the keyed cache tree; without them it is 4.8 MB as zstd. The CI job's comment now carries this tree's measurements (168 s cold on an 8-core M1), and the Makefile no longer names 7.53.1 as the television's libcurl, which is newer on later firmware. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…op GnuTLS paths
net::global_init decided OpenSSL 1.0's lock callbacks from the BOUND
curl's version string alone. With the bundle bound that string says
OpenSSL/3.5.9, so a CURLSTACK=1 build never installed the callbacks a
default build installs on the firmware's libcrypto 1.0.x, which stays in
the process through libplayerAPIs.so.1's NEEDED on the system libcurl
(webOS 5 and older). legacy_lock_target now also weighs that resident
libcurl, found with RTLD_NOLOAD and read through its own curl_version(),
and setup_legacy_crypto_locks takes the handle whose OpenSSL needs them.
legacy_locks_go_on_the_televisions_openssl_even_with_the_bundle_bound
failed against the old choice (left None, right Some("libcurl.so.4"))
and passes now.
Every curl this branch binds is OpenSSL (firmware 1.0.x to 3.x, the
bundle's 3.5), so the GnuTLS verify-result bitmask in keypin, the
CURLSSLOPT_NATIVE_CA option it needed, and the TlsBackend detection that
chose between them were unreachable. They are removed, and keypin's
predicates are main's again; the net.rs module doc now says how the
bundled curl is chosen.
Signed-off-by: fraygox <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci/check-curlstack-elf.sh checks each of the seven -plx libraries the way check-elf.sh checks the binary: ELF32/ARM/soft-float, Tag_CPU_arch v7 and no CP15 barrier, with a live-disassembly control. OpenSSL's ARMv8 Crypto Extension code is emitted as raw words behind armcap and keeps the v7 attributes, so no allowance is needed. It also fails on an `exit` import: the libraries are opened RTLD_DEEPBIND, which would bind that `exit` to libc ahead of the app's interposer (noted beside EXIT_INTERPOSER_LDFLAG). None imports it today. The cross-build-curlstack job runs it, and a workflow test pins that. The release guard's comment and a CI test comment no longer give the LGPL source-bundle reason: CURLSTACK=1 is a developer build no release ships, and its licences carry no source obligation. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci/test_ci_timeouts.py flags any line with a bare `curl ` lacking --max-time, and the new step's name "Bundled curl stack ELF assertions" was one. It is "Bundled curl-stack ELF assertions" now. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
THIRD-PARTY-NOTICES §2.8, against the shipped package and ci/build-curlstack.sh: - OpenSSL's copyright is its README's two lines, 1998-2026 The OpenSSL Project Authors and 1995-1998 Eric A. Young, Tim J. Hudson, not a merged 1995-2026 line. - OpenSSL's configure target is linux-armv4-plx, and the flag list now includes no-fuzz-afl and no-fuzz-libfuzzer. - Restore curl's enabled protocols and features as curl-config reports them for the built library (FTP/FTPS among them). - The firmware libcurl is not one pinned 7.53.1: it is 7.53.1 on the oldest sets and 7.82.0 on webOS 10, and none has HTTP/3. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Additional benefit of this, with updating TVs being out of the question in many cases, vendoring OpenSSL helps close up that hole, at least when connecting to plex and any other network dependencies within the app of course. |
GLinnik21
left a comment
There was a problem hiding this comment.
Hi!
I’d use what Plex Media Server officially supports as our baseline for feature parity. Plex doesn’t document native HTTP/3 support, so I’d treat it as an optional enhancement for reverse-proxy setups. I’m open to supporting it if it makes a measurable difference for remote users.
I’m fine with splitting the work by layer. For this PR, a small transport-level benchmark is enough to make the case. For example, use a standalone test on the TV to request the same video byte ranges through the same proxy, with the same curl build forced to HTTP/2 and then HTTP/3. On a realistic remote connection, is there a meaningful difference in time to first byte, sustained throughput, or pauses in data delivery?
That gives us something concrete to evaluate before taking on the extra stack upstream. Player integration can be a separate PR. I’d also evaluate shipping a maintained curl/OpenSSL for older TVs on its own merits.
main moved the HTTPS range transport into plx_net::range_io (the file is rust-modules/net/src/curlio.rs; media's curlio.rs is now a Plex authorization adapter) and made the playback backends explicit features (PLAYBACK_BACKENDS). Resolved so both hold: - curlio: the curl_multi_* table's bind from net::bundled_curl() (load_from) and the strict-path Alt-Svc options move to plx_net's curlio.rs; media/src/curlio.rs is main's. - Makefile: CURLSTACK_FEATFLAG is appended to main's RUST_FEATFLAGS and -curlstack to main's RUST_TDIR, so RUST_CFG_FEATFLAGS still strips it and the stamp's feature field is the plain configuration's; print-curlstack-staged joins print-playback-config in QUERY_GOALS. - check-package: main's per-backend stamp cases plus the +curlstack ones in the new flag format. - rust_toolchain.featflags pins CURLSTACK= like LAB= and RC=: run from inside `make CURLSTACK=1 ipk` it inherited CURLSTACK=1, derived a table with --features http3-curlstack that no stamp carries, and every CURLSTACK=1 package would have decoded as None. Tests added in ci/test_arm_profile.py. - Comments that said every build links libplayerAPIs.so.1 now say every Feed build does (a PLAYBACK_BACKENDS=uri build does not). - docs/agent-reference.md: main's paths with the branch's wording. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
RUST_CFG_FEATFLAGS was defined after the parse-time stamp write, so
pkg/.build-config's features field expanded empty in every build
("features:+tel:..."). The old decoder read an empty field as a dev
build, which hid it (a RELEASE=1 stamp decoded as dev too); main's
decoder reads the Makefile's real flag strings and decoded every stamp
as None, which ci/test_arm_profile.py caught. The validation,
CURLSTACK_FEATFLAG and RUST_CFG_FEATFLAGS now sit beside
RUST_FEATFLAGS.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: fraygox <[email protected]>
…stack at run time Settings > System > HTTP/3 (experimental) is a new install-wide preference, `http3_experimental`, default off. Boot reads it from the session it already loads before the window and hands it to `net::global_init_with` (`CurlStack::from_setting`). Off, `global_init` never looks for the bundled stack (no stat, no dlopen) and binds the television's own libcurl exactly as a build without the bundle does, so `bundled()` stays false and no request sets Alt-Svc; it is not the bundled curl with HTTP/3 disabled, which would move older firmware from HTTP/1.1 to curl 8.23's HTTP/2 default. On is the previous behaviour of this branch: the bundle first, the system libcurl as fallback. The process binds once (the first `global_init_with` call wins), so a change applies at the next launch and never rebinds curl under a running session. The Settings row is a switch in the System section, signed in only, and only in a build that carries the loader (`net::BUNDLED_STACK_BUILT`, a compile-time fact: the http3-curlstack feature on glibc, which `make CURLSTACK=1` packages only with all seven libraries). It writes through `PreferenceCmd::Http3` on the storage worker and shows the pick until the write answers. A sign-out does not retain it. New strings in every catalog; the translations are drafted and need native review. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
- The Settings root keeps the switch out of its state and canon wherever the row is not offered, so a stored on from a stack build does not change a non-stack build's root digest (`offers_http3`, with a test). - A source-scan test pins `global_init_once` to `bind_curl(stack, load_bundled, ...)` with the loader passed uncalled, so the off rule cannot be bypassed by the caller. - `Scope::Install` now says what a sign-out keeps: the key is never cleared as account data, but a signed-out read carries only the language and the resolution; the HTTP/3 row names itself as such a key. - A DB8 sign-out test: `ClearTenure` keeps `http3_experimental: true` stored, the Cleared read reports it off, a PublicOnly write from Cleared is refused, and the next sign-in's write drops the key. - The detail sentence says "may be slower on networks with packet loss" and "Applies after restarting." like the resolution row, in every catalog (translations drafted, still need native review). - Comments and docs that said `global_init` or that a CURLSTACK=1 build always prefers the bundle now name `global_init_with`, its first call, and the setting (net.rs, curlio.rs, Makefile, agent-reference, THIRD-PARTY-NOTICES). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
…s binds the bundle The owner's call: switching libraries behind the HTTP/3 toggle would be confusing. A CURLSTACK=1 build binds the bundled curl stack whenever it is there (bundle first, system fallback, as the PR first had it), and Settings > System > HTTP/3 (experimental) decides only HTTP/3. - `net::set_http3` installs the stored switch once, before `net::global_init` (boot reads it from the session it already loads); `net::alt_svc()` is the one answer both planes ask (the bundle bound AND the switch on) before setting CURLOPT_ALTSVC/_CTRL. Off, no request sets Alt-Svc and the bundled curl negotiates its default (HTTP/2 over ALPN). `CurlStack`, `global_init_with` and `bind_curl` are gone; the bind is the build's alone again. - The bind log is followed by `net: HTTP/3 (experimental) is off — Alt-Svc is not set` (or `is on — Alt-Svc is set on strict requests`) when the bundle is bound. - Tests: the Alt-Svc rule (failed against the bundled()-only rule first), a source scan that both planes' Alt-Svc sites ask `alt_svc()` and that the bind does not read the switch, the install-once rule, and boot's order (session read, switch, bind). - Help text: "Uses HTTP/3 with servers that offer it. Experimental: may be slower on networks with packet loss. Applies after restarting." in all 12 catalogs (11 drafted, need native review). Docs, notices and comments say the bundle is used in every CURLSTACK=1 build and the switch gates only HTTP/3. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
- The scan now tokenises every production `.rs` file under rust-modules (comments, literals and `#[cfg(test)]` items removed, newline-insensitive), counts every `CURLOPT_ALTSVC` and `CURLOPT_ALTSVC_CTRL` use (constant definitions excluded), requires exactly the two known sites (net.rs and curlio.rs, two uses each), and requires the innermost enclosing `if` to be `alt_svc()` itself or end in `&& …alt_svc()`. `CURLOPT_ALTSVC` alone already enables h3 (curl's `Curl_altsvc_init` defaults to H1|H2|H3), so it counts too. A scanner test proves it by mutation: an unguarded or rustfmt-wrapped site, `!alt_svc()`, `bundled()`, `||` and a guard that closed before the site each fail. - The install-once test is renamed to what it proves (`a_later_install_changes_nothing`) and installs the default, off, so the rest of the test process reads off. - Comment fixes: a Linux glibc host with `http3-curlstack` does carry the loader; a sign-out turns Alt-Svc off from the NEXT launch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
|
Thanks, agreed on PMS parity as the baseline: HTTP/3 is only an enhancement for reverse-proxy setups. Below is the transport benchmark you suggested, shaped around how the app actually uses curl. Setup
What you asked: the same curl, HTTP/2 vs HTTP/3, through the same proxy (the bundled curl 8.23 forced to HTTP/2, against the bundled curl through Alt-Svc, where every playback transfer ran over HTTP/3). Medians of 8 rounds:
PR #1270's path vs today (bundled curl, opportunistic HTTP/3 through Alt-Svc, exactly as the PR sets it):
On clean paths, start is 8 to 34% faster and seeks 9 to 34% faster. Under loss there is no gain, and seeks get slower. In absolute terms the CPU cost is about 2 percentage points of one core at 8 Mbit/s and about 10 points at 40 Mbit/s. It has not been measured on a CPU without the ARMv8 crypto extensions. The most likely cause of the loss result is the proxy's QUIC congestion control, not the client. This is not proven by a controlled test:
Two findings that don't depend on HTTP/3
Proposal for this PR
Not covered:
The client, runner, analysis script (with a self-test) and raw JSON are available if you want to reproduce or extend it. |
Brings in main through 8e486d1 (Playback engine opt-in, WebSocket codec, Magic Remote Back fix, Under posters ask, default version, Opus sizing). Conflicts: - plex session prefs_tests: main added UriEnginePref as the twenty-first Setting row and this branch added Http3Pref; both rows are checked and the table now lists twenty-two Setting rows. - screens settings RootPage::new: keep this branch's pending_http3 and offers_http3 fields beside main's new under_ask field. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: fraygox <[email protected]>
|
@GLinnik21 for your review when you get some time, thank you! |
Conflict: docs/agent-reference.md, the dynlib callers paragraph. Both sides dropped the old caller count; kept this branch's wording (it excludes dynlib.rs from the grep) and main's new `net::connect_only` sentence. Semantic fix the merge needs: main's plxnative#1283 added `net::connect_only`, a third libcurl table bound with `raw::load(None)`, i.e. always the system candidates. Its easy handle comes from `net::curl_easy_init`, which in a CURLSTACK=1 build is the bundled libcurl-plx.so.4, so curl_easy_send/recv/getinfo from the system library would be handed a handle from another libcurl. The table now binds from `net::bundled_curl()` when it is Some, as curlio's multi table does; the agent-reference and curlstack module docs say so. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…busy mark Review of the main merge (Fable 5.2): - A source scan pins every libcurl dynlib! table outside net.rs (curlio, connect_only) and requires each to bind from net::bundled_curl() with load_from, so a revert of the merge's connect_only fix, or a new table bound from the system candidates, fails a host test. Nothing else can catch it: the host tests never bind the bundle. - plxnative#1289's busy mark met this branch's Alt-Svc: after a cancelled h2 transfer, an origin that moves to HTTP/3 kept dialling fresh QUIC connections for the whole 120 s window. ConnLedger::saw_version now ends the mark on an HTTP/3 answer (Alt-Svc routes the origin to QUIC, which never matches the busy TCP connection); an HTTP/1.1 answer still keeps it, since it can come from a fresh connection while the busy one is cached. - Docs that named only curlio's multi table as reading bundled_curl now name connect_only's too. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
`make CURLSTACK=1 deploy` failed at its last step with `/bin/sh: -c: ... unexpected EOF`. The command that retires curl-stack libraries this build no longer carries sat inside `$(if $(CURLSTACK),...)`, and make counts parentheses in a function's arguments: the first `case` pattern's `)` ended the `$(if`, and the shell got half a command. It has been so since f75f1eb put the stack behind CURLSTACK=1; no gate runs `deploy`, and the device runs installed a packaged .ipk. The command is now CURLSTACK_PRUNE, which make does not parse for parentheses. print-curlstack-prune echoes it, and ci/test_deploy_manifest.py has `sh -n` parse the command and the remote script inside it, and checks every staged library is kept. Against the old inline text the query itself fails the same way the deploy did. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cribed The module doc and BUSY_FOR's doc still said every request dials fresh for the whole window; since the last commit an HTTP/3 answer ends the mark early (ConnLedger::saw_version). Doc only. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Updated to
|
|
Thanks for running the benchmark. The faster seeks on clean connections are promising. I’m still hesitant to take on the extra stack for HTTP/3, since the tests don’t show a consistent reduction in buffering on lossy connections. Could you rerun the same transport benchmark with the HTTP/2 seek fix from #1289 in place? I’d like to see how much of the seek improvement remains against current |
…tion With the bundled curl, a seek still took 1.7x as long as over HTTP/1.1 under plxnative#1289's rule (254 against 148 ms to resume, 8 Mbit/s, ~10 ms from Traefik, webOS 5.6.2 set; that set's firmware 7.61 asked for HTTP/2 under the same rule: 152 ms). Every request after a seek already dials fresh, but up to four abandoned connections stayed open beside the new one. A bundled media transfer to an origin last heard over HTTP/2, or not yet heard from while Alt-Svc cannot route it to QUIC, is now set CURLOPT_FORBID_REUSE before it enters the multi (setting it on a transfer in progress is undefined per curl_easy_setopt), so its connection closes with it: 136 ms in the same runs, 0.92x HTTP/1.1. stop() then records no busy connection for it. Firmware libcurls, HTTP/1.1, HTTP/3, an unknown origin with Alt-Svc on, and a source reopened for HLS (its playlist and segment requests finish cleanly, and plxnative#1289's mark still covers its cancels) are unchanged. A redirect hop the rule chose closes its connection too, so its next hop dials its own. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@GLinnik21 I reran the benchmark against current
SetupThe setup is the same as in the first benchmark:
The client now models #1289's rule as
Clean path: Traefik, no loss, 8 rounds per cellSeek to resume is the median per run in ms. Ratios are paired, with 95% CIs.
Lossy paths: +50 ms, 8 Mbit/s, 8 rounds per cellEach cell shows stall time per 60 s, then the median seek to resume. The HTTP/2 column is this PR with the switch off, measured before
Regression found in this PR, fixed in
|
| Clean, ~10 ms, 8 Mbit/s, 5 paired rounds | Seek to resume | vs main |
Start |
|---|---|---|---|
main (sys) |
148 ms | — | 144 ms |
| switch off, before | 255 ms | 1.71x [1.69–1.76] | 139 ms |
switch off, bfe0f60f rule |
136 ms | 0.92x [0.89–0.94], lower in 5/5 rounds | 138 ms |
Two alternatives I measured and rejected:
- Setting
FORBID_REUSEat detach instead: this measured the same (137 ms), butcurl_easy_setopton a transfer in progress is documented as undefined behaviour. CURLMOPT_MAXCONNECTS=1on the multi: this made seeks worse (447 ms).
Not measured: whether main on firmware with curl 7.62+, which uses HTTP/2 by default, has the same problem. If it does, the same rule could cover firmware curls in a separate PR.
Checked on a device, 7040caec: the webOS 5.6.2 set, with make CURLSTACK=1 deploy, the switch off, and a direct play through our HTTPS reverse proxy.
- Boot: it bound
libcurl-plx.so.4 (libcurl/8.23.0 …)and loggedHTTP/3 (experimental) is off. - Protocol: the proxy logged all 6 media-part requests as
HTTP/2.0. - Connections: the app held one established connection through playback and two seeks. Each seek reopened in 19–20 ms (
ff: seek_cb reopen … ms=19), and nofresh connectionline was logged.
Gates on 7040caec:
make check: 127 steps, all ok.make check-nodef: exit 0.http3-curlstackfeature tests: 237, 1974 and 342 passed.- Flag-off and
CURLSTACK=1release IPKs: packaging and ELF assertions passed, includingcheck-curlstack-elf.sh. fwcompat --min-release 4.4.2: exit 0.
The PR description is updated to match.
Signed-off-by: fraygox [email protected]
Three conflicts, all where main's Settings work met this branch's HTTP/3 row: - session.rs, prefs_tests.rs: both sides added a `Setting` row (`HudEndTimePref`, `Http3Pref`). Both are kept; the descriptor count is now 23 Setting rows. - settings.rs: main moved the root page onto captured `ScreenInputs` with a receipt per pending write. The HTTP/3 switch follows the auto sign-in switch's shape (`http3_receipt`, cleared once the settled session answers) instead of reading `session::peek_settled()`. - settings_root_navigation_tests.rs: the HTTP/3 tests build the page with the captured inputs and refresh them before a rebuild. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
… writes do main removed `plx_machine::idle`; a storage-worker reply now wakes the frame through `plx_machine::present::wake_from_worker`. The merge left this branch's `PreferenceCmd::Http3` on the removed call, which does not compile. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
The ported screen tests covered only a refused receipt. main gave the auto sign-in switch `a_success_receipt_waits_for_the_next_captured_authority`; `a_saved_http3_write_waits_for_the_next_captured_authority` is its twin, so dropping the `settled` check or the stored-value comparison now fails. The page comment says which half follows auto sign-in (the receipt) and which the resolution picker (the install write). Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
main's machine-shape gate (plxnative#1358, plxnative#1392) certifies shared payload types against two proof files that pin every workspace manifest's hash. This branch adds the `http3-curlstack` feature to rust-modules/Cargo.toml, base/Cargo.toml and net/Cargo.toml, so after the merge both certificates were refused and `ci/check-machine-shape.py` reported the session machine's payloads as opaque (28 problems), failing five `make check` steps. Both are regenerated with their own producers (`ci/readonly_dependencies.py --produce serde_json-1.0.154.crate`, `readonly_generated.produce_certificate`) and the pinned certificate hashes updated, as main's own dependency bump did (6d7b48e). The only changes are those three manifest hashes, plus play-feed's `lib_sha256` in the serde_json certificate, which the producer refreshed: main's entry predates a later edit to play-feed/src/lib.rs that this branch does not touch. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`print-curlstack-prune` was added (f3e2577) without its `QUERY_GOALS` entry, so it was not `SIDE_EFFECT_FREE`. `ci/test_deploy_manifest.py` asks for it with `CURLSTACK=1` from `make check`, in the real checkout: with a default build in `pkg/`, the parse saw a `+curlstack` configuration that no default stamp matches, rewrote the stamp and deleted the built binary, the storage helper and the staged `-plx` libraries. CI never saw it because its runners start with no `pkg/`. It joins `QUERY_GOALS` beside `print-curlstack-staged`, and both join `ci/test_arm_profile.py`'s `HOST_ONLY_GOALS`, which seeds a release build and checks each goal leaves it alone; against the old Makefile that test fails for `print-curlstack-prune`. Found by pr-reviewer on the merged branch. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`make CURLSTACK=1` unpacks and builds five libraries under vendor/
(`{openssl,nghttp2,nghttp3,ngtcp2,curl}-{src,build,prefix}`, `openssl-stage`,
`curl-link-shim`) and writes the stamp `vendor/curlstack-built`. None was in
.gitignore, so a checkout that had built the stack showed them as untracked:
`git status --short` was no longer empty after a build, and one `git add -A`
would have staged the unpacked source and object trees, the mistake the FFmpeg
entries' comment records. (The lane this branch was built in had a local
`info/exclude` for vendor/, which hid it.)
They are listed slashless beside the FFmpeg entries, and `tools/build-gc.sh`'s
`derived_output` classifies them as build output, which
`ci/test_build_gc.py::test_every_gitignore_pattern_is_either_build_output_or_kept_as_private`
requires of every new pattern (it fails with the .gitignore lines alone).
Found by pr-reviewer.
Signed-off-by: fraygox <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
…mment Two findings from pr-reviewer's fourth pass, both minor. - docs/sans-io-guide.md: "When you add a registry reader, add its name to the rule in the same change." `net::bundled_curl`, `net::bundled`, `net::http3_switch` and `net::alt_svc` read what boot decided once for the process and were not spellings of the globals rule. They are now, the way `devcaps::caps` was added: qualified, bare as a call after an import from `net` (singly or through a glob), and a `use ... as` rename refused. Only the net crate's transport code calls them and it is no machine, so no ledger line is seeded and the site count is unchanged (19). `test_globals_ledger_sees_the_bundled_curl_stack_readers_in_a_machine` plants each shape and checks `net::BUNDLED_STACK_BUILT` (a const), a method of the same name and a `bundled` parameter are not sites. The guide's list and the rule's comment name them. - curlio.rs: the comment on `ensure_loaded` said the Feed's `ff::boot` binds the multi table at start-up. Nothing calls that function on main, so the table is bound at the first media open. The ordering it relies on is unchanged and still holds (`construct` runs `net::global_init` before any screen exists); the comment now says that. No code change. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
ci/build-curlstack.sh keys its output tree on the runner's cmake and patchelf versions (`INHERITED`), but the workflow's actions/cache key did not. After a runner image moved either tool the workflow key would still hit, the script would miss inside the restored tree and build all five libraries cold, and actions/cache would skip its save on the exact key hit: every later `cross-build-curlstack` run cold, against a 30-minute budget, until a pin or script changed. The output was never wrong, only slow. The `curlstack-pins` id now hashes both versions with the pins (the tools are installed by the step before it), and `ci/test_ci_workflows.py` pins that the workflow reads the two versions the script keys on. Found by pr-reviewer. Signed-off-by: fraygox <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
@GLinnik21 this has current What changed since
Gates, all on Not repeated: device verification. Given that nothing on the wire changed, I left the earlier runs standing rather than re-run them; the description says exactly which head each run was on. If you would rather see a fresh run on this head before merging, say so and I'll do one. Two things I'd like your call on:
Your earlier question (how much of the seek improvement remains against |
|
Thanks for rerunning the benchmark against #1289 and for testing a second proxy. That answered my question. At 20 Mbit/s on a clean connection, HTTP/3 cut roughly 50–70 ms from a seek compared with the corrected HTTP/2 baseline. On lossy connections, the buffering results depended heavily on the proxy configuration. I’m closing this PR for now. For the reverse-proxy setups that could use it, I don’t think the measured improvement justifies maintaining a second curl stack upstream. I appreciate the investigation, especially the HTTP/2 seek fix that’s already in |
What
A developer-build option that bundles a current TLS and HTTP stack for the app's libcurl: OpenSSL 3.5.9,
nghttp2 1.71.0, nghttp3 1.19.0, ngtcp2 1.26.0 (with its OpenSSL glue,
crypto_ossl) and curl 8.23.0.ci/build-curlstack.shbuilds the seven libraries under-plxSONAMEs and the appdlopens themfrom beside the binary.
make,make ipkand the existingcross-buildjob neither build, link nor package any of it; the default package's file list isunchanged.
CURLSTACK=1builds always bind the bundled curl/OpenSSL (system libcurl as the fallback if thebundle is missing or any library fails to load). This gives older sets a current TLS stack
(OpenSSL 3.5.9 instead of the firmware's 1.0.2), independent of HTTP/3.
applied at the next launch, signed-in only, shown only in a build that carries the bundle, and not
kept across a sign-out. It decides one thing: whether strict requests set
CURLOPT_ALTSVC. Off,nothing sets Alt-Svc and the bundled curl negotiates its default over ALPN, which is HTTP/2 (or
HTTP/1.1 where the server only speaks that). On, curl upgrades to HTTP/3 once it has seen the
server's
Alt-Svcheader.CURLSTACK=1is unchanged frommain.No firmware libcurl has QUIC (7.53.1 on the oldest sets, 7.82.0 with OpenSSL 3.0.13 on a webOS 10.3
set), so a server behind a reverse proxy that advertises HTTP/3 is never reached over QUIC today.
Protocol change to be aware of. Firmware curl older than 7.62.0 defaults to HTTP/1.1 (the app never
sets
CURLOPT_HTTP_VERSION); the bundled curl defaults to HTTP/2. On those sets aCURLSTACK=1buildmoves media requests from HTTP/1.1 to HTTP/2 even with the switch off. On the one set I measured, HTTP/2
seeks were slower than HTTP/1.1 without the companion change, #1289 (HTTP/2 seek
CURLOPT_FRESH_CONNECT). It haslanded on
mainand is merged here, and an HTTP/3 answer now ends its busy mark (ConnLedger::saw_version). With #1289 alone thebundled curl's HTTP/2 seeks were still 1.7x HTTP/1.1 on that set;
7040caec5closes the connection a seek abandons (a bundled mediatransfer that may be HTTP/2 sets
CURLOPT_FORBID_REUSEbefore it enters the multi), which brought them to 0.92x. Benchmark details:the first run (#1270 (comment)) and the rerun against
mainwith #1289(#1270 (comment)).
Make, Cargo, loader
CURLSTACK=1(only1accepted) stages the seven libraries, shipslicenses/curlstack/curl.txt, appends--features http3-curlstackto the explicit feature flags,records
+curlstackinpkg/.build-config, and builds in its own-curlstacktarget tree. ACURLSTACK=1build on the stable id is refused (ALLOW_DEV_ON_STABLE=1overrides): it is adeveloper build no release ships.
ci/rust_toolchain.py'sfeatflags()pinsCURLSTACK=so aderivation run inside
make CURLSTACK=1 ipkdoes not inherit it.http3-curlstack(default off, glibc only) gates the loader (net::curlstack) anddynlib::Handle::open_in_deepbind. Without itnet::bundled()is constantfalseand thesystem-curl path is
main's.net::global_initbinds the bundle first, system second; therange transport's separate
curl_multi_*table (plx_net::range_io,rust-modules/net/src/curlio.rs) andnet::connect_only'scurl_easy_send/curl_easy_recvtable(the WebSocket's, from
main's Net: the WebSocket transport over libcurl CONNECT_ONLY #1283) bind from the same handle, since an easy handle from one libcurlmust not reach another's functions. A source scan (
every_other_libcurl_table_binds_from_the_library_global_init_chose)pins every libcurl
dynlib!table outsidenet.rstobundled_curl()/load_from.CURLOPT_ALTSVC/_CTRL, one cache file in the runtime directory) is set on strictrequests of both planes only when
net::alt_svc()says so: bundle bound AND switch on. Boot readsthe stored switch from the session it already loads and installs it once, before
net::global_init.The bind log is followed by
net: HTTP/3 (experimental) is off — Alt-Svc is not setor… is on — Alt-Svc is set on strict requests.bundle 3.5), so
keypin's predicates read either; SECURITY.md's pin and bundled-roots rules hold.OpenSSL 1.0.x into the process before
main(libplayerAPIs.so.1needs it). With the bundle bound,global_initfinds the resident libcurl withRTLD_NOLOAD, reads itscurl_version()and installsthe callbacks there too (
legacy_lock_target).Why OpenSSL
OpenSSL's
linux-armv4assembly has ARMv8 Crypto Extension paths for AArch32 (AES, PMULL, SHA-1,SHA-256), chosen at run time from
OPENSSL_armcap_P; the library is built with no CPU flags, so thesame file runs table code on the oldest CPU and hardware instructions where present. The instructions
are emitted as raw words behind that dispatch, so every library keeps ARMv7 object attributes, which CI
checks. Nettle, the crypto library of the obvious alternative TLS stack, has no such paths on 32-bit ARM.
Measured on a webOS 10.3 set (CPU with the Crypto Extensions;
OPENSSL_armcap=0x3d): EVP driver, 16 KiBbuffers, 2 s per primitive, median of three runs, app closed. Carried over from the previous revision
(package
067ffacb, whoselibcrypto-plx.so.3is byte-identical to the final one); not re-run.Isolation:
RTLD_DEEPBIND | RTLD_LOCALlibplayerAPIs.so.1(linked by every Feed build) has aNEEDEDon the firmware libcurl, so that libcurl,its nghttp2 and the firmware OpenSSL are in the global scope before
main.RTLD_DEEPBINDon every stack library: otherwise the bundled libcurl's calls between its ownexported functions resolve through the PLT to the same-named system library. An earlier build did
exactly that on-device (SIGSEGV inside the system
libcurl.so.4.5.0, at a reproducible offset).RTLD_LOCAL: none of the stack joins the global scope, so firmware code that binds later cannotpick up the bundle's symbols. The curl and multi tables
dlsymthrough the handle, unaffected.-plxSONAMEs come from OpenSSL's ownshlib_variant, not a patchelf rename;--prefix/--openssldirpoint at a path no television has; the build isno-module no-legacy no-engine no-autoload-config, so it never reads the firmware'sopenssl.cnf.--with-ca-path=/etc/ssl/certs(the hashed directory; the concatenated bundlebeside it lacks ISRG Root X1 on webOS 5.6.2). The
*.plex.directfallback still uses the shippedle-roots.pem.libatomic:-Wl,--as-neededdrops theNEEDED libatomic.so.1that four supported firmwares donot ship (1.2, 1.4, 4.4.2, 4.10.0).
exit: DEEPBIND would bind a stack library'sexitto libc ahead of the app's exit interposer.None imports it; CI fails the day one does.
Packaging, licences, CI
THIRD-PARTY-NOTICES §2.8 ("CURLSTACK=1 builds only") names each file, version, licence and copyright.
All five sources are unmodified upstream tarballs; the build's only addition is a config target
(
linux-armv4-plx).ci/check-package.pydecodes+curlstack: a package must carry all seven libraries andcurl.txtwith the flag and none without.
ci/dependencies.json(group: curlstack,bundled: false); the shared deps cache skipsthe group (OpenSSL's tarball alone is 53 MB). The deps-cache and ffmpeg cache keys hash that file, so
this PR invalidates them once.
cross-build-curlstackjob: the same artifact gates ascross-build, with the flag, plusci/check-curlstack-elf.shover the seven libraries (ELF32/ARM/soft-float,Tag_CPU_arch: v7, no CP15barrier, no
exitimport). It caches the script's keyed build tree (4.8 MB zstd), has a 30-minutebudget (not yet measured on a runner) and is not awaited by
cross-build-required. A cold build took168 s on an 8-core Apple M1 (carried over).
Since the last revision
This revision (to
58fd0c06b) brings the branch up tomainat8e8330ab0and fixes what that merge and a fresh review turned up. It changes no curl option, nothing in the TLS/HTTP stack, the loader or the media transfer path; inrust-modules/netthe only edit of ours is one comment.8243f655emergesmain(8e8330ab0). Three conflicts, all wheremain's Settings work met the HTTP/3 row:session.rs,prefs_tests.rs: both sides added aSettingrow (HudEndTimePref,Http3Pref). Both are kept; the descriptor count is 23.settings.rs:mainmoved the root page onto capturedScreenInputswith a receipt per pending write. The HTTP/3 switch now follows the auto sign-in switch's shape (http3_receipt, cleared once the settled session answers) instead of readingsession::peek_settled(), and its tests build the page from the captured inputs.362129e97:mainremovedplx_machine::idle; the HTTP/3 preference write now wakes the frame throughpresent::wake_from_worker, asmain's other preference writes do. (The merge compiled nowhere without it.)2bea7f310:main's machine-shape gate certifies shared payload types against two proof files that pin every workspace manifest's hash. This PR adds thehttp3-curlstackfeature to threeCargo.tomlfiles, so both certificates were regenerated with their own producers and the pinned hashes updated, asmain's dependency bump6d7b48e7adid. The diff is those three manifest hashes, plusplay-feed'slib_sha256, which the producer refreshed (main's entry predates a later edit to that file; this branch does not touch it).b540939b5: a success-path test for the switch (a_saved_http3_write_waits_for_the_next_captured_authority), the twin of the onemainhas for auto sign-in.a3ca73237:make checkdeleted a built package.print-curlstack-prunewas missing fromQUERY_GOALS, andci/test_deploy_manifest.pyasks for it withCURLSTACK=1, so in a checkout holding a default build the parse reset the stamp and removedpkg/plxnativeand the staged libraries. CI never saw it because its runners start with nopkg/. It is a query goal now, andci/test_arm_profile.pyseeds a build and checks both curl-stack queries leave it alone (it fails against the old Makefile).237765118: the stack's build trees undervendor/({openssl,nghttp2,nghttp3,ngtcp2,curl}-{src,build,prefix},openssl-stage,curl-link-shim,curlstack-built) were not in.gitignore. They are now, slashless like the FFmpeg entries, andtools/build-gc.shclassifies them as build output, whichci/test_build_gc.pyrequires of every new pattern. My build lane had a localinfo/excludeforvendor/, which is how I missed it.15bf11f2b:net::bundled_curl,net::bundled,net::http3_switchandnet::alt_svcjoin the globals rule inci/check-deps.sh("When you add a registry reader, add its name to the rule in the same change"), the waydevcaps::capswas added, with a harness test that plants each import shape. No machine calls them, so no ledger line is seeded and the site count is unchanged (19). Also corrects a comment incurlio.rsthat said the Feed'sff::bootbinds the multi table at start-up; nothing calls that onmain, so it binds at the first media open, still afternet::global_init.58fd0c06b: thecross-build-curlstackcache key now includes the runner's cmake and patchelf versions, whichci/build-curlstack.shalready keys its tree on. Without them a runner image update would have left every later run building cold (correct output, slow).Two choices worth a second opinion:
session::set_http3_experimentalis an unguarded install-scope write, likeset_ui_resolutionandset_language, not account-guarded like auto sign-in. The row isInstallscope andplex/CLAUDE.mdsaysInstallrows are never account-bound; the "not kept across a sign-out" behaviour is on the read side.Earlier revisions
Merged
main(3309be023, mergee31c50039; the range transport now lives inplx_net::range_io);d7f2849cd(make: flag variables defined before the build stamp);d173650f9+b3bbcd63d(theSettings switch, first as a library selector);
a4d613724(final semantics above: the bundle is alwaysbound, the switch gates only Alt-Svc/HTTP/3);
eb5516d7c(tests and comments).9bfa93bcdmergesmainagain (8e486d1a2). Its two conflicts were both new Settings rows,main's and this branch's, landing in the same places.Revision to
7040caec5:7040caec5: a bundled media transfer that may be HTTP/2 closes its connection. With Net: a seek that cancels an HTTP/2 transfer dials a fresh connection #1289's rule, the bundledcurl's HTTP/2 seeks were still 1.7x HTTP/1.1 on a webOS 5.6.2 set (254 against 148 ms, clean path, 8 Mbit/s), with up
to four abandoned connections left open; firmware 7.61 asked for HTTP/2 under the same rule was not slowed. Such a
transfer (origin last heard over HTTP/2, or not yet heard from while Alt-Svc cannot route the handle to QUIC; never on
a source reopened for HLS) is now set
CURLOPT_FORBID_REUSEbeforecurl_multi_add_handle(on a transfer in progresscurl_easy_setoptis undefined), so its connection closes with it andstop()records no busy mark: 136 ms, 0.92xHTTP/1.1. Firmware libcurls are unchanged.
closes_after_transferis a pure function with its own test; the redirecttest's doc and
finish_redirect_body's doc now say a hop the rule chose costs its next hop a dial.Previous revision (to
9aaad044d):afcec3dc5mergesmain(93697adcf). One textual conflict, indocs/agent-reference.md'sdynlibcallersparagraph. One semantic fix the merge needed:
main'snet::connect_only(Net: the WebSocket transport over libcurl CONNECT_ONLY #1283) bound its table from the systemcandidates (
raw::load(None)) while its easy handle comes fromnet::curl_easy_init, i.e. the bundle in aCURLSTACK=1build. It now binds fromnet::bundled_curl()ascurliodoes.e144734cc: the source scan above (it fails againstraw::load(None)).ConnLedger::saw_version(from Net: a seek that cancels an HTTP/2 transfer dials a fresh connection #1289)ends a busy HTTP/2 mark when the origin answers over HTTP/3, so an origin Alt-Svc has moved to QUIC no longer
dials a fresh QUIC connection per request for 120 s. An HTTP/1.1 answer keeps the mark. Docs.
f3e2577f8:make CURLSTACK=1 deploywas broken sincef75f1eb55. The command that retires stale stacklibraries sat inside
$(if $(CURLSTACK),...), and make counts parentheses in a function's arguments, so thecasepatterns'
)ended the$(ifand the shell got half a command (unexpected EOF). No gate runsdeploy, and theearlier device runs installed the
.ipk. It is now a variable,CURLSTACK_PRUNE.ci/test_deploy_manifest.pyasks
print-curlstack-prunefor it and hassh -nparse the command and its remote script; against the old textthe query fails the same way the deploy did.
9aaad044d:curlio's module doc andBUSY_FOR's doc say an HTTP/3 answer ends the mark.Gates
Head
58fd0c06b, basemainat8e8330ab0(the merge base). Apple M1, toolchain 1.100.0, tree clean before and after (git status --shortempty, and no untracked file outside what the tracked.gitignorecovers). The whole set ran on58fd0c06b.make check:==== check: 136 steps — all ok ====.make check-nodef: exit 0.python3 ci/test_ci_workflows.py:Ran 99 tests … OK.python3 ci/test_deploy_manifest.py:Ran 6 tests … OK.make ARM_PROFILE=release FLAVOR=debug ipk):PASS actual IPK: 8 ELF files,all packaging assertions passed;ci/check-elf.sh:all ELF assertions passed; size budget ok.… CURLSTACK=1 …):PASS actual IPK: 15 ELF files,all packaging assertions passed;check-elf.shpassed;ci/check-curlstack-elf.sh:all curl-stack ELF assertions passed; size budget ok (18,334,440 of 20,000,000 bytes).cargo +1.100.0 test --lib -p plx_base -p plx_net -p plx_media --features plx_net/http3-curlstack):plx_base254 passed,plx_media2136 passed (104 ignored),plx_net344 passed, 0 failed.tools/fwcompat.py --min-release 4.4.2on theCURLSTACK=1ARM binary: exit 0.pr-revieweron the combinedmain...headdiff, repeated after each fix until it returned "No findings." (on58fd0c06b). Each of its findings is one of the commits above.HOST_ONLY_GOALScase against the old Makefile (print-curlstack-prune), and the.gitignoretying test with the patterns added but without thebuild-gc.shline.fw-compat-revieweranddoc-claim-auditoragents (last run on7040caec5; no symbol,dynlib!entry,DT_NEEDEDor loader line has changed since, andfwcompat.pyabove covers the binary). Not run locally: the font audit andwebosbrew-ipk-verify(CI only).Device verification
Not repeated on
58fd0c06b, deliberately. Nothing in this revision changes what goes over the wire or how a connection is made, kept or closed: our only edit underrust-modules/netis a comment, and what the merge brought into that crate frommainis the throughput probe accepting a 200 from byte zero (#1339), a test fixture'sclose_notify, and tests. The runs below are on7040caec5and earlier and still describe the transport.On
7040caec5: the webOS 5.6.2 set (HTTP/1.1 firmware curl, the case the fix is for),make CURLSTACK=1 deploy(debug), switch off, a direct play from our PMS through an HTTPS reverse proxy.
libcurl-plx.so.4 (libcurl/8.23.0 OpenSSL/3.5.9 …) … legacy-locks=Installed, loggedHTTP/3 (experimental) is off — Alt-Svc is not setandcurlio: bound libcurl-plx.so.4 curl_multi_* (7 symbols).HTTP/2.0. The app held one established connection (its socketinodes against
/proc/net/tcp) through playback and two seeks; each seek reopened in 19-20 ms (ff: seek_cb reopen … ms=19,ff: seek 177s rv=0 ms=19), and nofresh connectionline was logged (the rule closesthe connection instead of marking it busy).
Earlier, on
9aaad044d: a webOS 10.3 set,make CURLSTACK=1 deploy(debug), signed in, playing from our PMS throughan HTTPS reverse proxy.
libcurl-plx.so.4 (libcurl/8.23.0 OpenSSL/3.5.9 zlib/1.2.11 nghttp2/1.71.0 ngtcp2/1.26.0 nghttp3/1.19.0; AsynchDNS=yes); threaded-tls=true legacy-locks=NotNeeded, and loggedHTTP/3 (experimental) is off — Alt-Svc is not set.curlio: bound libcurl-plx.so.4 curl_multi_* (7 symbols). An H.265 direct play resumed, played (timeline playing t=1892s … t=1903s), and a seek landed(
ff: seek_cb reopen … ok=true ms=406,ff: seek 1912s rv=0 ms=407). Net: a seek that cancels an HTTP/2 transfer dials a fresh connection #1289's rule fired on the bundle'sHTTP/2 (
curlio: fresh connection for range=… (a cached HTTP/2 connection to this origin carries a cancelled stream …)).net: curl rc=35 — TLS handshake failedand onenet: curl rc=28 — timed outbeforeauth: reached … via https://<host>. I did not compare this with a system-libcurl boot on the sameset, so I'm not claiming they are unrelated to the bundle.
Earlier, on
a4d613724: a webOS 10.3 set, genericCURLSTACK=1debug package, sha25675d551eb534d34b06df1a848f1315bed64adc92f73690e79731beb4d368805bb, synthetic token against a mock server(no account).
libcurl-plx.so.4(libcurl/8.23.0 OpenSSL/3.5.9 …); loggedHTTP/3 (experimental) is off — Alt-Svc is not set; no Alt-Svc cache file.HTTP/3 (experimental) is on — Alt-Svc is set on strict requests; the Alt-Svc cache file was created.9aaad044dabove for the mediaplane).
Earlier head
29f330ad(before the switch existed, so HTTP/3 was always available in the bundle):webOS 10.3 set, 5 launch/close cycles bound the bundle with
legacy-locks=NotNeeded; the reverse proxy'slog showed 43 requests from the set as
HTTP/3.0; removing the bundle fell back to the system libcurland Home loaded, as did removing one dependency. Carried over, not repeated.
webOS 5.6.2 (OpenSSL 1.0.2 in-process), packages from before the merge and the switch: the
firmware's
libcrypto.so.1.0.2/libssl.so.1.0.2were mapped besidelibcrypto-plx.so.3/libssl-plx.so.3;5 cycles bound
libcurl/8.23.0 OpenSSL/3.5.9, reached Home, no crash; a later package loggedlegacy-locks=Installed. One boot stayed up more than three minutes and then played video without acrash. Carried over, not repeated.
Translations
The new row title and help text are in all 12 catalogs. 11 of the 12 are AI drafts pending native review
(
docs/localization.mdrequires it); English is the exception.Not verified
/etc/ssl/certsholds OpenSSL hash links on every firmware (present on the webOS 10.3 set).http3-curlstackbuild; host tests covertheir pure decision functions, the device runs the rest.
build-bench
make build-bench ARGS="--runs 1 --cold", one run each, onmain8e8330ab0(base) and then2bea7f310(head), Apple M1, rustc 1.100.0. The commits after2bea7f310touch only CI scripts, tests, docs,.gitignore, one Makefile list entry and one comment, none of which the build compiles. The host was loaded during both runs (the tool warns "these numbers are noisy"), so read the rows against each other, not as absolute times.plx_base, non-incrementalplx_machineplx_platformplx_gfxplx_netplx_uiplx_plexplx_telemetryplx_dataplx_sessionplx_mediaplx_appkitplx_screenscoldstart.rs)plx_ui lib.rs, non-incrementalplx_base, incrementalplx_ui lib.rs, incrementallib.rs)Nothing in the default build got slower beyond noise. The
armrow has no base number: the base worktree had no ARM staticlib to rebuild, so the tool skipped it there.Signed-off-by: fraygox [email protected]
🤖 Generated with Claude Code