Dale Richardson created YUNIKORN-3371:
-----------------------------------------
Summary: DRA resource-slice tracker goroutine leaks in tests:
created with an uncancellable context and no shutdown handle
Key: YUNIKORN-3371
URL: https://issues.apache.org/jira/browse/YUNIKORN-3371
Project: Apache YuniKorn
Issue Type: Bug
Components: shim - kubernetes
Reporter: Dale Richardson
Follow-up to YUNIKORN-3357 (PR #1061); burns down the one shared leakcheck
exemption
k8s.io/dynamic-resource-allocation/resourceslice/tracker.(*Tracker).initInformers.func1.
{{cache.NewContext}} and {{support.SharedDRAManager}} start the DRA
resource-slice tracker's sync monitor ({{tracker.StartTracker}}) with an
uncancellable context, and neither keeps a handle that a shutdown path can
reach to call {{Tracker.Stop()}}. The monitor's only two exits are therefore
unreachable — the context is never cancelled, and the informers it waits on are
never started so they never sync. Harmless in production, where a {{Context}}
is built once and lives for the process, but every test that builds a
{{Context}} leaks one such goroutine permanently.
Proposed fix: create the tracker with a cancellable context, or give
{{Context}} a shutdown that calls {{Tracker.Stop()}}, then delete the shared
exemption.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]