Skip to content

fix(ebpf): python backport fixes#3268

Merged
korniltsev merged 9 commits intomainfrom
ebpf-python-backport-fixes
May 6, 2024
Merged

fix(ebpf): python backport fixes#3268
korniltsev merged 9 commits intomainfrom
ebpf-python-backport-fixes

Conversation

@korniltsev
Copy link
Copy Markdown
Contributor

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
Comment thread ebpf/python/procinfo.go
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
Copy Markdown
Contributor 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

}
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
Copy Markdown
Contributor 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
Copy Markdown
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
@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.

2 participants