Re: POE::Component::Generic and Net::OpenSSH
[email protected] (Salvador Fandino) Fri, 19 Feb 2010 09:45:10 +0100
| Newsgroups | perl.poe |
|---|---|
| Message-ID | <[email protected]> |
Sawyer wrote: > Hi. > > I've been using PoCo::Generic for some time now. I've written my own > (small) Moose-wrapped POE component for Net::OpenSSH using > PoCo::Generic (POE::Component::OpenSSH). > > Oddly enough, only recently I found a very weird behavior. > > If I try to run "scp_put" on a PoCo::Generic wrapper of Net::OpenSSH, > the session stalls and hangs till infinity. Basically the DESTROY > method of the Net::OpenSSH object isn't being called, thus not exiting > the SSH session. If I run the "system" method (which is basically raw > commands like "echo hello"), it will exit just fine. > > I've been debugging this for two days now and I don't think the > problem is in Net::OpenSSH. > > I've also noticed that if I run a "system" method and then an > "scp_put" method, it will exit fine, as if it needs some input from > the program back (whatever the result of the "system" method was) in > order to close and with just "scp_put" it doesn't. > > I've no more idea where to continue debugging this, I would appreciate > any help on this. Run the script with $Net::OpenSSH::debug = -1 and let me see the output. A capture at the kernel level with strace, truss or similar may also help (note that passwords and SSH keys will be visible). Also, ensure that child processes are also traced. - Salva.