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

libbpf: map '.rodata.str1.1': failed to create: Invalid argument(-22) #18

Closed
duanhaowei opened this issue Apr 3, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@duanhaowei
Copy link

duanhaowei commented Apr 3, 2023

Describe the bug
in lession02 ,
i packing c code use ./ecc hello.bpf.c
root@ro:~/ebpf# ls

ebpf  ecli         hello.bpf.o      llvm.sh       t1
ecc   hello.bpf.c  hello.skel.json  package.json

but when i use
sudo ./ecli run ./package.json

arg: ./package.json
libbpf: map '.rodata.str1.1': failed to create: Invalid argument(-22)
libbpf: failed to load object 'hello_bpf'
libbpf: failed to load BPF skeleton 'hello_bpf': -22
failed to load skeleton
Error: BpfError("load and attach ebpf program failed")

Desktop (please complete the following information):
cat /proc/version
Linux version 5.4.0-109-generic (buildd@ubuntu) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022

image

and use readelf
image

is something wrong with my libbpf ? or clang-13?
according #libbpf/bpftool#27

@duanhaowei duanhaowei added the bug Something isn't working label Apr 3, 2023
@duanhaowei
Copy link
Author

i got wrong Labels "bug" ,plz remove it.

@duanhaowei
Copy link
Author

升级内核解决问题。

@LinkXSystem
Copy link

升级内核解决问题。

请问这个升级内核是指升级 linux 的内核吗?升级到哪一个版本?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants