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

controller panic runtime error: invalid memory address or nil pointer dereference(在1.12.4版本复现) #3660

Closed
lhy12315 opened this issue Jan 22, 2024 · 1 comment
Assignees

Comments

@lhy12315
Copy link

Bug Report

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

1.创建eip:

[root@master-01 qos]# cat eip.yaml
kind: IptablesEIP
apiVersion: kubeovn.io/v1
metadata:
  name: eip-11
spec:
  natGwDp: gw1
  qosPolicy: qos-eip-example

2.创建QoS

apiVersion: kubeovn.io/v1
kind: QoSPolicy
metadata:
  name: qos-eip-example
spec:
  shared: false
  bindingType: EIP
  bandwidthLimitRules:
  - name: eip-ingress
    rateMax: "1" # Mbps
    burstMax: "1" # Mbps
    priority: 1
    direction: ingress
  - name: eip-egress
    rateMax: "1" # Mbps
    burstMax: "1" # Mbps
    priority: 1
    direction: egress

2、controller日志

E0123 22:07:20.755820       1 runtime.go:79] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 1386 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x5567a52c48c0?, 0x5567a69aac80})
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:75 +0x85
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc000819140?})
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:49 +0x6b
panic({0x5567a52c48c0?, 0x5567a69aac80?})
        /opt/hostedtoolcache/go/1.21.5/x64/src/runtime/panic.go:914 +0x21f
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).addEipQoS(0xc00057ed00, 0xc00109e000, {0xc001247580, 0x9})
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:467 +0x78
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).handleAddIptablesEip(0xc00057ed00, {0xc000fe7b50, 0x6})
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:252 +0x807
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).processNextAddIptablesEipWorkItem.func1(0xc00057ed00, {0x5567a5156c20?, 0xc000819140})
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:102 +0x194
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).processNextAddIptablesEipWorkItem(0xc00057ed00)
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:108 +0x45
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).runAddIptablesEipWorker(...)
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:68
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x30?)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:226 +0x33
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0x7d7d7d7d7d7b3a22?, {0x5567a56978e8, 0xc0012725a0}, 0x1, 0xc0004c1380)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:227 +0xaf
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0x66222c7d7b3a2244?, 0x3b9aca00, 0x0, 0x3a?, 0x6e225c7b3a6b222c?)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:204 +0x7f
k8s.io/apimachinery/pkg/util/wait.Until(0x3a227d225c696e63?, 0x2c7d7b3a222e227b?, 0x616d6d6f633a6622?)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:161 +0x1e
created by github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).startWorkers in goroutine 100
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/controller.go:1096 +0x3b36
**panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x150 pc=0x5567a42e18d8]**

goroutine 1386 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc000819140?})
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:56 +0xcd
panic({0x5567a52c48c0?, 0x5567a69aac80?})
        /opt/hostedtoolcache/go/1.21.5/x64/src/runtime/panic.go:914 +0x21f
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).addEipQoS(0xc00057ed00, 0xc00109e000, {0xc001247580, 0x9})
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:467 +0x78
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).handleAddIptablesEip(0xc00057ed00, {0xc000fe7b50, 0x6})
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:252 +0x807
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).processNextAddIptablesEipWorkItem.func1(0xc00057ed00, {0x5567a5156c20?, 0xc000819140})
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:102 +0x194
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).processNextAddIptablesEipWorkItem(0xc00057ed00)
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:108 +0x45
github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).runAddIptablesEipWorker(...)
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/vpc_nat_gw_eip.go:68
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x30?)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:226 +0x33
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0x7d7d7d7d7d7b3a22?, {0x5567a56978e8, 0xc0012725a0}, 0x1, 0xc0004c1380)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:227 +0xaf
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0x66222c7d7b3a2244?, 0x3b9aca00, 0x0, 0x3a?, 0x6e225c7b3a6b222c?)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:204 +0x7f
k8s.io/apimachinery/pkg/util/wait.Until(0x3a227d225c696e63?, 0x2c7d7b3a222e227b?, 0x616d6d6f633a6622?)
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:161 +0x1e
created by github.com/kubeovn/kube-ovn/pkg/controller.(*Controller).startWorkers in goroutine 100
        /home/runner/work/kube-ovn/kube-ovn/pkg/controller/controller.go:1096 +0x3b36

Additional Info

  • Kubernetes version:1.27.0

    Output of kubectl version:

[root@master-01 ~]# kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.0", GitCommit:"1b4df30b3cdfeaba6024e81e559a6cd09a089d65", GitTreeState:"clean", BuildDate:"2023-04-11T17:10:18Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.0", GitCommit:"1b4df30b3cdfeaba6024e81e559a6cd09a089d65", GitTreeState:"clean", BuildDate:"2023-04-11T17:04:24Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}

  • kube-ovn version:

    1.12.4
  • operation-system/kernel version:

 [root@master-01 ~]# awk -F '=' '/PRETTY_NAME/ { print $2 }' /etc/os-release
"CentOS Linux 8"

Output of uname -r:

[root@master-01 ~]# uname -r
5.4.265-1.el8.elrepo.x86_64
[root@master-01 ~]#
@bobz965 bobz965 self-assigned this Jan 23, 2024
@bobz965 bobz965 mentioned this issue Jan 23, 2024
1 task
@bobz965 bobz965 closed this as completed Jan 23, 2024
@bobz965
Copy link
Collaborator

bobz965 commented Jan 23, 2024

已回合到 release 1.12

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

2 participants