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

fix(ebpf): python backport fixes #3268

Merged
merged 9 commits into from
May 6, 2024
Merged

Conversation

korniltsev
Copy link
Collaborator

This PR is applying some fixes from https://github.com/grafana/pyroscope/pull/3184/files#diff-a5a0a7f930ad6111157723f6f1c134d7644f6a9f403390b950c8d9a18ad13cfe

  1. fix issue with libc file name is libc-2.31.so, cc @keyolk Support pyston based environment #3126
  2. fix issue with short GNU bnuild-id
  3. update offsets for python 3.13rc6 ,
  4. add ubuntu tests images for python tests

@korniltsev korniltsev marked this pull request as ready for review May 2, 2024 11:41
@korniltsev korniltsev requested a review from simonswine May 2, 2024 11:41
@@ -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.") {
Copy link
Collaborator Author

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 {
Copy link
Collaborator Author

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

Copy link
Collaborator

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

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

LGTM

@korniltsev korniltsev merged commit 5aed1e5 into main May 6, 2024
27 checks passed
@korniltsev korniltsev deleted the ebpf-python-backport-fixes branch May 6, 2024 09:31
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.

None yet

2 participants