do not log an error for Go binaries without a symbol table#324
Open
gecube wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #316.
Stripped Go executables such as
kubectl(built with-ldflags "-s -w") carry no symbol table, so thecrypto/tlsuprobes can't be attached. The agent already detects the binary as a Go app via.go.buildinfo, then fails to resolvecrypto/tls.(*Conn).Writeand logs at error level: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 inuprobeLog. 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.