#1147413 mypy: FTBFS on riscv64 due to timeout

Package:
src:mypy
Source:
src:mypy
Submitter:
Bo YU
Date:
2026-09-25 13:23:02 UTC
Severity:
normal
Tags:
#1147413#5
Date:
2026-09-11 15:22:25 UTC
From:
To:
Dear Maintainer,

mypy in unstable and experimential both has ftbfs issue on riscv64, see
https://buildd.debian.org/status/fetch.php?pkg=mypy&arch=riscv64&ver=2.2.0-4&stamp=1788888404&raw=0
https://buildd.debian.org/status/fetch.php?pkg=mypy&arch=riscv64&ver=2.3.1-1&stamp=1788942084&raw=0

Increasing the value of WORKER_START_TIMEOUT to 30 can fix the below
timeout issue:
```

Traceback (most recent call last):
  File "<frozen runpy>", line 203, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/build/reproducible-path/mypy-2.3.1/mypy/__main__.py", line 52, in <module>
    console_entry()
  File "/build/reproducible-path/mypy-2.3.1/mypy/__main__.py", line 16, in console_entry
    main()
    ~~~~^^
  File "/build/reproducible-path/mypy-2.3.1/mypy/main.py", line 154, in main
    res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
                              ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build/reproducible-path/mypy-2.3.1/mypy/main.py", line 244, in run_build
    res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
  File "/build/reproducible-path/mypy-2.3.1/mypy/build.py", line 422, in build
    result = build_inner(
        sources,
    ...<9 lines>...
        metastore,
    )
  File "/build/reproducible-path/mypy-2.3.1/mypy/build.py", line 537, in build_inner
    graph = dispatch(sources, manager, stdout, connect_threads)
  File "/build/reproducible-path/mypy-2.3.1/mypy/build.py", line 4145, in dispatch
    raise OSError(f"Cannot connect to build worker(s): {', '.join(not_connected)}")
OSError: Cannot connect to build worker(s): 0, 1, 2, 3
```

But then the test suite will fail at

```
...
 == Return code: 2 (diff)

Alignment of first line difference:
  E: a.py:2: note: Revealed type is "str"
  A: Traceback (most recent call last):
     ^
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
=========================== short test summary info ============================
FAILED mypy/test/testcmdline.py::PythonCmdlineSuite::cmdline.test::testShadowFileWithNativeParserParallel
==== 1 failed, 14179 passed, 362 skipped, 12 xfailed in 7272.53s (2:01:12) =====

```

Running the full test suite with pytest -n8, parallel workers contend on a shared
filelock while mypyc compiles the librt C extension during tests. On a loaded
riscv64 sbuild the C build takes >5 min, so a waiting worker hits filelock.Timeout
and the build fails.

I have tested it on milk-v jupiter. Please let me know any issues.

#1147413#10
Date:
2026-09-25 13:20:57 UTC
From:
To:
Fixed via patch sent upstream https://github.com/python/mypy/pull/21988

I wish I had seen your bug report sooner; it took a lot of debugging time on the riscv64 porterbox to arrive at the same fix: https://github.com/python/mypy/issues/21969