Skip to content

do not log an error for Go binaries without a symbol table#324

Open
gecube wants to merge 1 commit into
coroot:mainfrom
gecube:fix_316
Open

do not log an error for Go binaries without a symbol table#324
gecube wants to merge 1 commit into
coroot:mainfrom
gecube:fix_316

Conversation

@gecube

@gecube gecube commented Jun 30, 2026

Copy link
Copy Markdown

Fixes #316.

Stripped Go executables such as kubectl (built with -ldflags "-s -w") carry no symbol table, so the crypto/tls uprobes can't be attached. The agent already detects the binary as a Go app via .go.buildinfo, then fails to resolve crypto/tls.(*Conn).Write and logs at error level:

failed to get symbol crypto/tls.(*Conn).Write: no symbols found

Because the negative result isn't cached, this repeats for every new PID of such a binary, which is noisy on nodes that run kubectl (and similar stripped Go tools) frequently.

This is an expected, unactionable condition — there is nothing to instrument — so "no symbols found" is now treated as a silent error, consistent with the other cases (not a Go executable, permission denied, etc.) already handled in uprobeLog. Genuine attach failures are still logged.

Added tests covering a stripped binary producing the error and that it's suppressed while real errors keep being reported.

Stripped Go executables (e.g. kubectl built with -ldflags "-s -w") have
no symbol table, so crypto/tls uprobes cannot be attached. This is an
expected, unactionable condition, but it was logged at error level for
every matching process, producing noise like:

  failed to get symbol crypto/tls.(*Conn).Write: no symbols found

Treat "no symbols found" as a silent error, consistent with the other
non-actionable cases already handled there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coroot-node-agent repeatedly logs "failed to get symbol crypto/tls.(*Conn).Write:*no symbols found"

2 participants