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: failed to create map (name: 'sock_pair_map'): Invalid argument(-22) #76

Open
dryheartGo opened this issue Mar 7, 2022 · 4 comments

Comments

@dryheartGo
Copy link

dryheartGo commented Mar 7, 2022

Bug Description

'merbridge pod' startup failed

  • OS: centos8.2
  • Kernel: 5.10
  • log :
sudo bpftool prog load mb_connect.o /sys/fs/bpf/connect \
	map name cookie_original_dst pinned /sys/fs/bpf/cookie_original_dst \
	map name local_pod_ips pinned /sys/fs/bpf/local_pod_ips \
	map name process_ip pinned /sys/fs/bpf/process_ip
libbpf: failed to create map (name: 'sock_pair_map'): Invalid argument(-22)
libbpf: failed to load object 'mb_connect.o'
Error: failed to load object file
make[1]: *** [Makefile:112: load-connect] Error 255
make[1]: Leaving directory '/app/bpf'
make[1]: Entering directory '/app/bpf'
[ -f /sys/fs/bpf/cookie_original_dst ] || sudo bpftool map create /sys/fs/bpf/cookie_original_dst type lru_hash key 4 value 12 entries 65535 name cookie_original_dst
[ -f /sys/fs/bpf/local_pod_ips ] || sudo bpftool map create /sys/fs/bpf/local_pod_ips type hash key 4 value 4 entries 1024 name local_pod_ips
[ -f /sys/fs/bpf/process_ip ] || sudo bpftool map create /sys/fs/bpf/process_ip type lru_hash key 4 value 4 entries 1024 name process_ip
sudo bpftool prog load mb_connect.o /sys/fs/bpf/connect \
map name cookie_original_dst pinned /sys/fs/bpf/cookie_original_dst \
map name local_pod_ips pinned /sys/fs/bpf/local_pod_ips \
map name process_ip pinned /sys/fs/bpf/process_ip
libbpf: failed to create map (name: 'sock_pair_map'): Invalid argument(-22)
libbpf: failed to load object 'mb_connect.o'
Error: failed to load object file
make[1]: Leaving directory '/app/bpf'
make[1]: *** [Makefile:112: load-connect] Error 255
make: *** [Makefile:3: load] Error 2
time="2022-03-07T02:32:03Z" level=fatal msg="run local ip controller error: load failed: unexpected exit code: 2, err: exit status 2" func="cmd.glob..func1()" file="root.go:38"

replace by ubuntu, no error

Version

Linux xxx 5.10.102-1.el8.x86_64 #1 SMP Thu Feb 24 02:04:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
istio version=1.10.2
@dryheartGo
Copy link
Author

GRUB_CMDLINE_LINUX added: systemd.unified_cgroup_hierarchy=1 cgroup_no_v1=all

@kebe7jun
Copy link
Member

kebe7jun commented Mar 7, 2022

It looks like it's because the map creation of sockhash type failed.
We haven't run the test on centos8.2, thank you for the information, I will try to find the root cause view to fix him.

@dmytronasyrov
Copy link

I have the same error. Version 0.7.0 from Dockerhub, CNI enabled

args:
        - /app/mbctl
        - -m
        - istio
        - --use-reconnect=true
        - --cni-mode=true

Screenshot 2022-08-02 at 12 38 55

Screenshot 2022-08-02 at 12 39 10

@kebe7jun
Copy link
Member

I have the same error. Version 0.7.0 from Dockerhub, CNI enabled

args:
        - /app/mbctl
        - -m
        - istio
        - --use-reconnect=true
        - --cni-mode=true
Screenshot 2022-08-02 at 12 38 55 Screenshot 2022-08-02 at 12 39 10

Sorry for late reply, can you post full log here?

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

No branches or pull requests

3 participants