EOF not closing ssh-agent pipes #876

Closed
kevinteg opened this Issue Apr 2, 2013 · 2 comments

Projects

None yet

2 participants

@kevinteg
kevinteg commented Apr 2, 2013

Hello,

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:

#562

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!

@kevinteg
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.

@bitprophet
Member

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