Closed ndejaco2 closed 9 months ago
Hi, thanks for the report!
This looks like a consequence of https://github.com/libbpf/bpftool/issues/100, with bpftool mistakenly re-mounting the bpffs on top of the parent directory of your path (/sys/fs/
) and masking the previous contents of the directory.
This needs to be fixed, but in the meantime, you can probably work around it by passing another path to pin your programs? bpftool prog loadall ... pinmaps /sys/fs/bpf/myProgram
?
Thanks! I found this command properly loaded the program without deleting /sys/fs/cgroup:
sudo ./bpftool prog loadall myProgram.o /sys/fs/bpf/myProgram/ pinmaps /sys/fs/bpf/myProgram/
OK, great! I'll try to work on a proper fix when I find a moment.
I am using the following BPFTool version:
bpftool v7.3.0 using libbpf v1.3 Linux version: 4.14.328-248.540.amzn2.aarch64
I am running a command to load my BPF program like so:
The strange behavior I am seeing is that the result of this command is that the /sys/fs/cgroup directory is deleted when it existed prior to calling this command:
This causes issues for initialization of systemd services which are using cgroup to limit memory consumption which I am trying to initialize after loading the BPF program. Is this behavior expected and is there some workaround I can apply?