Repository navigation
Description
Summary
The agent binary's GNU build-ID does not change across builds. Two consecutively released agent images contain provably different binaries with the identical .note.gnu.build-id:
| image digest | binary sha256 | size | GNU build-ID |
|---|---|---|---|
agent@sha256:f91ccf74… (rev 187 fleet) |
c07da793… |
63,045,794 B | 498919aff001d8366249403a2544fba2d833084f |
agent@sha256:20f235e6… (rev 188 fleet, includes #647/#650) |
422b9bf0… |
63,111,330 B | 498919aff001d8366249403a2544fba2d833084f |
A content-derived build-ID (sha1 over the link) cannot collide across different contents — so whatever is producing this note is stamping a constant (or something derived from inputs that don't include the code).
Why it matters
The eBPF profiling pipeline (Pyroscope symbolizer, 2026-08-30) joins samples to symbols solely by GNU build-ID. With a stable-across-builds ID:
- uploading symbols for build N means build N+1's samples silently symbolize against build N's offsets → misattributed frames (the worst failure mode: wrong names, no error);
- there is no way to keep symbols for two agent builds side by side.
Found during the rev-188 deploy: the fresh symbol upload for the new agent binary was declined as "already exists", and the pre-existing upload (from the rev-187 binary) would have served wrong offsets for the running fleet. Mitigated operationally by deleting the uploaded debuginfo for 498919af… (Go frames self-symbolize in the profiler via pclntab, so only residual native/runtime-stub frames went back to hex — honest beats wrong).
Scope
- Affects the agent multi-call binary (agent / mesh-dns / supervisor comms — one ELF). Presumably all Go binaries in the repo built the same way (mesh-dns standalone, registrar, controller, cni) — verify.
- The proxy (envoy) binary is fine: its build-ID differs per build (md5-uuid from the hermetic LLVM toolchain today). The related hardening from the symbolization plan — pinning
--build-id=sha1explicitly inproxy/.bazelrc— is still open and can ride along here.
Where to look
rules_go link step: whether the external/internal linker gets a -B/--build-id flag and from what. Candidates: a stamped constant that doesn't vary, a toolchain default computing over stripped/stamp-independent inputs, or rules_go's reproducibility machinery pinning the note. Desired end state: build-ID = content hash of the link output (--build-id=sha1 semantics) for every released binary, plus (nice-to-have) a CI assertion that two different release binaries never share a build-ID — cheap to check against the previous release's manifest.
Acceptance
- Rebuild after any code change ⇒ new GNU build-ID on the agent binary.
- Symbol upload for a new release is accepted (not declined as duplicate).
- CI guard in place (or documented decision not to).
Activity
fix(proxy): stamp the custom Envoy's GNU build-ID with the release co…
fix(build): stamp the GNU build-ID with the release commit SHA (#651) (…
test(proxy): guard the shipped Envoy's symbol table, correct the 'str…
docs(observability): refresh profiling-symbols for content-hash build…
docs(observability): explain why profile symbols decay after a release (