Skip to content

fix: decrement HashmapPidPageToMappingInfo metric on processPIDExit#1400

Merged
fabled merged 2 commits into
open-telemetry:mainfrom
wehzzz:fix-pid-page-to-mapping-metric
May 11, 2026
Merged

fix: decrement HashmapPidPageToMappingInfo metric on processPIDExit#1400
fabled merged 2 commits into
open-telemetry:mainfrom
wehzzz:fix-pid-page-to-mapping-metric

Conversation

@wehzzz
Copy link
Copy Markdown
Contributor

@wehzzz wehzzz commented May 6, 2026

Summary

Recently, we observed some unusual behavior regarding the HashmapPidPageToMappingInfo metric.

image

According to the graph, we reached 163M entries in the eBPF map at one point, which seems way too high. When inspecting the actual map with:

$ bpftool -j map show id 31184 

{"id":11696,"type":"lpm_trie","name":"pid_page_to_map","flags":1,"bytes_key":16,"bytes_value":16,"max_entries":1048576,"bytes_memlock":2120920,"frozen":0,"btf_id":99410}

We are supposed to have a maximum of ~1M entries, so this value is definitely off.

Validating the changes

I tested by running both the unpatched and patched versions on separate nodes with identical workloads.

Without fix

image

With fix

image

@wehzzz wehzzz marked this pull request as ready for review May 6, 2026 13:07
@wehzzz wehzzz requested review from a team as code owners May 6, 2026 13:07
Comment thread processmanager/ebpf/ebpf.go Outdated
Co-authored-by: Christos Kalkanis <christos.kalkanis@elastic.co>
@fabled fabled merged commit 27fe1c7 into open-telemetry:main May 11, 2026
31 checks passed
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/opentelemetry-ebpf-profiler that referenced this pull request May 11, 2026
…open-telemetry#1400)

Co-authored-by: Christos Kalkanis <christos.kalkanis@elastic.co>
wehzzz added a commit to DataDog/opentelemetry-ebpf-profiler that referenced this pull request May 11, 2026
…open-telemetry#1400) (#79)

Co-authored-by: Christos Kalkanis <christos.kalkanis@elastic.co>
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.

3 participants