[
https://issues.apache.org/jira/browse/YUNIKORN-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18107459#comment-18107459
]
Wilfred Spiegelenburg commented on YUNIKORN-3370:
-------------------------------------------------
{quote} deregister the callback in Stop() (or re-register in
StartServiceWithPublisher){quote}
We cannot deregister that as that would break starting and stopping the event
system from the configuration. The handle is also not leaking a go routine. It
is a function registration not a start of a routine. The function does not run
in a new go routine unless a change was pushed. It then exits after the change
is processed. This is a false positive in the leak test code.
> yunikorn-core services are not restartable in-process, so the shim cannot
> stop the core it starts without intermittent failures
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: YUNIKORN-3370
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3370
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: shim - kubernetes
> Reporter: Dale Richardson
> Assignee: weichen lai
> Priority: Major
> Labels: newbie
>
> Follow-up to YUNIKORN-3357 (surfaced by shim PR #1061). Blocks burning down
> the 17 inherited core-service leakcheck exemptions in the shim.
> yunikorn-core's service lifecycle is one-way: {{EventSystemImpl.Stop()}}
> niles its channel and early-returns on a {{stopped}} flag that is never
> cleared, and {{StartServiceWithPublisher}} starts its handler
> unconditionally, so a start after a stop leaks a handler; process-global
> config callbacks and {{UserGroupCache}} are likewise torn down and reused.
> Because of this the shim's {{MockScheduler.stop()}} cannot call
> {{coreContext.StopAll()}} to clean up the in-process core without introducing
> intermittent test failures.
> Evidence: adding {{coreContext.StopAll()}} to {{MockScheduler.stop()}}
> produced a ~25% {{TestAssumePodError}} flake at {{-count>1}} (3/12 and 3/10,
> versus 0/35 without it).
> Proposed fix:
> * deregister the callback in Stop() (or re-register in
> StartServiceWithPublisher)
> * use a unique id (uuid) instead of a unix-seconds timestamp
> * delete the events exemptions in pkg/common/leakcheck/leakcheck.go in core
> (#1124) and shim (#1061)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]