Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??

I'm afraid I don't have any easy way to recreate it, other than throwing a lot of clients at it. It's perl 5.8.4 running under Linux 2.6.8. If I use the list form of accept, I get back the peer address correctly. Here's some debugging code:

foreach my $socket (@ready) { print STDERR "Start accept\n"; my ($connect, $paddr) = $socket->accept(); my ($port, $iaddr) = sockaddr_in($paddr); print STDERR "Peer: ", inet_ntoa($iaddr), ":$port\n"; if ($connect) { if (!$connect->peerhost()) { cluck("NULL PEERHOST: " . join(" : ", $connect->sockhost(), $connect->sockport(), $connect->peerhost(), $connect->peerport(), $! )); close($connect); print STDERR "End accept (no peerhost) +\n"; next; } $CLIENTS->add($connect); print STDERR "End accept (success)\n"; next; } print STDERR "End accept (no connect)\n"; }

Output looks like this:

Start accept
Peer: X.X.X.X:15627
NULL PEERHOST: Y.Y.Y.Y : 1235 :  :  : Transport endpoint is not connected at ./foo.pl line 115
End accept (no peerhost)
Where X.X.X.X is the client ip and Y.Y.Y.Y is my server ip. Perhaps this is an IO::Socket::INET bug?

On a related note, I'm also getting segfaults from perl under heavy load (~2500+ clients). The segfaults don't seem to be related to the null peerhosts. I believe they're occuring on syswrite() calls when I'm sending text back to the clients.

-Matt


In reply to Re^2: Transport endpoint not connected by DrManhattan
in thread Transport endpoint not connected by DrManhattan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.