[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>

Howdy,

12 messages 2006/09/09
[#8817] Re: Segfault in libc strlen, via rb_str_new2 — Eric Hodel <drbrain@...7.net> 2006/09/09

On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:

Re: RDoc patch, possible bug in socket.c for TCPSocket.new

From: gwtmp01@...
Date: 2006-09-26 21:22:14 UTC
List: ruby-core #8929
On Sep 26, 2006, at 3:26 PM, Daniel Berger wrote:
> Also, I think there's a bug with the local connection not closing  
> properly.
> The local connection appears to go into a TIME_WAIT, and it looks  
> to me like
> it's the OS that finally closes it out.   Here's a short program to
> demonstrate:

This is the normal behavior for a TCP session.  After the server  
sends the
final ACK to the client, the TCP session must remain in the TIME_WAIT  
state
for twice the maximum segment lifetime.  The delay is to handle lost  
acks,
or stray duplicate segments that arrive after the session has been  
closed.  It
is the kernel that takes care of this housekeeping.

See Stevens, TCP/IP Illustrated V1 p 242 for details.

> Also, if I try to connect while it's in a TIME_WAIT state, I get this:
>
> tcpsocket.rb:5:in `initialize': Address family not supported by  
> protocol
> family - bind(2) (Errno::EAFNOSUPPORT)
>        from tcpsocket.rb:5

Is this an error from the client trying to connect to the server in  
the TIME_WAIT
state or is this the error you are getting from the server trying to  
restart and
bind and reuse the local port that is still in the TIME_WAIT state?

You use of the word 'connect' is a bit confusing since that is not  
generally used
to describe the behavior of a TCP server.

Gary Wright




In This Thread

Prev Next