-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyln-testing: BitcoinD TailableProc leaking file descriptors #7130
Comments
So the symptom appears to be a missing teardown of some fixtures in case of an error? I think we might be able to make things more flexible by using They are essentially callbacks that are guaranteed to be called during teardown. That could be used as a last-ditch attempt to close the FDs even though the |
Actually, the FDs stick around even if the test passed successfully. I will review the finalizer documentation and try some experiments. edit: If it was unclear, the subset of local test failures reported in the issue were against my initial changes which closed the files in the |
Updated issue description for clarity by removing references to earlier prototype code cross-referenced in #7108 (comment) and describing test results. |
…sProject#7130]) Changelog-Fixed: pyln-testing: Fix file descriptor leak in bitcoind fixture. ([ElementsProject#7130])
…sProject#7130]) Changelog-Fixed: pyln-testing: Fix file descriptor leak in bitcoind fixture. ([ElementsProject#7130])
Changelog-Fixed: pyln-testing: Fix file descriptor leak in bitcoind fixture. ([#7130])
Issue and Steps to Reproduce
Running pytest locally leaks file descriptors for TailableProc
stdout
, read/write handles opened in the__init__()
constructor. This resulted in sporadic failures and was effectively addressed by raising theulimit
. Current testing strategy is:make pytest
ps aux | grep pytest
watch -n 1 'lsof -p ${PID} | wc
lsof -p ${PID} | less +G
to see the file descriptors grow for each test.lsof
reports four file descriptors hanging around for each test which are initialized in theTailableProc
constructor here.getinfo
outputN/A
The text was updated successfully, but these errors were encountered: