[
https://issues.apache.org/jira/browse/YUNIKORN-3368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18107645#comment-18107645
]
Wilfred Spiegelenburg edited comment on YUNIKORN-3368 at 8/25/26 2:22 AM:
--------------------------------------------------------------------------
This is not an issue. The analysis is not correct.
When the call to {{ss.Run()}} returns an error the error is logged at a
{{Fatal}} level. Logging at {{Fatal}} means that the message is written to the
log if possible, and then exit is called. This is from the logging code:
{code:java}
// The logger then calls os.Exit(1), even if logging at FatalLevel is
// disabled.
{code}
This is an incorrect finding as it cannot happen in the production code, and is
at most a broken test.
All other issues in the stop code have been covered in YUNIKORN-3367.
was (Author: wifreds):
This is not an issue. The analysis is not correct.
When the call to {{ss.Run()}} returns an error the error is logged at a
{{Fatal}} level. Logging at {{Fatal}} means that the message is written to the
log if possible, and then exit is called. This is from the logging code:
{code:java}
// The logger then calls os.Exit(1), even if logging at FatalLevel is
// disabled.
{code}
This is an incorrect finding.
> KubernetesShim.Stop() after a failed Run() is a no-op, leaking the dispatcher
> and placeholder-manager goroutines
> ----------------------------------------------------------------------------------------------------------------
>
> Key: YUNIKORN-3368
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3368
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: shim - kubernetes
> Reporter: Dale Richardson
> Assignee: Andy Huang
> Priority: Major
> Labels: newbie
>
> Follow-up to YUNIKORN-3357 (PR #1061); burns down the leakcheck exemptions
> cache.(*PlaceholderManager).Start.func1 and dispatcher.Start.func1.
> {{KubernetesShim.Stop()}} only stops the placeholder manager and dispatcher
> from inside the {{{}case ss.stopChan <- struct{}{{}}}} arm of a select that
> has a {{default:}} branch. When {{Run()}} fails before {{doScheduling()}}
> starts, nothing is receiving on {{{}stopChan{}}}, so {{Stop()}} takes the
> default branch, logs "scheduler is already stopped" and returns having
> stopped neither component. {{Run()}} calls {{Stop()}} itself on registration
> or state-initialization failure, so the shim leaks both goroutines on every
> failed startup.
> Repro: {{{}go test ./pkg/shim -run TestSchedulerRegistrationFailed{}}}. (In a
> full-package run the dispatcher goroutine is masked because it is a package
> singleton a later test stops; it leaks when that test runs alone.)
> Proposed fix: {{Stop()}} must release what it owns regardless of how far
> {{Run()}} progressed, then delete both exemptions. Shares the
> {{{}Stop(){}}}/{{{}stopChan{}}} select with the doScheduling finding above.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]