You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "jimmycmlin (Jira)" <ji...@apache.org> on 2026/08/26 08:38:00 UTC
[jira] [Assigned] (YUNIKORN-3429) onReserving's goroutine reads originatingTask after the lock is released
[ https://issues.apache.org/jira/browse/YUNIKORN-3429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jimmycmlin reassigned YUNIKORN-3429:
------------------------------------
Assignee: jimmycmlin
> onReserving's goroutine reads originatingTask after the lock is released
> ------------------------------------------------------------------------
>
> Key: YUNIKORN-3429
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3429
> Project: Apache YuniKorn
> Issue Type: Sub-task
> Components: shim - kubernetes
> Reporter: Dale Richardson
> Assignee: jimmycmlin
> Priority: Minor
>
> {{onReserving}} runs under {{app.handle}}'s lock but spawns a goroutine for placeholder creation, and that goroutine's failure path reads {{app.originatingTask}} long after the lock is gone. {{setOriginatingTask}} writes the field under the lock when the originator pod is identified, which can happen late (recovery, out-of-order arrival of gang members).
> Confirmed with the race detector on the fork fix branch (the write is triggered from the application event handler just before the read). The consequence is benign: the warning event is posted against a stale originator, or skipped.
> Fix: capture the originating task into a local before spawning the goroutine (the capture happens inside the caller's locked region) and use the local for the event. A fix exists on the tigerquoll fork (PR #11 there) and will be filed once this has a number.
> Marker: the goroutine in {{onReserving}} 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