test_mainwindow.py opens too many file descriptors and sockets
See original GitHub issueHi,
First, I want to clarify that I am fully aware of the fact, that you do not support running unit tests outside of your own development environments and CIs. However, because I think this might be related to what happens in #12247, I am reporting anyway. Please, don’t feel obliged to dig too much into it if you feel this does not apply to the scenarios you are officially supporting.
In my endeavor to stabilize Spyder for the OpenSUSE Linux distro package which I am maintaining, I try to run as many unit tests as possible in order to detect possible package incompatibilites.
Fact is, the execution of python3 runtests.py --run-slow
always fails with a segfault or breakpoint trap. This happens not always at the same test but consistently a few dozen tests into the test_mainwindow.py suite. Sometimes there is a Too many open files
error message associated with it.
I added a few debug statements to the main_window
fixture and found out that for each test, the number of open files and sockets increases. Specifically the pdb_history.sqlite
file is opened many times but not closed at teardown of the test. I suspect this is because of the reuse of the window as introduced in #10444. This could also be the reason why #12247 cannot open any new connections.
I will dig more into this, but any hints would be appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
Done in #12340
@impact27, I think this is important enough to have it in 4.1.3 (our next release). Could you make a PR for that?