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

meson: restore previous libbpf version and update bpftool #400

Merged
merged 1 commit into from
Jun 28, 2024
Merged

Conversation

arighi
Copy link
Contributor

@arighi arighi commented Jun 28, 2024

The upstrem bpftool git repo (https://github.com/libbpf/bpftool.git) is periodically force pushed and the specific commit that we needed is not available anymore.

Instead of failing we are actually fetching the latest bpftool (HEAD) that introduced some breakage initially fixed by commit e59c48a ("Update libbpf commit hash").

However, updating libbpf seems to introduce a run-time problem and all the schedulers are failing to start:

libbpf: failed to find skeleton map ''
libbpf: failed to populate skeleton maps for 'bpf_bpf': -3

So, revert libbpf to the previous version and update the commit for bpftool to use a version that still allows to generate a compatible BPF skel.

Fixes: e59c48a ("Update libbpf commit hash")

The upstrem bpftool git repo (https://github.com/libbpf/bpftool.git) is
periodically force pushed and the specific commit that we needed is not
available anymore.

Instead of failing we are actually fetching the latest bpftool (HEAD)
that introduced some breakage initially fixed by commit e59c48a
("Update libbpf commit hash").

However, updating libbpf seems to introduce a run-time problem and all
the schedulers are failing to start:

 libbpf: failed to find skeleton map ''
 libbpf: failed to populate skeleton maps for 'bpf_bpf': -3

So, revert libbpf to the previous version and update the commit for
bpftool to use a version that still allows to generate a compatible BPF
skel.

Fixes: e59c48a ("Update libbpf commit hash")
Signed-off-by: Andrea Righi <[email protected]>
@ptr1337
Copy link
Contributor

ptr1337 commented Jun 28, 2024

Fixes the segfaults and co.

Tested-by: Peter Jung [email protected]

@arighi
Copy link
Contributor Author

arighi commented Jun 28, 2024

Merging this so that we can continue to build and test the scx schedulers. We will investigate later how to move to the new libbpf properly if it's needed.

@arighi arighi merged commit 657fb6a into main Jun 28, 2024
1 check passed
@arighi arighi deleted the fix-bpftool branch June 28, 2024 11:21
arighi pushed a commit that referenced this pull request Jun 28, 2024
When fetching external git repositories (libbpf and bpftool) we don't
check if the target commit exists.

This can leads to issues such as #400, because we may silently use HEAD,
instead of the specified commit.

Prevent this by returning an error when the target SHA1 cannot be found.

Signed-off-by: Andrea Righi <[email protected]>
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