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

EOF not closing ssh-agent pipes #876

kevinteg opened this Issue Apr 2, 2013 · 2 comments


None yet
2 participants

kevinteg commented Apr 2, 2013


I am trying to fix an issue we are running into with cloudenvy, which uses fabric for remote ssh command execution with ssh-agent forwarding. In one of our projects, we execute a remote shell script which calls a ruby script, which then invokes quite a few git commands (hundreds). We experienced an issue with OS X clients getting "OSError: too many open files" and traced it to pipes and ssh-agent sockets on the client side- about 800 total.

After digging through the fabric and paramiko codebase today, I think I narrowed it down to something discussed in:


It doesn't appear to close pipes when we receive EOFs on our ssh-agent channels. I read that you were planning on handling EOFs on a per-channel basis but may not have had the time to address it, and opted for clean up at the end of execute. Is this still the case? Do you have suggestions for a work around?

Thanks in advance!


This comment has been minimized.

kevinteg commented Apr 2, 2013

It looks like the read/write pipes are left in the select loop in AgentProxyThread after we receive an EOF. Proposed a fix to paramiko. My code is working as expected with a reasonable open file count.


This comment has been minimized.


bitprophet commented Apr 5, 2013

Yup this looks like it's all Paramiko, so I'll close this here. Thanks!

@bitprophet bitprophet closed this Apr 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment