Skip to content

[Bug]: shim occasionally fails to detect AWS EBS Volumes due to race condition #4001

Closed

Description

@james-boydell

Steps to reproduce

  • start a dev environment in AWS with a volume attachment
  • it may fail right away, if not, detach without terminating and reapply the run
  • do this several times until failure

Actual behaviour

Runs fail with "prepareVolumes error: format and mount volume: get real device name: volume not found among block devices"

Expected behaviour

runs are successful without failure

dstack version

0.20.26

Server logs

Additional information

Caused by a race condition. shim is trying to get real device name before volume is ready

Activity

  1. r4victor commented on Jul 6, 2026

    @r4victor
    Collaborator

    Context: this bug seems to be a side effect of faster run startup times (#3920). Previously, dstack spent >5s between volume attach and shim start. Now it's 1-2s and the bug became reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions