Repository navigation
[bp/1.39] CI/CVE/deps/wasmtime/flake stack - #49205
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
WORKSPACE-only changes bypass all CTO/GCC checks, and consumedBytes() introduces allocations on tcmalloc/gperftools builds that escape the allocation-free callback assertion.
2 open issues
What changed in this PR
Backports independent compile-time-option and GCC checks to release/v1.39, alongside fixes needed by configurations that previously did not run.
Changes:
- Splits compile-time options and GCC build/test checks into path-selected jobs, leaving Wasmtime disabled.
- Fixes jemalloc accounting and adapts tests for disabled memory measurement and admin functionality.
- Routes fatal-signal diagnostics directly to stderr, increases alternate-stack capacity, and documents the behavior change.
| File | Description |
|---|---|
tools/spelling/spelling_dictionary.txt |
Adds vocabulary used by signal-stack documentation. |
test/server/backtrace_test.cc |
Tests stderr output and log-sink bypass. |
test/server/admin/server_info_handler_test.cc |
Adds expectations for jemalloc statistics. |
test/integration/base_integration_test.cc |
Handles listener diagnostics without admin functionality. |
test/extensions/filters/http/bandwidth_share/filter_integration_test.cc |
Skips an admin-dependent runtime-update test when admin is disabled. |
test/extensions/dynamic_modules/bootstrap/integration_test.cc |
Skips the admin-handler test when admin is disabled. |
test/extensions/access_loggers/stats/stats_test.cc |
Allows negative allocation deltas in the cleanup assertion. |
test/common/signal/signals_test.cc |
Tests fatal-signal descriptions. |
test/common/memory/memory_test_utility.h |
Returns zero when memory measurement is disabled. |
test/common/memory/heap_shrinker_test.cc |
Checks reserved-memory ordering and jemalloc shrinking. |
source/server/backtrace.h |
Adds decoder-compatible stderr diagnostics. |
source/common/signal/signal_action.h |
Sizes the alternate stack with runtime-aware headroom. |
source/common/signal/signal_action.cc |
Uses allocation-free signal descriptions and bypasses logging. |
source/common/memory/stats.cc |
Includes jemalloc retained pages in reserved memory. |
ci/README.md |
Documents the split CTO and GCC targets. |
ci/do_ci.sh |
Implements independent CTO subtasks and GCC build/test targets. |
changelogs/current/minor_behavior_changes/logging__fatal-signal-backtraces-stderr.rst |
Documents the need to capture stderr for fatal backtraces. |
changelogs/current/bug_fixes/memory__jemalloc-reserved-accounting.rst |
Records the jemalloc accounting fix. |
changelogs/current/bug_fixes/logging__fatal-signal-backtraces.rst |
Records fatal-reporting and alternate-stack fixes. |
changelogs/changelogs.yaml |
Registers the memory changelog area. |
.github/config.yml |
Enables path-selected CTO and GCC job flags. |
Review effort: Balanced
08ee827 to
425fe14
Compare
425fe14 to
e7f17b3
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Platform-sensitive crash-path changes require human review of nested-signal and allocator-failure validation, along with the release risk of deferring the signal-safe writer follow-up.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
e7f17b3 to
a6d6067
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Production fatal-signal and alternate-stack changes require supported-platform death tests unavailable in this environment and human confirmation of platform and nested-signal behavior.
No open issues 🎉
Review effort: Balanced
|
/retest |
|
will pick #49207 here or after dep on when it lands |
…ps (envoyproxy#48479) this is yet another attempt to fix endemic dfp flakiness - which is apparently a code rather than test problem Signed-off-by: Ryan Northey <[email protected]> Backport note (release/v1.39): the new tests use `EXPECT_TRUE(....ok())` rather than `EXPECT_OK`, as the rest of this branch's `cluster_test.cc` does (it does not include `status_utility.h`). (cherry picked from commit c04db74) Signed-off-by: Ryan Northey <[email protected]>
The CI logs of this branch are mostly the warnings of a few external dependencies, each repeated with its context for every file, and again as annotations: - V8, which this branch builds from source, redefines the ASAN interface's macros in every file that includes its heap: ~1400 `-Wmacro-redefined` warnings with their include chains, which is ~30k of the ASAN job's ~36k lines; - proto-processing ignores `nodiscard` results (~60 `-Wunused-result` warnings in every job that compiles it); - a handful each from grpc, protobuf (also when built for the host), simdutf, c-ares, libprotobuf-mutator and sql-parser. `main` and `release/v1.40` do not have these: the dependencies are fixed or patched as modules there, and V8 is prebuilt (envoyproxy#48631 and envoyproxy#48838 are their equivalents for what is left). Here they are suppressed for the files of those repositories only, with this branch's (WORKSPACE) repository names. Signed-off-by: Ryan Northey <[email protected]>
0.4.13.post4 has, backported to the WORKSPACE line (envoyproxy/toolshed#5616): - `oci_base_edit`, `compressed_tar` and a hermetic pigz, to build the release container images with rules_oci, and to gzip with all the cores; - `setup_libcxx_libs(llvm_version = ...)`, to cross-compile with the libc++ of this branch's LLVM. It is also on toolshed's bins v0.2.34. Signed-off-by: Ryan Northey <[email protected]>
The libc++ bundles to cross-compile with (`cxx_cross_lib`) came from toolshed's default, which is for its LLVM (22.1.8), while this branch compiles with LLVM 18.1.8: a cross-compile (eg arm64 from x64, as `ci/do_ci.sh release.multiarch` does) then has LLVM 18's libc++ headers with LLVM 22's `__config_site`, and fails. This selects the 18.1.8 bundles, from the last bins release that published them (0.1.59), with `setup_libcxx_libs(llvm_version = ...)`. Signed-off-by: Ryan Northey <[email protected]>
The debs' data (`data.tar`, which every dpkg reads) is gzipped with the toolshed's hermetic pigz (`compressor = "@envoy_toolshed//pigz"`, `-n` for reproducibility), so `data.tar.gz`: the debs are a fraction of the size, and quicker to package (`pkg_deb` copies the data, and hashes the deb for the `.changes`), bundle, checksum, sign and upload. In envoy-ci-staging, on a 2-core runner, MakeDeb and the packaging around it were among the steps the client was CPU-starved on; pigz uses every core. Signed-off-by: Ryan Northey <[email protected]> Backport note (release/v1.39): with toolshed's pigz set up for WORKSPACE (`setup_pigz()` and `load_pigz_toolchains()`, `bazel/repositories_extra.bzl`). (cherry picked from commit e70d9f9) Signed-off-by: Ryan Northey <[email protected]>
It should be noop for Linux or OS/X and will not be needed with bzlmod. Risk Level: none Testing: build Docs Changes: no Release Notes: no Platform Specific Features: windows only Signed-off-by: Yan Avlasov <[email protected]> Backport note (release/v1.39): for the `rules_shell` toolchain that rules_oci's `oci_image` resolves (it is not registered otherwise with WORKSPACE). Only the `rules_shell` lines apply: the protobuf toolchain lines around them on `main` are not on this branch. (cherry picked from commit 68f9cc8) Signed-off-by: Ryan Northey <[email protected]>
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.39): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
3ddfa24 to
ab65d43
Compare
|
quite a few of the picks are not straight backports as 1.39- is non-bzlmod |
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.39): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
`ci/do_ci.sh release.multiarch` builds both arches in one job, from an x64 host. On `main` the arm64 half is cross-compiled on x86_64 workers, but this branch still builds a number of dependencies with `rules_foreign_cc` (ICU, LuaJIT, libevent, nghttp2, ...), whose build systems run what they compile, and can not be cross-compiled as they are: configure: error: cannot run C compiled programs. Here the arm64 binaries are built on arm64 workers instead, natively, as the arm64 release job of this branch builds them: - `@llvm_toolchain_arm64` is the LLVM toolchain for actions that run on Linux arm64 whatever the host is, registered for this build only (`--extra_toolchains`), so nothing else fetches it; - `bundled`, which every release binary is built through, prefers an arm64 execution platform for an arm64 build (`//distribution/binary:arm64-exec-platform`). Only the binaries are built there. What packages them (the images, the packages, the tarballs) is outside `bundled`, so it runs as on `main`: locally on the host, and out of the remote cache. The strip is the one step that could not stay as it is: a binary's `.stripped` is stripped by the toolchain of the platform it was built on, and the host can not run the arm64 workers' strip. `release.multiarch` strips with the host's toolchain instead (`host_stripped`, `//distribution/binary:host-strip`), which strips a binary of any arch, locally, as the strip of other release builds is. `--//bazel:multiarch` is not set, so the arm64 binaries are built on the arm pools. Signed-off-by: Ryan Northey <[email protected]>
V8 generates its inspector files with a `local` genrule, which runs its
(hermetic) Python on the host, whatever the execution platform is. When
the binaries are built on other workers than the host's (the arm64 half
of `ci/do_ci.sh release.multiarch`, on arm64 workers from an x64 host),
that is the Python of the workers, which the host can not run:
.../_code_generator.venv/bin/python3: Syntax error: "(" unexpected
The generator only reads its inputs and writes its outputs, and its
Python is hermetic since envoyproxy#41959, so it can run where the rest of the
build does.
Signed-off-by: Ryan Northey <[email protected]>
The dynamic modules SDK's bindgen loads `libclang.so`, and the built-in modules' symbols are renamed with `objcopy`, both from the LLVM distribution of the host (`@llvm_toolchain_llvm`). When the arm64 binaries are built on arm64 workers from an x64 host (`ci/do_ci.sh release.multiarch`), those are x64, and do not run there: Unable to find libclang: "the `libclang` shared library at .../external/llvm_toolchain_llvm/lib/libclang.so could not be opened" `//bazel:arm64_workers` (set by the transition that moves the build to arm64 workers) selects the arm64 distribution (`@llvm_toolchain_arm64_llvm`) for them. Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. envoyproxy#49294 added the `.dwp`s with their debug sections compressed (zlib, which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
…#49202) envoyproxy#49099 added `waitUntilListenersReady()` before two tests connect, but that can return immediately here: the fixture clears the static listeners, and the server's pending listener count is only set once the server is ready, which in these tests is after the listener finishes warming. The client can still connect before the workers have the listener, and the test then times out waiting for `network_extension_config_missing`. Also wait for `listener_manager.workers_started`, as the other tests in this file already do after `waitUntilListenersReady()`. Deflake runs of `BasicFailWithoutDefault` and `ConfigUpdateDoesNotApplyToExistingConnection`, 1000 runs each: | | default | tsan | | --- | --- | --- | | main | 4 failed | 30 failed | | this change | 0 failed | 0 failed | All of the failures were `BasicFailWithoutDefault`, timing out on `listener.listener_stat.network_extension_config_missing`. Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 8def710) Signed-off-by: Ryan Northey <[email protected]>
This commit removes the use of the RTLD_DEEPBIND option when the compat layer loads the OpenSSL shared libraries. As a replacement, the compat layer is now built with the -fvisibility=hidden option instead. This has the same effect of preventing OpenSSL code linking against the compat layer symbols instead of it's own. This change has been made, in preparation for adding an ASAN build of the compat layer, because the dlopen() wrapper that ASAN injects, does not work with the RTLD_DEEPBIND option. Also added a test to confirm that compat layer symbols are not dynamically visible (preventing the subtle misresolution bugs that RTLD_DEEPBIND was originally introduced to solve). --------- Signed-off-by: Ted Poole <[email protected]> (cherry picked from commit 8d2521b) Signed-off-by: Ryan Northey <[email protected]>
…envoyproxy#48956) Commit Message: openssl: create SSL object once per thread in SSL_get_cipher_by_value Additional Description: OpenSSL can only look up a cipher through an SSL object. The compat implementation of SSL_get_cipher_by_value created and freed a new SSL_CTX and SSL on every call. Envoy calls it once per offered cipher suite during TLS 1.2 certificate selection, meaning a single handshake could create many SSL_CTX objects. This change creates one SSL object per thread on first use, with a `thread_local bssl::UniquePtr`, and reuses it for later lookups on that thread. OpenSSL does not guarantee that SSL_CIPHER_find() is thread safe, so threads do not share the object. It is freed when its thread exits. Fixes envoyproxy#48858 Risk Level: Low (only affects --config=openssl builds) Testing: ```bash bazel test --config=openssl //compat/openssl/test/... bazel test --config=openssl //test/common/tls:ssl_socket_test //test/common/tls:context_impl_test ``` Micro-benchmark (10,000 calls to SSL_get_cipher_by_value(0xC02B), --config=openssl): - before: 188.77 us/call - after: 0.34 us/call (~550x faster) *The thread_local version benchmarks about the same.* Docs Changes: N/A Release Notes: N/A AI Disclosure: Claude Code was used to help explain the codebase, simplify the implementation, write the throwaway benchmark, and draft this description. I have reviewed, tested, and understand all of the code in this PR. --------- Signed-off-by: NMJlam <[email protected]> (cherry picked from commit 3d18e34) Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Jonh Wendell <[email protected]> (cherry picked from commit a379441) Signed-off-by: Ryan Northey <[email protected]>
ab65d43 to
8aaacfa
Compare
The test built four Docker environments (host GCC, the LLVM prerequisites, both, neither) and checked which toolchain each got. The environments were built by installing packages into a stock Ubuntu image from the `ubuntu-toolchain-r/test` PPA, which often returns 503s. Of the last 60 runs of the workflow 10 failed, and every failed job sampled (12) died in that image build; none was a toolchain test failure. The toolchains are hermetic now, so the environment does not decide anything: the default is the LLVM toolchain and `--config=gcc` the GCC one, and both are what the rest of CI builds with. Removed: - the `Toolchain default behavior test` workflow (`.github/workflows/toolchain-test.yml`) - `ci/matrix` - `//tools/toolchain:detect`, which only the test used - the Dependabot entry for the test's Dockerfile What only this test covered is the explicit host GCC override, `gcc.host` (still documented in `bazel/README.md`): nothing in CI builds with a host GCC. Its other checks (which compiler and standard library a build gets, that `//bazel:gcc_build` matches with `--config=gcc`, the hermetic GCC's sysroot) are not asserted elsewhere, but the clang and gcc CI jobs build and test everything with those toolchains and their compiler-specific options, and would break if the wrong one was used. Backport note (release/v1.39): the files differ on this branch, and are removed as they are here. The GCC toolchain is not hermetic on this branch, so the test did cover the default here; it is removed all the same, as its environments fail to build from the PPA. (cherry picked from commit 1e33223) Signed-off-by: Ryan Northey <[email protected]>
|
Landed on GitHub does not rebase-merge a pull request with more than 100 commits ("This branch can't be rebased"), and this one has 105. The branch was already on the tip of GitHub has marked the pull request as merged as a result. (bot assisted) |
… ones (#49321) Stacked on #49205 (the branch carries its commits until it lands): this is the last two commits, a port of #46986 (canonical pool names) and the pins. The release/v1.39 counterpart of #49078, regenerated from a measurement of release/v1.39 itself rather than picked: v1.39's targets and peaks differ from main's. Pins use the per-configuration `rbe_pool` spec of #49081, with the `link` pools and the `cto`, `openssl` and `fuzz_coverage` configurations of #49313 (both on this branch), on top of the canonical pool names of #46986 (the previous commit). Data: every CI job of release/v1.39 (with #49236's gcc-ci) run once in envoy-ci-staging#2173 (2026-11-16), every remote action on the large pool with the pins neutralised and every compile and link forced to execute, peak RSS from the EngFlow traces. That covers the opt, asan, tsan, msan, gcc, coverage, fuzz coverage, compile-time options and OpenSSL jobs, and the API, config, format, deps and release jobs (as `default`), including `//contrib/...`. Each pin is the smallest pool clearing the target's peak with 5% headroom for compiles, 10% for links and 20% for tests, for every configuration and action exactly: as #49313 has it, an action a spec does not name runs on the default pool, so a pool is named only where an action needs more, and a configuration that needs less than the target's `default` spec is spelled out too (with the `default` pool where it needs no more), so that no measured action asks for more than it measured. An action a configuration has no data for gets what the target's `default` configuration gets. Generated with `rbe_report.py pins`, as #49315 is for main. The coverage links of 343 targets, the fuzz coverage links of 57, the tsan links of 7 (the big binaries: `envoy-static`, `config_test`, `router_check_tool`, `all_extensions_build_test`, `extra_extensions_test`, `server_fuzz_test` and `config_fuzz_test`, at 12.5-13.7GB) and the msan test of `//test/common/router:config_impl_test` (12.9GB) need more than the large pool (12GiB) with headroom; they are pinned to xlarge, each marked with its measured peak, so they no longer rely on EngFlow killing and retrying them on a larger pool. They should be brought down, but until then the pin says what they need. The fuzz coverage link of `//test/server:server_fuzz_test` (26.4GB) is over even xlarge with headroom, and is marked so. No compile needs more than large. Result: 200 pins added, 1503 changed, 60 removed (on `source/`: 9 removed, 1 changed). The loop-defined codec fuzz tests in `test/common/http` are pinned by hand from the measurement (their `_lib`s compile at ~3.3-3.9GB, 5.3GB with gcc, their tsan links at ~3.9GB, their fuzz coverage links at ~12.6GB). The router check, schema validator and config load check tools are pinned in `tools/`, where #49262 (on this branch) moved them. Tests pinned for CPU rather than memory keep their cores: the 55 tests on release/v1.39's `2core` and `4core` pools (#36784, #36837), renamed medium and large by the previous commit, have their test action on the smallest pool with at least those cores (medium ~2, large ~4: the actions a pool's RAM limit packs onto a machine) that fits their memory. Libraries that had such a pin are sized by memory only (a compile uses one core). Acceptance: CI traces show every action's used pool equal to its requested pool and no exit 137. --------- Signed-off-by: Ryan Northey <[email protected]>


Brings
release/v1.39up to the CI and the release pipeline thatmainandrelease/v1.40run, with the dependency and CVE updates and the wasmtime re-enable it needs to pass. Supersedes #49061, whose commits are all here.The
compile_time_optionstarget on this branch exited after the wamr run, so the jemalloc, admin-disabled, release-assert and logging-disabled runs have never executed here. They now do, and the fixes they need come first:CI layout. These are ports rather than cherry-picks, as this branch's
ci/do_ci.shand config differ too much frommain:cto.jemallocname from ci/cto: Renamecto.basetocto.jemalloc#49188)openssl.asantarget of compat/openssl: Add post-merge ASAN build of compat/openssl tests #49007)coverage.fuzzas the name of thefuzz_coveragetarget (ci/coverage: Addcoverage.fuzzas the name of thefuzz_coveraget… #49177)CVE scanning and dependencies:
c-ares-> 1.34.9 (deps: Bumpc-ares-> 1.34.9 #48799)envoy_toolshed-> 0.4.13.post3 (which also carries the WORKSPACE coverage tools of bazel: Backport the coverage merger and llvm-cov wrapper to WORKSPACE toolshed#5588, with their Bazel 7 merge of bazel/coverage: Merge without Bazel's merger when it is not staged toolshed#5591), and use its CVE scanner (port of deps/tools: Use toolshed CVE scanner #48777, with the CVE Program data of ci/cve: Include CVE Program (cvelist) data in the scan/fetch #49051)OVERWRITE_ALL_CVE_DATAto the fetcher step (github/ci: Pass OVERWRITE_ALL_CVE_DATA to the fetcher step via GITHUB_ENV #47858)Coverage:
Rust and wasmtime, so that the wasmtime tests build and run here:
rules_rustsysroot fixes and the clippy fixes they needwasmtime-> 49.0.5, with fixes to its build on this branch (the c-api build script, the symbol-prefix genrule, host function signatures) and to the proxy-wasm Rust SDK's import moduleTests:
test: Only build win32_scm_test on Windows (test: Only build win32_scm_test on Windows #48922), with
target_compatible_withforenvoy_cc_test(bazel: add target_compatible_with to envoy_cc_test #48813)test: Pin two heavy GCC compiles to the
6gigRBE poolDeflake ext_proc_observability_integration_test (Deflake test //test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test #47390)
tls: Allow connection teardown even when cert selection is not yet complete (Allow connection teardown even when cert selection is not yet complete #46676), for the
ENVOY_BUGthat abortsssl_integration_testunder tsantests/wasm: Refactor to improve CI efficiency (tests/wasm: Refactor to improve CI efficiency #48681), resolved against this branch rather than picking its prerequisites:
getSha256Digest()keeps this branch's signature,envoy_wasm_cc_binarykeeps its@envoy//labels, and the tests for wasm: fix multiple bug of vm key and plugin key calculation #46893 (not on this branch) are left out. No production code changes.test/wasm: Drop the filter integration test size, sharding and pool (test/wasm: Drop the filter integration test size, sharding and pool #49076)
http2: deflake DownstreamConnectionDurationTimeoutTriggersFloodProtection (http2: deflake DownstreamConnectionDurationTimeoutTriggersFloodProtection #49209)
test/ext_proc: Deflake the HTTP client integration tests (test/ext_proc: Deflake the HTTP client integration tests #49215)
test/listener_ecds: Wait for the workers before connecting (test/listener_ecds: Wait for the workers before connecting #49219)
test/ext_proc: Deflake the HTTP/1 streamed response body tests (test/ext_proc: Deflake the HTTP/1 streamed response body tests #49232)
test/on_demand: Warm the VHDS-with-body listener instead of timing out (test/on_demand: Warm the VHDS-with-body listener instead of timing out #49070)
stats: Clear histograms during shutdown (Clear histogram during shutdown; check if shutting_down_ before appen… #47394), for the
histograms_to_cleanup_.empty()assert at teardown ofsds_dynamic_integration_testin the compile-time options job. Shutdown path onlyThe test deflakes from
release/v1.40([bp/1.40] Test deflakes and optimisations #49200, [bp/1.40] Flake and CI stack #49234) that apply here as they are: shadow policy timeouts (test: use DefaultTimeout for waitForCounter in shadow policy tests #48352), HttpInspectorTest (test: mock close on fake socket in HttpInspectorTest #48495), filter_chain_benchmark_test use-after-free (listener: fix use-after-free in filter_chain_benchmark_test at exit #48757), RstStreamOverflowOnPendingFlushTimeout (http2: deflake RstStreamOverflowOnPendingFlushTimeout #48791), the uber filter destroy callback (fuzz: clear the uber filter's destroy callback on reset #48794), xds_integration_test (Deflake //test/integration:xds_integration_test #48634), on_demand cert_active (test: Wait for cert_active before interrupting the on_demand handshake #48967), XfccIntegrationTest (test: Deflake XfccIntegrationTest.TagExtractedNameGenerationTest #49036, with the integration test cleanup barrier it uses,IntegrationTestServer::waitForWorkerThreads, from Integration test deflake attempt #47096, picked ahead of it), test/protocol drain timer (test/protocol: Stop waiting on the stats flush and drain timer, drop … #49075), network ext_proc close assertions (test: Deflake network ext_proc connection-close assertions #49024), the kv_store restart helper (test/kv_store: Fix the shutdown race in the restart helper #49080, test/kv_store: Restart the SDS upstream on the same port #49128), abi_impl_test sharding (test: Shard dynamic_modules abi_impl_test #49141), network_ecds listener wait (test/network_ecds: Wait for the listener before connecting #49099), the ratelimit cleanup use-after-free (test: Fix use-after-free flake in ratelimit integration test cleanup #49172), sds_dynamic (test/sds_dynamic: Stop waiting out the SDS initial fetch timeout #49073), ext_proc ObservabilityModeWithLogging (ext_proc: deflake ObservabilityModeWithLogging #48789)release/ci: Split verify from publish (release/ci: Split verify from publish #49261): only the
.github/config.ymlchange, for theEnvoy/Verifycheck the workflows onmainnow runbazel: Select RBE pools per configuration (bazel: Select RBE pools per configuration #49081):
rbe_pooltakes a pool per configuration (asan, tsan, msan, coverage, gcc) and per action (buildfor compile and link,test). Resolved against this branch's macros, which selected the pool inline onrepository + "//bazel:engflow_rbe_x86_64"; every such select is nowenvoy_exec_properties.ci/gcc: Build and test with -c opt and no fission (ci/gcc: Build and test with -c opt and no fission #49236), as on
mainandrelease/v1.40, without the LLD-z nostart-stop-gclink option (GCC links with gold here). Its pool pins come from a measurement of this branch (envoy-ci-staging#2173).gcc/ci: Quieten logging (gcc/ci: Quieten logging #48631): its external-dependency warning suppressions, with this branch's (WORKSPACE) repository names, and dd-trace-cpp's
-Wmaybe-uninitialized, which this branch's GCC reports at-c optbazel: Add RBE pool keys for links and more configurations (bazel: Add RBE pool keys for links and more configurations #49313),
linkpools and thecto,opensslandfuzz_coverageconfigurations, for this branch's measured pins.bazel: Quieten the warnings of external dependencies (this branch only): V8's
-Wmacro-redefinedunder ASAN (most of that job's log, as V8 is built from source here), proto-processing's-Wunused-result, and a few each from grpc, protobuf, simdutf, c-ares, libprotobuf-mutator and sql-parser. The equivalents onmainandrelease/v1.40are gcc/ci: Quieten logging #48631 and bazel: Improve log/warning suppression #48838, where the dependencies are fixed as modules and V8 is prebuilt.From [bp/1.40] Flake and CI stack #49234 (now on
release/v1.40):lockfilesandregistrytasks, with this branch's toolshed actions-v0.4.17 pin, and thewipinput it reads (from bazel/ci: Add CI for registry/module updater (bzlmod) #48135, not on this branch)release/v1.40, with this branch's single-argumentcreateCodecClient_()strip, skip-list load and test runfiles pathhtmlandhtml_releasegenrulesonPeerDestroy(), with the connection test inconnection_compatbility_test.ccand not parameterized onenable_send_rst_on_user_space_socket(not on this branch)EXPECT_TRUE(....ok())in the new tests rather thanEXPECT_OK, as in the rest of this branch'scluster_test.ccAlso on
release/v1.40, and applying here as they are:ci: Remove the toolchain default behavior test (ci: Remove the toolchain default behavior test #49358), from
main: its environments fail to build from theubuntu-toolchain-r/testPPA, on every run here. This branch's GCC toolchain is not hermetic, so the test did cover the default here.The release pipeline of
mainandrelease/v1.40: the release binaries, container images and packages of both arches built, signed and published by one job (release.multiarch).envoy_toolshed-> 0.4.13.post4 (bazel: Backportoci,pigzandcompressed_tarto WORKSPACE, and allow the libcxx LLVM version to be set toolshed#5616:oci_base_edit,compressed_tar, a hermetic pigz, andsetup_libcxx_libs(llvm_version = ...), backported to the WORKSPACE line)rules_shelltoolchain thatoci_imageresolves.debarchives (same snapshot and hashes), and small local rules in place of rules_distroless'flattenandcacertsand tar.bzl'starrelease.signedkeeps this branch'ssetup_clang_toolchain, andengflow_rbe_aarch64only matches a single arch build, as this branch still has selects with both it andengflow_rbe_x86_64maincross-compiles the arm64 half on x86_64 workers, which this branch'srules_foreign_ccdependencies (ICU, LuaJIT, ...) can not be.bundledmoves the binaries to arm64 workers, with an LLVM toolchain for them; they are stripped and packaged on the host, as onmainlibclang.soand theobjcopyof the built-in modulesDifferences from
main:--define wasm=, as elsewhere on this branchcto.wasmtimeleaves out the built-in Rust dynamic modules (hickory DNS) and the static Rust test module: each is a Rust staticlib with its own runtime and they cannot be linked with wasmtime into one binary.mainreworked how Rust is linked instead (dynamic_modules: Link built-in Rust modules as prefixed rlibs #48473)RTLD_DEEPBINDthat ASAN does not support, but the job has not been run on this branchmain, which read the run flags from this branch's.github/config.yml(ci/dependency: Add a release-images task #49106 and github/ci: Verify the arm64 distroless images too #49306 are picked anyway, to keep the branch's copies in step withrelease/v1.40). The one workflow change is ci: Remove the toolchain default behavior test #49358's removal of the toolchain test, which runs from the branchrelease/v1.40(registry bumps, Bazel 9 compat, hermetic tools) do not apply to this branchstd::atomic_ref), which this branch's LLVM 18 toolchain does not haverelease/v1.40([bp/1.40] Test deflakes and optimisations #49200, [bp/1.40] Flake and CI stack #49234), which need adapting to this branch, are left for a follow-up