-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Cleanup SpawnProcess files after use #149
Conversation
Thanks for this. Did you consider putting the logic into, say |
Yes, my reading of the logic was that |
@JonRowe : Thank you for the involvement. I think however that the closing of the IO should take place at Would it be possible to make a test that demonstrates the increasing number of open files as scenarios are executed, and that this PR solves this issue? I suggest you create an issue explaining the problem to which this PR is one among many possible solutions. |
@jarl-dk sure, run |
Sorry, that was snippy and unconstructive, the problem is that this is a heisenbug caused by individual system, file system limits which causes erratic behaviour in large test suites using aruba, pretty much the only way to test this would be to hook into lsof and check that the file descriptors attached to the process are the same before and after a scenario, but to do that you'd need to run aruba from aruba, is that too meta? |
@JonRowe : could you ellaborate a bit on how to reproduce (without the fix). What do you mean run |
That's what I meant about not being helpful, basically its a heisenbug that keeps occurring in the Through use of lsof I tracked this down to Aruba leaking files from |
I just cloned rspec-core and ran |
Superseded by #150 |
I'm on OS X, it's an intermittent bug... My open file limit is 2560.
and you can find (with a bit of tinkering) open files with
which I based off this article |
SpawnProcess
creates files to use forstdout
andstderr
which are opened but never closed, this leaks file descriptors that eventually cause larger test suites to fail on some systems (I encountered this withrspec-core
).So before we clear processess we clean them up by closing their io, for completness I also added this to
InProcess
.