Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: Net::OpenSSH - page not loading completely

by Eliya (Vicar)
on Apr 16, 2012 at 16:08 UTC ( #965345=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Net::OpenSSH - page not loading completely
in thread Net::OpenSSH - page not loading completely

Looks like your system isn't automatically resuming interrupted system calls.1

You could try modifying the module's code in order to do it manually.  Resuming a system call manually means to simply call it again if $! is EINTR or ERESTART.  In this particular case, look for line 755 in OpenSSH.pm

$r = waitpid($pid, WNOHANG) and last;

and modify it to read

do { $r = waitpid($pid, WNOHANG); } while $r<0 and ($! == Errno::EINTR or $! == Errno::ERESTART); last if $r;

This should take care of this particular waitpid call which produced the message in the debug log.  There are more, though, which would likely need a similar treatment, so it's probably best to get in touch with the module's author... (he frequents this place regularly, so he'll probably see the thread sooner or later, anyway).

___

1 System calls may be interrupted for a variety of reasons. The more loaded a system, the more often it happens.  Most systems these days automatically resume them, so code isn't always written to handle the rare case where you have to do it manually...


Comment on Re^5: Net::OpenSSH - page not loading completely
Select or Download Code
Re^6: Net::OpenSSH - page not loading completely
by salva (Monsignor) on Apr 16, 2012 at 16:59 UTC
    The return value of waitpid is positive so the value of $! is useless. The EINTR probably cames from the previous select call on the loop that is interrupted by the SIGCHLD arriving.

    IMO, the way to solve this problem involves strace or some similar utility.

      Thanks for both replies. I will try tracing this with strace as suggested when I have some time. Unfortunately, I'm doing this at work so the time I can dedicate to it is limited!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-08-27 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls