Skip to content

Concurrent fs.promises.writeFile race condition in dev CLI leads to corrupted files and crashes #101541

Description

@aniruddhaadak80

Description

Race condition during concurrent fs.promises.writeFile operations in dev mode corrupts config files.

Location

Impact

Concurrent edits or updates trigger simultaneous un-locked fs.promises.writeFile calls to the same destination. On Windows, this causes EBUSY exceptions that crash the CLI, and on Unix, it leads to interleaved, corrupted file contents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions