You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/10/28 01:35:00 UTC
[jira] [Updated] (YUNIKORN-3423) postAppAccepted reads taskGroups and taskMap without the application lock
[ https://issues.apache.org/jira/browse/YUNIKORN-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated YUNIKORN-3423:
-------------------------------------
Labels: pull-request-available (was: )
> postAppAccepted reads taskGroups and taskMap without the application lock
> -------------------------------------------------------------------------
>
> Key: YUNIKORN-3423
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3423
> Project: Apache YuniKorn
> Issue Type: Sub-task
> Components: shim - kubernetes
> Reporter: Dale Richardson
> Assignee: Hungchih Lee
> Priority: Major
> Labels: pull-request-available
>
> {{Application.postAppAccepted}} is called from {{Schedule()}} on the scheduling ticker with no lock, outside any state-machine transition, unlike the other state handlers which are FSM callbacks under {{app.handle}}'s lock. It reads {{taskGroups}} and, through {{skipReservationStage}}, ranges over {{taskMap}} while the pod informer path keeps adding tasks to that map under the lock; pods arrive for an application after it is Accepted as a matter of course.
> Confirmed with the race detector: the test on the fork fix branch reproduces it on master every time (three reports on this chain). Because the read is a {{range}}, the runtime consequence is {{fatal error: concurrent map iteration and map write}}, which kills the scheduler.
> Fix: snapshot the decision inputs under one {{RLock}} and release it before logging and dispatching. Wrapping the whole body self-deadlocks because {{GetAllocatedTasks()}} takes the read lock internally; use the lock-free {{getTasks}} twin inside the locked region. A fix exists on the tigerquoll fork (PR #12 there) and will be filed once this has a number.
> Marker: {{postAppAccepted}} in {{application.go}} carries this JIRA; the fix removes it.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org