Skip to content

Windows vector.rs save() cross-process race condition #982

Closed

Description

@ajianaz

Problem

vector.rs:205-211 — On Windows, save() temporarily releases the file lock (fs2::FileExt::unlock) before rename(), creating a window where another process can access the partially-written file.

Context

This is a workaround for Windows ERROR_ACCESS_DENIED on rename (issue #926). The unlock-rename-relock pattern is inherently racy.

Fix

On Windows, write directly to the target file instead of temp-file + rename. Or use rename() retries with exponential backoff instead of releasing the lock.

Severity: LOW (Windows-only, requires concurrent processes)

Activity

  1. added
    bug
    scope:core
    on Aug 10, 2026
  2. ajianaz commented on Aug 10, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in #984 (merged to develop)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions