Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/cpu: Reduce .text section error spam #1864

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Conversation

Sylfrena
Copy link
Contributor

@Sylfrena Sylfrena commented Jul 18, 2023

Fixes #1857

Why?

User report that logs are being spammed with

level=error name=parca-agent ts=2023-07-13T16:16:20.242517888Z caller=cpu.go:308 component=cpu_profiler msg="failed to add unwind table" pid=1890187 err="setUnwindTableForMapping for executable /root/.julia/artifacts/37805a06093bdc0d5938601719cf02fa0cf3aa68/lib/rr/librrpage.so starting at 0x6fffd000 failed: BuildID failed /proc/1890187/root/root/.julia/artifacts/37805a06093bdc0d5938601719cf02fa0cf3aa68/lib/rr/librrpage.so: could not find .text section"

in #1857

What?

Add a counter to keep track of said error and only logs it once every 50 times we hit the error case to reduce spamming the logs in default logging mode.

馃 Generated by Copilot at 502844c

We search for the text in the maps of the dead
But sometimes we find nothing but ErrTextSectionNotFound
We track the errors and we log the doom
We need the unwind tables to escape the CPU's tomb

-->

@Sylfrena Sylfrena requested a review from a team as a code owner July 18, 2023 12:18
Copy link
Member

@brancz brancz left a comment

Choose a reason for hiding this comment

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

Nice yes this is exactly the type of direction I was thinking of.

pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/maps.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/maps.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/maps.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/maps.go Outdated Show resolved Hide resolved
@Sylfrena Sylfrena force-pushed the delightful-logs-track branch 2 times, most recently from bd55bcf to 32e3057 Compare July 20, 2023 08:20
@Sylfrena Sylfrena requested a review from brancz July 20, 2023 08:28
pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
pkg/profiler/cpu/cpu.go Show resolved Hide resolved
pkg/buildid/elf.go Outdated Show resolved Hide resolved
@Sylfrena Sylfrena enabled auto-merge July 24, 2023 08:48
@Sylfrena Sylfrena merged commit acdf410 into main Jul 24, 2023
22 checks passed
@brancz brancz deleted the delightful-logs-track branch July 24, 2023 09:23
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.

Could not find .text section spams error log
3 participants