-
Notifications
You must be signed in to change notification settings - Fork 621
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
fix(ebpf): python backport fixes #3268
Conversation
…tead of libc.so.6
@@ -58,7 +59,7 @@ func GetProcInfo(s *bufio.Scanner) (ProcInfo, error) { | |||
strings.Contains(m.Pathname, "/lib/ld-musl-aarch64.so.1") { | |||
res.Musl = append(res.Musl, m) | |||
} | |||
if strings.HasSuffix(m.Pathname, "/libc.so.6") || strings.HasSuffix(m.Pathname, "/libc-2") { | |||
if strings.HasSuffix(m.Pathname, "/libc.so.6") || strings.HasPrefix(filepath.Base(m.Pathname), "libc-2.") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the main change for "libc not found" error fix
@@ -93,7 +93,7 @@ func (f *MMapedElfFile) GNUBuildID() (BuildID, error) { | |||
return BuildID{}, fmt.Errorf(".note.gnu.build-id is not a GNU build-id : %s", hex.EncodeToString(data)) | |||
} | |||
rawBuildID := data[16:] | |||
if len(rawBuildID) != 20 && len(rawBuildID) != 8 { // 8 is xxhash, for example in Container-Optimized OS | |||
if len(rawBuildID) < 8 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the change for fixing ".note.gnu.build-id has wrong size" when gnu build id is 8 bytes long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is applying some fixes from https://github.com/grafana/pyroscope/pull/3184/files#diff-a5a0a7f930ad6111157723f6f1c134d7644f6a9f403390b950c8d9a18ad13cfe