Skip to content

Merge upstream/main commit 4ea0940: bpf_get_stackid → bpf_get_stack#257

Merged
gnurizen merged 4 commits intomainfrom
claude/merge-otel-ebpf-upstream-HH6yY
Apr 22, 2026
Merged

Merge upstream/main commit 4ea0940: bpf_get_stackid → bpf_get_stack#257
gnurizen merged 4 commits intomainfrom
claude/merge-otel-ebpf-upstream-HH6yY

Conversation

@gnurizen
Copy link
Copy Markdown
Collaborator

Summary

Merges upstream commit 4ea0940 ("Switch from bpf_get_stackid() to bpf_get_stack() (open-telemetry#1264)") — the first upstream commit the Parca fork was behind after its last merge base (4e8bd96).

Upstream change: kernel stacks are now captured inline via bpf_get_stack() (raw addrs embedded at the front of Trace.frame_data, counted by the new num_kernel_frames field) instead of via bpf_get_stackid() into a BPF_MAP_TYPE_STACK_TRACE map keyed by id.

Conflict resolutions

  • support/ebpf/native_stack_trace.ebpf.c — Parca moved the unwind code into native_stack_trace.h (via #include). Kept the include and dropped upstream's duplicated inline unwind block. Also dropped the kernel_stackmap struct per upstream.
  • tracer/tracer.go — Dropped Parca's duplicate CustomLabels parsing loop in loadBpfTrace (upstream has the identical block right after) and removed the now-dead ptr.Kernel_stack_id path. Upstream's symbolizeKernelFrames path using Num_kernel_frames is now the sole kernel-frame path.
  • support/ebpf/tracer.ebpf.{amd64,arm64} — rebuilt from the resolved sources.

Test plan

  • make ebpf builds cleanly (amd64 + arm64)
  • go build ./... passes (only env-related failures: sys/sdt.h, Rust lib)
  • make test — all code-related tests pass. The following fail only due to sandbox limitations, not this change:
    • customlabelstest, interpreter/rtld — no /proc/kallsyms
    • interpreter/luajit — no Docker
    • tools/coredump — cloud store blocked (403)
    • support/usdt/test — missing sys/sdt.h
    • test/cudaverify — missing libparcagpucupti.so
  • CI to validate in a real environment

https://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN

bobrik and others added 4 commits March 23, 2026 09:52
…et_stack()

Resolves conflicts with Parca fork:
- native_stack_trace.ebpf.c: drop kernel_stackmap (the unwind code
  continues to live in native_stack_trace.h in the fork)
- tracer.go: drop the duplicate CustomLabels block and the now-removed
  Kernel_stack_id path; adopt upstream symbolizeKernelFrames using
  Num_kernel_frames embedded at the start of Frame_data
- tracer.ebpf.{amd64,arm64}: rebuilt

https://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN
- Rebuild tracer.ebpf.{amd64,arm64} using the project's pinned
  clang-17/llvm-17 toolchain (the previous blobs were built against
  clang-18 which produces different output)
- Drop stray blank line in native_stack_trace.ebpf.c flagged by
  clang-format-17

https://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN
Previous commit rebuilt with Ubuntu clang-17 on the host, which produces
bit-identical BPF but differently-hashed blobs from the pinned CI image's
Debian clang-17. Rebuilding inside the image's filesystem (via chroot to
reuse its toolchain) yields blobs whose sha256 matches what the
unit-test-ebpf workflow recomputes, so the blob-diff check now passes.

https://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN
@gnurizen gnurizen marked this pull request as ready for review April 17, 2026 00:45
@gnurizen gnurizen requested a review from umanwizard April 17, 2026 00:46
@gnurizen gnurizen merged commit 8721319 into main Apr 22, 2026
53 checks passed
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.

4 participants