Repository navigation
Description
Summary
#651/#652 fixed build-to-build build-ID constancy, but introduced (or rather, left) a binary-to-binary collision: because the ID is stamped to the commit SHA, every binary produced by a given commit shares one build-ID. Verified against the artifacts published from 4aabff27ace47e82c0df2e637e99e253442dc5a8:
| binary | image | GNU build-ID |
|---|---|---|
| agent (multi-call) | agent@sha256:47fa37d8… |
4aabff27ace47e82c0df2e637e99e253442dc5a8 |
| mesh-dns | mesh-dns@sha256:2e186f02… |
same |
| registrar | registrar@sha256:b3fc0d97… |
same |
| controller | controller@sha256:47a3383b… |
same |
| cni-install | cni-install@sha256:bee97fb5… |
same |
| aether-cni (plugin) | same image, /opt/cni/bin/ |
same |
| envoy (custom proxy) | aether-proxy:4aabff27… |
same |
Seven different ELFs, one ID.
Why this blocks the original goal
The whole point of #651 was Pyroscope symbol upload, which is keyed solely by GNU build-ID. With seven binaries sharing an ID, uploading debuginfo for any one of them makes the symbolizer resolve all seven against that binary's symbol table — six of them wrong, silently, with plausible-looking function names. That is strictly worse than no symbols.
Concretely: symbol upload is blocked today. I did not upload the 4aabff2 artifacts for this reason (the previously-poisoned 498919af… upload is already deleted; the still-valid 15e3b073… proxy upload predates the stamp and is unaffected).
Note this also means the pre-#652 collision was worse than #651 documented: 498919af… was shared by all Go binaries, not just successive builds of one.
Fix: make the ID per-binary, not per-commit
The GNU build-ID is specified as a unique identifier for a linked object, not for a source revision. Upstream Envoy's commit-SHA convention works for them only because they ship one binary per commit.
Options, best first:
- Content hash (
--build-id=sha1semantics). Canonical, self-verifying, matches debuginfod conventions, and unique by construction. For the proxy this is a one-word change to the ldscript approach (dropstamped=True, pass--build-id=sha1). For Go,tools/buildidalready rewrites the note post-link — have it writesha1(binary bytes with the note zeroed)instead of the commit. - Keep the stamp but namespace it per target:
sha1(commit_sha || target_label). Preserves "derivable from the release commit" (nice for automation: you can compute the expected ID for a given release+binary without the artifact) at the cost of not being self-verifying.
Either satisfies the property CI should assert, which the current guard does not: no two released binaries from the same build may share a build-ID. //tools/buildid:release_build_ids currently checks each ID equals the stamp — which is exactly the condition that guarantees the collision. That assertion needs inverting to pairwise-distinctness (plus, under option 2, equality to the expected per-target derivation).
Acceptance
- All seven released binaries from one commit have pairwise-distinct build-IDs.
- Two different commits still produce different IDs for the same binary (the agent binary GNU build-ID is constant across different builds — breaks profile symbolization by build-ID #651 property — don't regress it).
- CI guard asserts pairwise distinctness across the released set.
- Symbol upload for each binary is accepted and resolves to that binary only.
Activity
fix(build): derive the GNU build-ID from binary content so every rele…
chore(charts): pin aether-proxy to 4212e13 (tag + digest) (#655)
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697)
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697)
proxy: migrate to bzlmod on the Envoy main dev snapshot (#697) (#705)
docs(observability): refresh profiling-symbols for content-hash build…
docs(observability): explain why profile symbols decay after a release (
fix(build,chart): review hazards — authz failureMode guard (#770), bu…