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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DWARF: Add logging for unexpected CFA opcodes #2479

Merged
merged 4 commits into from
Feb 13, 2024
Merged

Conversation

Sylfrena
Copy link
Contributor

@Sylfrena Sylfrena commented Feb 6, 2024

Why?

An end-user found an unexpected DWARF opcode in #2459 causing the agent to panic.

As there was no logging, the binary which has this opcode could not be determined

Test Plan

CI tests

@Sylfrena Sylfrena requested a review from a team as a code owner February 6, 2024 08:16
internal/dwarf/frame/table.go Outdated Show resolved Hide resolved
pkg/stack/unwind/compact_unwind_table_test.go Outdated Show resolved Hide resolved
pkg/stack/unwind/unwind_table.go Outdated Show resolved Hide resolved
internal/dwarf/frame/table.go Outdated Show resolved Hide resolved
internal/dwarf/frame/table.go Outdated Show resolved Hide resolved
internal/dwarf/frame/table.go Outdated Show resolved Hide resolved
internal/dwarf/frame/table.go Outdated Show resolved Hide resolved
internal/dwarf/frame/table.go Show resolved Hide resolved
@Sylfrena Sylfrena force-pushed the dwarf-panic-replace branch 2 times, most recently from 16be55c to a0630ae Compare February 9, 2024 11:16
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.

Pretty close, let's also add error wrapping in each place where we return an error up the chain, that way we'll have context and know exactly where the error happened.

internal/dwarf/frame/table.go Outdated Show resolved Hide resolved
pkg/stack/unwind/compact_unwind_table.go Outdated Show resolved Hide resolved
pkg/stack/unwind/unwind_table.go Outdated Show resolved Hide resolved
pkg/stack/unwind/unwind_table.go Outdated Show resolved Hide resolved
pkg/stack/unwind/unwind_table_test.go Outdated Show resolved Hide resolved
pkg/stack/unwind/unwind_table_test.go Outdated Show resolved Hide resolved
@brancz brancz merged commit 8aadcb2 into main Feb 13, 2024
25 checks passed
@brancz brancz deleted the dwarf-panic-replace branch February 13, 2024 09:43
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