Skip to content

[BUG] Compiler-cache creation not multi-process safe #7985

Closed

Description

@wence-

Describe the bug

This is a related issue to the one in #7983 (observed as part of the same set of CI changes), but hopefully easier to solve.

When constructing a cache, the cache directory creation can race, because two processes can observe that the cache does not exist, and then both try and make it.

os.makedirs(self.path)

Code to reproduce the behaviour:

No response

Expected behaviour

This should probably work. I think just passing exist_ok=True to os.makedirs should do the trick

OS

No response

Python version

No response

Cython version

No response

Additional context

No response

Activity

  1. added a commit that references this issue on Sep 11, 2026
    7912988
  2. added this to the 3.3.1 milestone on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions