Skip to content

docs(observability): explain why profile symbols decay after a release - #663

Merged
bpalermo merged 3 commits into
mainfrom
docs/profiling-symbols
Sep 5, 2026
Merged

bpalermo merged 3 commits into
mainfrom
docs/profiling-symbols

Conversation

@bpalermo

@bpalermo bpalermo commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

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 the
one build you actually needed to read.

What this adds

docs/observability/profiling-symbols.md:

  • how to recognise the symptom and confirm it (profilecli debuginfo list vs the running
    binary's readelf -n build ID);
  • the --platform linux/arm64 trap — every talos-main node is arm64 and the images are
    multi-arch, so omitting it hands you the amd64 binary whose build ID differs completely
    (897d73e8… vs da9ce3fa… for the same image). You then compare the wrong ID, or
    upload symbols that match nothing and appear to have worked;
  • where the automation lives (an hourly CronJob in the GitOps repo,
    clusters/talos-main/pyroscope-debuginfo/) and why it is there rather than in this repo;
  • the one piece that is this repo's knowledge: the table of where each binary sits
    inside each image, and what to do when a new component needs symbols.

docs/runbook.md gains a cross-reference warning that moving or renaming a binary inside
an 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 main and brought current:

Every command in the doc 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 -n | grep -B1 'Build ID:' is the form that
actually shows the 20-byte descriptor width.

The runbook conflict with main (sections #686, #689, #693) was resolved keeping both
sides.

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

bpalermo and others added 3 commits September 2, 2026 05:17
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
… 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
@bpalermo
bpalermo merged commit 82ac16c into main Sep 5, 2026
16 checks passed
@bpalermo
bpalermo deleted the docs/profiling-symbols branch September 5, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant