Repository navigation
docs(observability): explain why profile symbols decay after a release - #663
Merged
Merged
Conversation
Continuous profiling resolves native frames by GNU build ID, so a release that mints new build IDs leaves Pyroscope unable to symbolise anything until a matching debuginfo blob is uploaded. That failure is entirely silent -- profiles still arrive, totals stay correct, nothing logs an error, and the flame graph just renders hex addresses. It is normally discovered mid-investigation. Documents how to diagnose it, the arm64 --platform trap (the same image yields a completely different build ID per architecture, so the wrong one compares against nothing), and where the automation lives -- an hourly CronJob in the GitOps repo at clusters/talos-main/pyroscope-debuginfo/. The one piece of this that is aether's knowledge rather than the cluster's is the table of where each binary sits inside each image, so the runbook now warns that moving a binary breaks symbolisation with nothing in CI to catch it. Docs only: no chart, template or values change, so no chart version bump. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
# Conflicts: # docs/runbook.md
… IDs, bzlmod Envoy and the symbol-cache eviction rule Since this document was written, one of the things it asserts stopped being true and a new failure mode appeared. Build IDs are content-derived now (#651, #653). //tools/buildid rewrites every Go ELF's .note.gnu.build-id to sha1 of its own bytes, and the custom Envoy gets lld's --build-id=sha1 over the linked output, so a binary a release leaves byte-identical keeps its ID and its already-uploaded symbols. "Every release mints new build IDs" was literally true against rules_go's -buildid=redacted constant; it no longer is. The sync CronJob's SKIP lines are the healthy outcome, and the doc now shows one. That matters because of the new trap: an upload silently evicts OTHER binaries' converted symbols from Pyroscope's lidia cache, with nothing logged and debuginfo list still reporting every ID as STATE_UPLOADED. On 2026-09-05 that put Envoy's frames in hex at a soak's T0. So hex frames on an ID the sync calls "still uploaded" mean an eviction, not a missed upload -- query the series and re-check before touching anything -- and the warm-up after any upload has to cover every series, including {service_name="aether-proxy", process_executable_name="envoy"}. The proxy pod's processes separate by process_executable_name, not k8s_container_name; a selector on the container name matches nothing. The path table gains the two readiness probers, which are separate ELFs with their own build IDs riding as tars_layer entries: proxy-ready in the agent image (#673, targets.tsv row added 2026-09-05 in GitOps #39) and mesh-dns-ready in the mesh-dns image (#683, #688, row pending). It also records which BUILD file is authoritative per path rather than generalising over "Go binaries". Also documents the three build-time gates that make an unsymbolisable binary impossible (release_build_ids, build_id_test, symtab_test #656), and notes the proxy's move to bzlmod on an Envoy main dev snapshot (#697, #705), which relinked the binary and moved its build ID at rev197 (6342923f -> 80542d6b). Every command was re-verified against the live cluster: the crane extraction paths match the running sync job's own extract lines, containers[0] is the right container for both DaemonSets, and readelf's -B1 form is what shows the 20-byte descriptor width that proves the sha1 linkopt won. Docs only: no chart, template or values change, so no chart version bump. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Continuous profiling resolves native frames by GNU build ID. Pyroscope can only
symbolise a frame if a debuginfo blob with that exact build ID has been uploaded. When a
release rebuilds a binary, its ID changes — and Pyroscope no longer knows how to read the
profiles it is still faithfully collecting.
The failure mode is what makes it worth documenting: nothing breaks and nothing
alerts. Profiles keep arriving, totals stay correct, no error is logged. The flame graph
just renders
0x...instead of function names, and you find out mid-investigation on theone build you actually needed to read.
What this adds
docs/observability/profiling-symbols.md:profilecli debuginfo listvs the runningbinary's
readelf -nbuild ID);--platform linux/arm64trap — every talos-main node is arm64 and the images aremulti-arch, so omitting it hands you the amd64 binary whose build ID differs completely
(
897d73e8…vsda9ce3fa…for the same image). You then compare the wrong ID, orupload symbols that match nothing and appear to have worked;
clusters/talos-main/pyroscope-debuginfo/) and why it is there rather than in this repo;inside each image, and what to do when a new component needs symbols.
docs/runbook.mdgains a cross-reference warning that moving or renaming a binary insidean image breaks symbolisation silently, with nothing in CI to catch it.
Refreshed for what landed since 2026-09-02
The branch was written before #651/#653 shipped, and it asserted something that is no
longer true. Rebased on
mainand brought current://tools/buildidrewrites every Go ELF's.note.gnu.build-idtosha1of its own bytes, and the custom Envoy gets lld's--build-id=sha1. A binary a release leaves byte-identical keeps its ID, so itsuploaded symbols stay correct and the sync job logs
SKIP (digest unchanged, build ID … still uploaded). "Every release mints new buildIDs" was literally true against rules_go's
-buildid=redactedconstant; it is not anymore, and only genuinely rebuilt binaries re-upload.
converted symbols from Pyroscope's lidia cache — nothing logged, and
debuginfo liststill reports every ID as
STATE_UPLOADED. On 2026-09-05 that put Envoy's frames in hexat a soak's T0. Hex frames on an ID the sync calls "still uploaded" therefore mean an
eviction, not a missed upload. The doc adds the rule (query, wait ~5 min, re-check
before touching anything) and the full post-upload warm-up list — including
{service_name="aether-proxy", process_executable_name="envoy"}. The proxy pod'sprocesses separate by
process_executable_name, notk8s_container_name.proxy-ready(proxy readiness probe re-execs the whole agent binary every 2s: >=31% of supervisor CPU is Go package init #673) rides in the agentimage at
/proxy-ready; itstargets.tsvrow landed today in GitOps fix: Handle ignored errors across the codebase #39.mesh-dns-ready(mesh-dns: exec readiness probe re-launches the whole daemon every 15s (~3–4% of mesh-dns CPU) — #673 redux #683/perf(mesh-dns): stdlib-only readiness prober, and --debug off by default (#683, #684) #688) rides in the mesh-dns image at/mesh-dns-ready; its row isin a follow-up GitOps PR. They are separate ELFs with their own build IDs, so an unlisted
prober profiles as hex while the daemon beside it is fine. The table now names the
authoritative
BUILD.bazelper path instead of generalising over "Go binaries".maindev snapshot (proxy: migrate the sibling Envoy workspace to bzlmod — envoy#42890 removed WORKSPACE and 6 of the 10 macros proxy/WORKSPACE loads; blocks the v1.40.0 bump (#695) #697/proxy: migrate to bzlmod on the Envoy main dev snapshot (#697) #705, LLVM 22). Themigration relinked the binary, moving its build ID at rev197 (
6342923f…→80542d6b…)— an expected one-off upload, not a symptom.
//tools/buildid:release_build_ids(no note / wrong hash / any collision fails thebuild),
//integration:build_id_test(20-byte descriptor, i.e. thesha1linkopt wonover the toolchain's md5), and
//integration:symtab_test(test(proxy): guard the shipped Envoy's symbol table, correct the "stripped" docs #656 —--strip=alwayskeeps
.symtab, and a real strip would silently cost the fleet its frame names).Every command in the doc was re-verified against the live cluster: the
craneextractionpaths match the running sync job's own
extract:lines,containers[0]is the rightcontainer for both DaemonSets, and
readelf -n | grep -B1 'Build ID:'is the form thatactually shows the 20-byte descriptor width.
The runbook conflict with
main(sections #686, #689, #693) was resolved keeping bothsides.
Scope
Documentation only — no chart, template, values or code change, so no chart version
bump is required.
bazel test //website:site_test(mkdocs strict) passes.Paired with the GitOps PR that implements the uploader:
bpalermo/k8s-talos-main#32. That one carries the mechanism, pre-flight results, rollout
ladder and risk analysis; this one is the aether-side reference a developer will actually
trip over.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr