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

Add node routes crash bug when configure TransportInterface #2665

Closed
Jexf opened this issue Aug 27, 2021 · 0 comments · Fixed by #2670
Closed

Add node routes crash bug when configure TransportInterface #2665

Jexf opened this issue Aug 27, 2021 · 0 comments · Fixed by #2670
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Jexf
Copy link
Member

Jexf commented Aug 27, 2021

bug 1

Add node routes crash bug when configure TransportInterface

I0827 11:26:12.507565       1 client.go:130] Updating Antrea client with the new CA bundle
E0827 11:26:12.511804       1 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 399 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x21c8400, 0x37f9270)
	/root/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:74 +0x95
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/root/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:48 +0x89
panic(0x21c8400, 0x37f9270)
	/opt/go/src/runtime/panic.go:969 +0x1b9
antrea.io/antrea/pkg/agent/controller/noderoute.(*Controller).getNodeTransportAddrs(0xc000177d40, 0xc0001b8300, 0x6, 0x6, 0x0)
	/root/showmaker/antrea/pkg/agent/controller/noderoute/node_route_controller.go:754 +0x17f
antrea.io/antrea/pkg/agent/controller/noderoute.(*Controller).addNodeRoute(0xc000177d40, 0xc000ad4820, 0x6, 0xc0001b8300, 0x0, 0x0)
	/root/showmaker/antrea/pkg/agent/controller/noderoute/node_route_controller.go:457 +0x187
antrea.io/antrea/pkg/agent/controller/noderoute.(*Controller).syncNodeRoute(0xc000177d40, 0xc000ad4820, 0x6, 0x0, 0x0)
	/root/showmaker/antrea/pkg/agent/controller/noderoute/node_route_controller.go:406 +0x16c
antrea.io/antrea/pkg/agent/controller/noderoute.(*Controller).processNextWorkItem(0xc000177d40, 0x203000)
	/root/showmaker/antrea/pkg/agent/controller/noderoute/node_route_controller.go:371 +0x106
antrea.io/antrea/pkg/agent/controller/noderoute.(*Controller).worker(0xc000177d40)
	/root/showmaker/antrea/pkg/agent/controller/noderoute/node_route_controller.go:342 +0x2b
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000278530)
	/root/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155 +0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc000278530, 0x27f7700, 0xc0007bf410, 0x1, 0xc0000aaf60)
	/root/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156 +0xad
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000278530, 0x3b9aca00, 0x0, 0x1, 0xc0000aaf60)
	/root/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133 +0x98
k8s.io/apimachinery/pkg/util/wait.Until(0xc000278530, 0x3b9aca00, 0xc0000aaf60)
	/root/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90 +0x4d
created by antrea.io/antrea/pkg/agent/controller/noderoute.(*Controller).Run
	/root/showmaker/antrea/pkg/agent/controller/noderoute/node_route_controller.go:334 +0x285
E0827 11:26:12.511884       1 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
func (c *Controller) getNodeTransportAddrs(node *corev1.Node) (*utilip.DualStackIPs, error) {
	var transportAddrs *utilip.DualStackIPs
          ...
}

The var transportAddrs *utilip.DualStackIPs param is uninitialized

bug 2

I0827 12:00:24.034806       1 agent.go:313] Agent initialized NodeConfig=NodeName: tos-05, OVSBridge: br-int, PodIPv4CIDR: 10.224.2.0/24, PodIPv6CIDR: <nil>, NodeIPv4: 172.18.123.16/22, NodeIPv6: <nil>, TransportIPv4: <nil>, TransportIPv6: 172.18.123.16/22, Gateway: Name antrea-gw0: IPv4 10.224.2.1, IPv6 <nil>, MAC de:3e:a1:ca:b1:ac, NetworkConfig=&{Encap geneve None  eth1 192.168.121.0/24}

ransportIPv4: <nil>, TransportIPv6: 172.18.123.16/22 ipv4 address and ipv6 address are confused:

	for _, addr := range addrList {
		if ipNet, ok := addr.(*net.IPNet); ok {
			if ipNet.IP.IsGlobalUnicast() {
				if ipNet.IP.To4() != nil {
					v6IPNet = ipNet
				} else {
					v4IPNet = ipNet
				}
			}
		}
	}
@Jexf Jexf added the kind/bug Categorizes issue or PR as related to a bug. label Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant