Skip to content

EXL3 native dispatch caches race on concurrent GIL=0 first use #3951

Closed

Description

@Qubitium

Source finding (main at 221cd564)

EXL3's native kernel selection has process-wide mutable C++ containers with no synchronization:

GIL=0 callers can enter these native operators concurrently. Concurrent read/write of either standard container is a C++ data race and can corrupt its internal state, crash, or select the wrong dispatch result. The per-device guard protects CUDA context selection; it does not serialize these process-wide host containers.

Expected

Synchronize lookup and insertion, including forced-result publication, or use immutable/per-call dispatch results and one-time initialization with a defined publication order. Add a concurrent cold-start native test under PYTHON_GIL=0.

This is source-supported; the review host lacks nvcc and could not run the EXL3 extension.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions