Bug 1958972 - [SCALE] deadlock in ovn-kube when scaling up to 300 nodes
Summary: [SCALE] deadlock in ovn-kube when scaling up to 300 nodes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.8.0
Assignee: Tim Rozet
QA Contact: Kedar Kulkarni
URL:
Whiteboard: perfscale-ovn
: 1947861 (view as bug list)
Depends On:
Blocks: 1960057
TreeView+ depends on / blocked
 
Reported: 2021-05-10 14:11 UTC by Tim Rozet
Modified: 2021-07-27 23:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1960057 (view as bug list)
Environment:
Last Closed: 2021-07-27 23:07:46 UTC
Target Upstream Version:
kkulkarn: needinfo-


Attachments (Terms of Use)
ovnkube master log with stack trace (1.84 MB, application/gzip)
2021-05-10 14:29 UTC, Tim Rozet
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift ovn-kubernetes pull 554 0 None open Bug 1958972: Fixes adding nodes to use new Services controller 2021-05-25 18:47:47 UTC
Github ovn-org ovn-kubernetes pull 2208 0 None open Fix services node add 2021-05-10 14:31:46 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:08:08 UTC

Description Tim Rozet 2021-05-10 14:11:20 UTC
Description of problem:
We switched in 4.8 to use the new services controller for endpoint slices. However when a node is added it tries to sync services using the old controller. There is deadlock here around the services cache we hold using the old controller:

goroutine 1330 [semacquire]:
sync.runtime_SemacquireMutex(0xc000ba0f9c, 0x0, 0x1)
	/usr/lib/golang/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc000ba0f98)
	/usr/lib/golang/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
	/usr/lib/golang/src/sync/mutex.go:81
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).removeServiceLB(0xc000ba0e00, 0xc022db8d50, 0x24, 0xc023eecd60, 0x11)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/ovn.go:1117 +0xf6
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).deleteLoadBalancerVIP(0xc000ba0e00, 0xc022db8d50, 0x24, 0xc023eecd60, 0x11, 0x0, 0x0)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/loadbalancer.go:72 +0x3fe
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).deleteServiceFromIdlingBalancer(0xc000ba0e00, 0xc0016b76c0)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/service.go:299 +0x37a
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).AddEndpoints(0xc000ba0e00, 0xc001901300, 0x0, 0xc024c3bbc0, 0x2)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/endpoints.go:75 +0x3a5
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).handleNodePortLB(0xc000ba0e00, 0xc000a06540, 0xc036048e60, 0xa)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/endpoints.go:166 +0x125
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).syncGatewayLogicalNetwork(0xc000ba0e00, 0xc000a06540, 0xc034951200, 0xc017798670, 0x1, 0x1, 0xc021a79680, 0xc0253cd2f0, 0x24)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/master.go:702 +0xf19
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).syncNodeGateway(0xc000ba0e00, 0xc000a06540, 0xc017798670, 0x1, 0x1, 0x0, 0x0)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/ovn.go:926 +0xff
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).WatchNodes.func1(0x1bdb960, 0xc000a06540)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/ovn.go:970 +0x66c
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnAdd(...)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/vendor/k8s.io/client-go/tools/cache/controller.go:231
k8s.io/client-go/tools/cache.FilteringResourceEventHandler.OnAdd(0xc005b792c0, 0x1e79ce0, 0xc00590d5a0, 0x1bdb960, 0xc000a06540)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/vendor/k8s.io/client-go/tools/cache/controller.go:264 +0x6a
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory.(*Handler).OnAdd(...)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/factory/handler.go:38
github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory.newQueuedInformer.func1.1(0xc009bb0450, 0xc005dfaa20, 0xc005dff260)
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/factory/handler.go:367 +0xaf
created by github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory.newQueuedInformer.func1
	/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/factory/handler.go:360 +0x10a

Comment 1 Tim Rozet 2021-05-10 14:29:56 UTC
Created attachment 1781723 [details]
ovnkube master log with stack trace

Comment 2 Tim Rozet 2021-05-10 14:30:37 UTC
4.8 solution to this is to stop using the old endpoints/services controller and only use the new controller

Comment 3 Mohamed Mahmoud 2021-05-12 19:06:21 UTC
*** Bug 1947861 has been marked as a duplicate of this bug. ***

Comment 6 Mike Fiedler 2021-06-10 16:21:09 UTC
Marking this bug verified based on successful verification of https://bugzilla.redhat.com/show_bug.cgi?id=1958958 at 300 nodes and 15000 pods on 4.8.0-0.nightly-2021-06-09-095212

Comment 9 errata-xmlrpc 2021-07-27 23:07:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438


Note You need to log in before you can comment on or make changes to this bug.