tests/test_blackd.py
runs out of fds on systems with high nproc (is blackd leaking fds?)
#4504
Labels
T: bug
Something isn't working
Describe the bug
When running the test suite on a machine with high nproc (i.e. large number of CPUs/cores — we have 80 on arm64 and 256 on sparc), the test suite suddenly runs out of fds in middle of testing
tests/test_blackd.py
. The remaining blackd tests fail, then pytest hangs when it's supposed to exit.To Reproduce
nproc
… (perhaps some mocking will work?)tox -e py312-ci
(xdist in non-CI jobs works around the problem)Expected behavior
Test suite passing.
Environment
Additional context
To not shadow the issue, here's a minimal log:
(note I had to ^C it, as it was hanging)
My initial guess was that
ProcessPoolExecutor
is not cleaned up whenmain()
finishes, but hacking a.shutdown()
in doesn't seem to help. Addingmax_workers=
does (with values up to 29 here).The setup here is using the default
ulimit -n 1024
.The text was updated successfully, but these errors were encountered: