[ 
https://issues.apache.org/jira/browse/YUNIKORN-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Huangpinhan reassigned YUNIKORN-3424:
-------------------------------------

    Assignee: Huangpinhan

> 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]

Reply via email to