Skip to content

Rare race condition on macOS with parallel checking #21393

@ilevkivskyi

Description

@ilevkivskyi

I just noticed this test flake that we have never seen before. Not sure what is going on:

  _________________ testCheckingStubPackagesWorksInParallelMode __________________
  [gw2] darwin -- Python 3.11.9 /private/var/folders/tb/y368xp_x10s3ty1b_mtl5mxr0000gn/T/cibw-run-s5dt9kyd/cp311-macosx_x86_64/venv-test-x86_64/bin/python
  data: /Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/test-data/unit/cmdline.test:1288:
  Failed: Invalid output (/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/test-data/unit/cmdline.test, line 1288)
  ----------------------------- Captured stderr call -----------------------------
  Expected:
  Actual:
    Traceback (most recent call last): (diff)
      File "<frozen runpy>", line 198, in _run_module_as_main (diff)
      File "<frozen runpy>", line 88, in _run_code (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/build_worker/__main__.py", line 6, in <module> (diff)
        console_entry() (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/build_worker/worker.py", line 356, in console_entry (diff)
        main(sys.argv[1:]) (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/build_worker/worker.py", line 95, in main (diff)
        with open(args.options_data, "rb") as f: (diff)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (diff)
    FileNotFoundError: [Errno 2] No such file or directory: '.mypy_cache/.worker_options.d4493bad.data' (diff)
    error: INTERNAL ERROR -- Please try using mypy master on GitHub: (diff)
    https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build (diff)
    Please report a bug at https://github.com/python/mypy/issues (diff)
    version: 2.1.0+dev.9e2d061d57879b6cbc60faace56a4d96e96823ac (diff)
    note: use --pdb to drop into pdb (diff)
    Failed to establish connection with worker: No status file found (diff)
    Failed to establish connection with worker: No status file found (diff)
    Traceback (most recent call last): (diff)
      File "<frozen runpy>", line 198, in _run_module_as_main (diff)
      File "<frozen runpy>", line 88, in _run_code (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/__main__.py", line 52, in <module> (diff)
        console_entry() (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/__main__.py", line 16, in console_entry (diff)
        main() (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/main.py", line 150, in main (diff)
        res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr) (diff)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/main.py", line 240, in run_build (diff)
        res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr) (diff)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/build.py", line 422, in build (diff)
        result = build_inner( (diff)
                 ^^^^^^^^^^^^ (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/build.py", line 537, in build_inner (diff)
        graph = dispatch(sources, manager, stdout, connect_threads) (diff)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (diff)
      File "/Users/runner/work/mypy_mypyc-wheels/mypy_mypyc-wheels/mypy/mypy/build.py", line 4149, in dispatch (diff)
        raise OSError(f"Cannot connect to build worker(s): {', '.join(not_connected)}") (diff)
    OSError: Cannot connect to build worker(s): 2, 3 (diff)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions