kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel
https://kmesh.net
Apache License 2.0
464 stars 70 forks source link

panic in ads mode #745

Closed nlgwcy closed 3 months ago

nlgwcy commented 3 months ago

What happened: kmesh start failed in ads mode:

[root@k8s-node1 kmesh]# kubectl logs -n kmesh-system kmesh-
kmesh-p7j2g  kmesh-wcfqn
[root@k8s-node1 kmesh]# kubectl logs -n kmesh-system kmesh-p7j2g
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --bpf-fs-path=\"/sys/fs/bpf\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --cgroup2-path=\"/mnt/kmesh_cgroup2\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --cni-etc-path=\"/etc/cni/net.d\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --conflist-name=\"\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --enable-bpf-log=\"true\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --enable-bypass=\"false\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --enable-mda=\"false\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --enable-secret-manager=\"false\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --help=\"false\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --mode=\"ads\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="FLAG: --plugin-cni-chained=\"true\"" subsys=manager
time="2024-08-18T11:09:55+08:00" level=info msg="kmesh start with Normal" subsys=pkg/bpf
time="2024-08-18T11:09:56+08:00" level=info msg="bpf Start successful" subsys=manager
time="2024-08-18T11:09:56+08:00" level=info msg="Clean kmesh_version map and bpf prog" subsys=pkg/bpf
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x248 pc=0x55d105602c2e]

goroutine 1 [running]:
kmesh.net/kmesh/pkg/controller.(*Controller).Start(0xc000915b70, 0xc0000f3c20)
        /kmesh/pkg/controller/controller.go:75 +0x12e
kmesh.net/kmesh/daemon/manager.Execute(0xc0008e3ec0)
        /kmesh/daemon/manager/manager.go:93 +0x285
kmesh.net/kmesh/daemon/manager.NewCommand.func1(0xc00060a100?, {0x55d105f44ba1?, 0x4?, 0x55d105f44ba5?})
        /kmesh/daemon/manager/manager.go:58 +0x47
github.com/spf13/cobra.(*Command).execute(0xc00055af08, {0xc000074090, 0x3, 0x3})
        /go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc00055af08)
        /go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0x55d105f44a99?)
        /go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041 +0x13
main.main()
        /kmesh/daemon/main.go:30 +0x3f
kmesh exit
[root@k8s-node1 kmesh]#

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment: