POTENTIAL DEADLOCK: Inconsistent locking. saw this ordering in one goroutine:
happened before
../../lock/lock_debug.go:78 lock.(*internalRWMutex).RLock { i.RWMutex.RLock() } <<<<<
instances.go:207 eni.(*InstancesManager).ForeachInstance { m.mutex.RLock() }
node.go:459 eni.(*Node).ResyncInterfacesAndIPs { n.manager.ForeachInstance(instanceID, }
../../ipam/node.go:357 ipam.(*Node).recalculate { a, err := n.ops.ResyncInterfacesAndIPs(context.TODO(), scopedLog) }
../../ipam/node.go:333 ipam.(*Node).UpdatedResource { n.recalculate() }
../../ipam/node_manager.go:315 ipam.(*NodeManager).Update { return node.UpdatedResource(resource) }
node_manager_test.go:270 eni.(*ENISuite).TestNodeManagerDefaultAllocation { mngr.Update(updateCiliumNode(cn, 8, 7)) }
~/.gimme/versions/go1.14.3.linux.amd64/src/reflect/value.go:460 reflect.Value.call { call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) }
~/.gimme/versions/go1.14.3.linux.amd64/src/reflect/value.go:321 reflect.Value.Call { return v.call("Call", in) }
../../../vendor/gopkg.in/check.v1/check.go:781 check%2ev1.(*suiteRunner).forkTest.func1 { c.method.Call([]reflect.Value{reflect.ValueOf(c)}) }
../../../vendor/gopkg.in/check.v1/check.go:675 check%2ev1.(*suiteRunner).forkCall.func1 { dispatcher(c) }
happened after
../../lock/lock_debug.go:62 lock.(*internalRWMutex).Lock { i.RWMutex.Lock() } <<<<<
node.go:466 eni.(*Node).ResyncInterfacesAndIPs.func1 { n.mutex.Lock() }
../../ipam/types/types.go:364 types.foreachInterface { if err := fn(instanceID, rev.Resource.InterfaceID(), rev); err != nil { }
../../ipam/types/types.go:386 types.(*InstanceMap).ForeachInterface { return foreachInterface(instanceID, instance, fn) }
instances.go:209 eni.(*InstancesManager).ForeachInstance { m.instances.ForeachInterface(instanceID, fn) }
node.go:459 eni.(*Node).ResyncInterfacesAndIPs { n.manager.ForeachInstance(instanceID, }
../../ipam/node.go:357 ipam.(*Node).recalculate { a, err := n.ops.ResyncInterfacesAndIPs(context.TODO(), scopedLog) }
../../ipam/node.go:333 ipam.(*Node).UpdatedResource { n.recalculate() }
../../ipam/node_manager.go:315 ipam.(*NodeManager).Update { return node.UpdatedResource(resource) }
node_manager_test.go:270 eni.(*ENISuite).TestNodeManagerDefaultAllocation { mngr.Update(updateCiliumNode(cn, 8, 7)) }
~/.gimme/versions/go1.14.3.linux.amd64/src/reflect/value.go:460 reflect.Value.call { call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) }
~/.gimme/versions/go1.14.3.linux.amd64/src/reflect/value.go:321 reflect.Value.Call { return v.call("Call", in) }
../../../vendor/gopkg.in/check.v1/check.go:781 check%2ev1.(*suiteRunner).forkTest.func1 { c.method.Call([]reflect.Value{reflect.ValueOf(c)}) }
../../../vendor/gopkg.in/check.v1/check.go:675 check%2ev1.(*suiteRunner).forkCall.func1 { dispatcher(c) }
in another goroutine: happened before
../../lock/lock_debug.go:78 lock.(*internalRWMutex).RLock { i.RWMutex.RLock() } <<<<<
node.go:185 eni.(*Node).PrepareIPAllocation { n.mutex.RLock() }
../../ipam/node.go:547 ipam.(*Node).determineMaintenanceAction { a.allocation, err = n.ops.PrepareIPAllocation(scopedLog) }
../../ipam/node.go:583 ipam.(*Node).maintainIPPool { a, err := n.determineMaintenanceAction() }
../../ipam/node.go:677 ipam.(*Node).MaintainIPPool { err := n.maintainIPPool(ctx) }
../../ipam/node_manager.go:272 ipam.(*NodeManager).Update.func1 { if err := node.MaintainIPPool(context.TODO()); err != nil { }
../../trigger/trigger.go:206 trigger.(*Trigger).waiter { t.params.TriggerFunc(reasons) }
happened after
../../lock/lock_debug.go:78 lock.(*internalRWMutex).RLock { i.RWMutex.RLock() } <<<<<
instances.go:90 eni.(*InstancesManager).GetSubnet { m.mutex.RLock() }
node.go:213 eni.(*Node).PrepareIPAllocation { if subnet := n.manager.GetSubnet(e.Subnet.ID); subnet != nil { }
../../ipam/node.go:547 ipam.(*Node).determineMaintenanceAction { a.allocation, err = n.ops.PrepareIPAllocation(scopedLog) }
../../ipam/node.go:583 ipam.(*Node).maintainIPPool { a, err := n.determineMaintenanceAction() }
../../ipam/node.go:677 ipam.(*Node).MaintainIPPool { err := n.maintainIPPool(ctx) }
../../ipam/node_manager.go:272 ipam.(*NodeManager).Update.func1 { if err := node.MaintainIPPool(context.TODO()); err != nil { }
../../trigger/trigger.go:206 trigger.(*Trigger).waiter { t.params.TriggerFunc(reasons) }
Other goroutines holding locks:
goroutine 550 lock 0xc0005ba5a0
../../lock/lock_debug.go:78 lock.(*internalRWMutex).RLock { i.RWMutex.RLock() } <<<<<
node.go:185 eni.(*Node).PrepareIPAllocation { n.mutex.RLock() }
../../ipam/node.go:547 ipam.(*Node).determineMaintenanceAction { a.allocation, err = n.ops.PrepareIPAllocation(scopedLog) }
../../ipam/node.go:583 ipam.(*Node).maintainIPPool { a, err := n.determineMaintenanceAction() }
../../ipam/node.go:677 ipam.(*Node).MaintainIPPool { err := n.maintainIPPool(ctx) }
../../ipam/node_manager.go:272 ipam.(*NodeManager).Update.func1 { if err := node.MaintainIPPool(context.TODO()); err != nil { }
../../trigger/trigger.go:206 trigger.(*Trigger).waiter { t.params.TriggerFunc(reasons) }