Description
When running the test suite (make check-stage2-std
is sufficient to reproduce), in the middle of the tests the program aborts, often with a cute abort message. There's a few different kinds of aborts, such as fatal runtime error: assertion failed: void_sched.is_not_null()
or error opening /dev/urandom: Too many open files
, but they all seem to be caused by running out of file descriptors. The default limit on my machine (OS X) is 256, and if I catch the abort (with lldb
) I can see that they're all in use.
This problem seems to have been triggered by 8afec77, which was introduced into master by PR #7265. This commit changes the default number of concurrent test threads from 4
to rust_get_num_cpus() * 2
. Experimentally, anything above 6
causes the test failure, and my machine reports 8 CPUs so the test suite is attempting to use 16 threads.
I don't know what the root cause here is; either we're keeping fds open much longer than we should, or we have a bunch of tests that require a lot of fds, or maybe something completely different. Interestingly, lsof
reports that most of the fds in use are PIPEs. What do we use pipes for?