#1071993 cppimport: test_multiple_processes sometimes fails: No such file: 'hook_test.cpython-312-x86_64-linux-gnu.so.lock' #1071993
- Package:
- src:cppimport
- Source:
- src:cppimport
- Submitter:
- Drew Parsons
- Date:
- 2026-09-12 12:51:02 UTC
- Severity:
- normal
- Tags:
cppimport has started failing debci tests on most (if not all)
architectures:
112s ___________________________ test_multiple_processes ____________________________
112s
112s def test_multiple_processes():
112s with tmp_dir(["tests/hook_test.cpp"]) as tmp_path:
112s test_code = f"""
112s import os;
112s os.chdir('{tmp_path}');
112s import cppimport.import_hook;
112s import hook_test;
112s """
112s processes = [
112s Process(target=subprocess_check, args=(test_code,)) for i in range(100)
112s ]
112s
112s for p in processes:
112s p.start()
112s
112s for p in processes:
112s p.join()
112s
112s > assert all(p.exitcode == 0 for p in processes)
112s E assert False
112s E + where False = all(<generator object test_multiple_processes.<locals>.<genexpr> at 0x7fdfabf48ba0>)
112s
112s tests/test_cppimport.py:236: AssertionError
112s ----------------------------- Captured stdout call -----------------------------
112s Traceback (most recent call last):
112s File "<string>", line 5, in <module>
112s File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
112s File "<frozen importlib._bootstrap>", line 1322, in _find_and_load_unlocked
112s File "<frozen importlib._bootstrap>", line 1262, in _find_spec
112s File "/usr/lib/python3/dist-packages/cppimport/import_hook.py", line 21, in find_spec
112s cppimport.imp(fullname, opt_in=True)
112s File "/usr/lib/python3/dist-packages/cppimport/__init__.py", line 50, in imp
112s return imp_from_filepath(filepath, fullname)
112s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112s File "/usr/lib/python3/dist-packages/cppimport/__init__.py", line 87, in imp_from_filepath
112s build_safely(filepath, module_data)
112s File "/usr/lib/python3/dist-packages/cppimport/importer.py", line 33, in build_safely
112s with filelock.FileLock(lock_path, timeout=1):
112s File "/usr/lib/python3/dist-packages/filelock/_api.py", line 339, in __enter__
112s self.acquire()
112s File "/usr/lib/python3/dist-packages/filelock/_api.py", line 295, in acquire
112s self._acquire()
112s File "/usr/lib/python3/dist-packages/filelock/_unix.py", line 42, in _acquire
112s fd = os.open(self.lock_file, open_flags, self._context.mode)
112s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112s FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpe23cj6xk/hook_test.cpython-312-x86_64-linux-gnu.so.lock'
As far as I can tell this is upstream issue #90
https://github.com/tbenthompson/cppimport/issues/90
Not (yet) marking the bug with Severity: Serious since not all systems are effected
(i.e. the test passes on my own local system)
test_multiple_processes is now skipped in 22.08.02-3 and -4, but that's just a workaround to avoid having to remove the package. It shouldn't be considered a solution to the problem.
We believe that the bug you reported is fixed in the latest version of cppimport, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1071993@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Alexandre Detiste <tchet@debian.org> (supplier of updated cppimport package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Sat, 12 Sep 2026 14:26:31 +0200 Source: cppimport Architecture: source Version: 26.04.17-1 Distribution: unstable Urgency: medium Maintainer: Debian Python Team <team+python@tracker.debian.org> Changed-By: Alexandre Detiste <tchet@debian.org> Closes: 1071993 1147333 Changes: cppimport (26.04.17-1) unstable; urgency=medium . * Team upload. * New upstream version 26.04.17 (Closes: #1147333, #1071993) * Add debian/gbp.conf * Add debian/salsa-ci.yml * Drop "Rules-Requires-Root: no": it is the default now * Bump Standards-Version to 4.7.4, drop Priority: tag * Use dh-sequence-python3 * Rewrite d/watch in v5 format Checksums-Sha1: 3c9fbd547295ae7877e9ca41f6089a81a49b56f0 2310 cppimport_26.04.17-1.dsc bce51a939647dbbab2b376594c5b5cc720404aa5 21202 cppimport_26.04.17.orig.tar.gz f5abc592a77419187816ac8b4e85004c0b4a7277 3460 cppimport_26.04.17-1.debian.tar.xz 5aa6d68001cf9e52d4d3833ababec78fbad65c41 7451 cppimport_26.04.17-1_source.buildinfo Checksums-Sha256: 8cb0d30edc3508fe9da8682f1d0a5a3ce61c37f9adeabfcd06500e94d5e46323 2310 cppimport_26.04.17-1.dsc 600dae81ae99bfaeb9b7a0189dbedcb3954b1413f8598b10341c1eaad6a2e7bd 21202 cppimport_26.04.17.orig.tar.gz a2edf1ad5310b531609f6b57df9f83151b06da34784abc2f2a756fd779f15c92 3460 cppimport_26.04.17-1.debian.tar.xz ff178f11b893bec424dc3817073129f29c9e4e54cf9909a70e668f4c64905a1c 7451 cppimport_26.04.17-1_source.buildinfo Files: 9506901fce002d1fb738a8cd98b01f53 2310 python optional cppimport_26.04.17-1.dsc 58f5ea0745902ebe51367db4ef07153c 21202 python optional cppimport_26.04.17.orig.tar.gz 4852a24460359a8320e5bb04a7da1885 3460 python optional cppimport_26.04.17-1.debian.tar.xz cd3057446b5f4c96d3b5c52ac2e1dfe0 7451 python optional cppimport_26.04.17-1_source.buildinfo -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEEj23hBDd/OxHnQXSHMfMURUShdBoFAmqlRZYRHHRjaGV0QGRl Ymlhbi5vcmcACgkQMfMURUShdBrDsA//aox5YUEC7b/kMOAOnDmXBsSplxPh+Fqs gOAXgQS5+TnoduH9ilY/1y6gyRsQLE5PBK/cobLBf9U0e2VHrta9L/LUmPbK++IE zA6oOr4EwbemslPDTDMWQJW9D0a77OEOCKbwlPx4VS947+tnPW9nmkYU8L5Z1B+q 8Lqzpny2WBFdXUXZ8ss4NZbexLALk4BVrirm5UA7pympO8KJLpDBM0NokTT0r7HN q0qjSV1JFsutWTVQB862RwyxkklDtfal+yX2YlAFanA2Z++6mCabWOMG0nDFCEav 4P+3MyNtshu3Ii2sRD5c/FtLzReUoXA/58Z8nEG1sbMlef794PyjaIqVGcIB2T7q BfoRqy3m+yo7ZU/9MJ+DLOUbdPIbCtPT2uVAtpuZsh5Ri2fa6EhFVPqjxHkfDKw7 JeQA7rUGdv95me50ngGb8hYQ5M+GDJMGc1AAIss57uVPd3pCC6QKFGotbKNrBlHZ S0OtstfDZfi+5DFSCO5dWCkVZ7O66iEktXmuJ+Q/np9/jNthp9YRmBRJ8x+1POAm 3SOdyhrdb2z0BWqqEpm+9jGtTEKuF1nmgwGCArs5wBuX0fc2W97BCCUYu96OBOiE JrDNW/m1plZdtexMpSif43blco9aXWfJXUI/1R2lcrnGF4icUPyK1opxIQUv8S5c 2za0yFAobTI= =hQTj -----END PGP SIGNATURE-----