chaotic-cx/nyx

[Bug] Kernel 6.8.1 bpf missing

Closed this issue · 4 comments

What happens?

bpf is not loaded properly with kernel 6.8.1-cachyos-lto.

What is expected to happen?

Expect scx working properly. With kernel 6.8.0-cachyos-lto, it was working flawlessly.

If possible, please attach logs

 flake git:(master) ✗ ❯❯❯ sudo scx_rustland
libbpf: failed to find valid kernel BTF
libbpf: Error loading vmlinux BTF: -3
libbpf: failed to load object 'bpf_bpf'
libbpf: failed to load BPF skeleton 'bpf_bpf': -3
Error: Failed to load BPF program

Caused by:
    No such process (os error 3)
✖ 1 flake git:(master) ✗ ❯❯❯

More information

No response

Any help would be appreciated.

BPF is still enabled in current cachyos-lto configuration:

https://github.com/chaotic-cx/nyx/blob/main/pkgs/linux-cachyos/config-nix/cachyos-lto.x86_64-linux.nix#L82-L90

For some reason, there are a few flags that the config generation script removed between 6.8.0 and 6.8.1:

e97791b#diff-8d2426c5e3ace6f3c2793347e1b894f929ae7d4bc830caa07e85c7ede7fb2371L8888

Some of these flags will have to be re-enabled for sched-ext to work again.

Firstly, the scx patch was updated and now includes stuff for https://github.com/sched-ext/scx/pull/191, so we need to test with the latest scx, which is easy:

git clone --single-branch --depth 1 'https://github.com/sched-ext/scx.git'
cd ./scx/scheds/rust/scx_rusty
nix develop --impure chaotic#scx.scx-rusty
cargo build
sudo ./target/debug/scx_rusty

But it fails in the same way, so this has to be something in our config.

inputs = {
  chaotic = { url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-small"; };
  chaotic-kernel = { url = "github:chaotic-cx/nyx/73e16a06baf8a9bb273a131b10b142f620c2b610"; inputs.nixpkgs.follows = "nixpkgs-small"; };
}

I currently pinned my upstream with commit 73e16a06baf8a9bb273a131b10b142f620c2b610 as a temporarily workaround. Any updates will be appreciated, thanks.