[
https://issues.apache.org/jira/browse/YUNIKORN-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117100#comment-18117100
]
Huangpinhan commented on YUNIKORN-3424:
---------------------------------------
hi [~tigerquoll]
I wanted to follow up on my comment from two weeks ago. It looks like PR #13 on
your fork hasn't been submitted to apache/yunikorn-k8shim yet, and #1079 also
still seems to be under review, so I wanted to check in again: are you still
planning to submit the fix for 3424 yourself? If it hasn't been scheduled yet,
I'd be happy to pick it up and give it a try; if you're already working on it,
please feel free to disregard this comment — I'm glad to take on a different
ticket instead.
Would you mind taking a moment to reply and let me know whether it would be
okay for me to get started? Thank you for your time!
> createAppPlaceholders walks the application task map without the application
> lock
> ---------------------------------------------------------------------------------
>
> Key: YUNIKORN-3424
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3424
> Project: Apache YuniKorn
> Issue Type: Sub-task
> Components: shim - kubernetes
> Reporter: Dale Richardson
> Assignee: Huangpinhan
> Priority: Major
>
> {{PlaceholderManager.createAppPlaceholders}} holds the placeholder manager
> lock and calls the internal, lock-assuming {{app.getPlaceHolderTasks()}},
> which ranges over {{app.taskMap}}. It runs on the goroutine {{onReserving}}
> spawns, so no application lock is inherited, while the informer path adds
> tasks to the same map, including the placeholder pods this very function
> creates. The sibling {{cleanUp}} in the same file uses the locked
> {{GetPlaceHolderTasks()}}, and this function already takes the application
> lock four other ways, so the unlocked call is an oversight, not a design.
> Confirmed with the race detector on the fork fix branch (three-site report
> against master). Same fatal map-iteration class as the {{postAppAccepted}}
> ticket.
> Fix: use the locked accessor. Hoisting the walk out of the manager lock would
> widen the window for double placeholder creation, which that lock exists to
> prevent. A fix exists on the tigerquoll fork (PR #13 there) and will be filed
> once this has a number.
> Marker: {{createAppPlaceholders}} in {{placeholder_manager.go}} carries this
> JIRA; the fix removes it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]