You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Multiple replica jobs assigned to same instance due to busy_blocks race #3683
This also occurs with cloud fleet instances after they become idle. When idle cloud instances are reused for new jobs, the same race condition causes multiple jobs to be assigned to the same instance instead of being spread across available instances.
this looks like a classic case of a race condition in the replica assignment logic. i'm guessing it's due to the fact that the busy_blocks list is not properly synchronized across instances, allowing multiple instances to claim the same block at the same time. a possible fix could be to introduce a locking mechanism to ensure that only one instance can claim a block at a time. should i open a PR for this?
@eskayML Could you try reproducing this issue using version 0.20.15 with DSTACK_FF_PIPELINE_PROCESSING_ENABLED enabled? This switches execution from scheduled tasks to pipelines, where this issue should already be resolved.
Activity
eskayML commentedon Mar 27, 2026
this looks like a classic case of a race condition in the replica assignment logic. i'm guessing it's due to the fact that the
busy_blockslist is not properly synchronized across instances, allowing multiple instances to claim the same block at the same time. a possible fix could be to introduce a locking mechanism to ensure that only one instance can claim a block at a time. should i open a PR for this?Bihan commentedon Mar 27, 2026
@eskayML Could you try reproducing this issue using version
0.20.15withDSTACK_FF_PIPELINE_PROCESSING_ENABLEDenabled? This switches execution from scheduled tasks to pipelines, where this issue should already be resolved.