Skip to content

pkg/normalizer: populate function name for v2 arrow locations - #6413

Merged
brancz merged 1 commit into
mainfrom
fix-v2-kernel-frame-names
Sep 29, 2026
Merged

brancz merged 1 commit into
mainfrom
fix-v2-kernel-frame-names

Conversation

@gnurizen

Copy link
Copy Markdown
Contributor

Kernel frames sent through the v2 Arrow write path appear as bare addresses or <unknown> in the flame graph, although the agent sends the symbol.

Cause

The v2 schema has only system_name on the function struct; the agent puts the kernel symbol there. encodeV2Location wrote the function name as "". The flame graph (flamegraph_arrow.go) and table read only function_name, so for every pre-symbolized v2 frame:

  • sibling frames merge into one node keyed on the empty name, and location_address goes null wherever the merged addresses differ
  • the UI's nodeLabel falls back to [mapping]0x<addr>, where the address is module-relative

Fix

  • Ingest (pkg/normalizer/arrow_v2.go): write system_name as both the name and system_name. Query-time demangling already runs over the name.
  • Decode (pkg/profile/decode.go): DecodeInto and DecodeFunctionName fall back to system_name when the name is empty, so profiles already stored by the old v2 path display correctly (FrostDB). Once that data ages out of retention, the fallback can be removed.

Testing

  • TestAddSampleRecordV2 now asserts that the encoded location carries the symbol as both name and system name.
  • New TestDecodeFallsBackToSystemName covers the legacy encoding.
  • With the fixes stashed, both tests fail; with them in place, both pass.
  • pkg/profile, pkg/normalizer, pkg/parcacol and pkg/query tests pass.
  • Not yet checked end to end against a live agent.

@alwaysmeticulous

alwaysmeticulous Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

✅ Meticulous spotted 0 visual differences across 282 screens tested: view results.

Meticulous evaluated ~4 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit dd5fcd5 pkg/normalizer: populate function name for v2 arrow locations. This comment will update as new commits are pushed.

The v2 arrow schema only carries a function system_name, and
encodeV2Location wrote the function name as the empty string. The flame
graph and table read only the function name, so every pre-symbolized
frame (e.g. agent-symbolized kernel frames) came out unnamed: siblings
merged into a single node keyed on "" and the UI fell back to rendering
the module-relative address.

Write system_name as both name and system_name on ingest, and have
DecodeInto/DecodeFunctionName fall back to system_name when the name is
empty so data already stored by the old v2 path displays correctly.

@brancz brancz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whops

@brancz
brancz enabled auto-merge (squash) September 29, 2026 18:34
@brancz
brancz merged commit dc0b442 into main Sep 29, 2026
34 checks passed

This branch was successfully deployed

1 active deployment
Preview – parca-ui — dd5fcd5e Deployed Sep 29, 2026 by vercel[bot]
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.

2 participants