You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Huangpinhan (Jira)" <ji...@apache.org> on 2026/09/03 15:05:00 UTC
[jira] [Commented] (YUNIKORN-3424) createAppPlaceholders walks the application task map without the application lock
[ https://issues.apache.org/jira/browse/YUNIKORN-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18111140#comment-18111140 ]
Huangpinhan commented on YUNIKORN-3424:
---------------------------------------
Hi, I would love to take this ticket on, but I noticed the description mentions that you already have a fix ready on your fork (PR #13). May I humbly ask: do you still plan to submit that PR yourself? If so, I'd be more than happy to pick up a different ticket instead — I wouldn't want to get in the way of your work. But if it hasn't been scheduled yet, I would be honored to give it a try.
> 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: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org