Skip to content

Windows EPERM errors during compiler download #7932

@kanej

Description

@kanej

Describe the issue

We see CI fails on windows due to EPERM errors during compiler download - specifically in the MultiProcessMutex.#isMutexFileTooOld method.

This is an example CI fail:
https://github.com/NomicFoundation/hardhat/actions/runs/21707237921/job/62601407423?pr=7924

This may or may not be happening in the wild, but our is at least happening in our CI.

EPERM is specific to windows, and is handled at other points in our codebase e.g. fs.ts:669, fs.ts:713

TODO

NOTE: This task should be tackled by someone working on a windows machine

  • Add a windows only test that reproduces the EPERM error within MultiProcessMutex
  • Update #isMutexFileTooOld() and #deleteMutexFile() to handler EPERM within ./v-next/hardhat-utils/src/synchronization.ts
    • log if the mutex is not deleted/created as expected because of EPERM

Acceptance criteria

  • The test suite for v-next/hardhat-utils should pass with the additional test
  • CI indicates no regressions across mac/linux/windows for downloader tests

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions