[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-29 Thread Grant Edwards
On 2010-07-28, Grant Edwards grant.b.edwa...@gmail.com wrote: On 2010-07-28, Andrew Lunn and...@lunn.ch wrote: Where should the socket be freed? In bsd_accept() where it is removed from the queue? Or in socket.cxx when the fd/fp are freed? I would say in bsd_accept(). However, it would be

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Grant Edwards
On 2010-07-27, Jay Foster j...@systech.com wrote: You could try TCP/IP Illustrated, Volume 2 (and volume 1) by Gary R. Wright and W. Richard Stevens, published by Addison Wesley. It's a bit dated, but the basics are there. It shows the network code listings, bit by bit, with an

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Grant Edwards
On 2010-07-27, Grant Edwards grant.b.edwa...@gmail.com wrote: I'm seeing what appears to me to be a socket leak in the accept() operation provided by the new BSD network stack. The stack is definitely leaking sockets. I can now reliably reproduce the problem by opening a TCP connection and

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Grant Edwards
On 2010-07-28, Grant Edwards grant.b.edwa...@gmail.com wrote: On 2010-07-27, Grant Edwards grant.b.edwa...@gmail.com wrote: I'm seeing what appears to me to be a socket leak in the accept() operation provided by the new BSD network stack. The stack is definitely leaking sockets. I can now

Re: [ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Jay Foster
On 7/28/2010 12:56 PM, Grant Edwards wrote: On 2010-07-28, Grant Edwardsgrant.b.edwa...@gmail.com wrote: On 2010-07-27, Grant Edwardsgrant.b.edwa...@gmail.com wrote: I'm seeing what appears to me to be a socket leak in the accept() operation provided by the new BSD network stack. The

Re: [ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Andrew Lunn
On Wed, Jul 28, 2010 at 07:56:41PM +, Grant Edwards wrote: On 2010-07-28, Grant Edwards grant.b.edwa...@gmail.com wrote: On 2010-07-27, Grant Edwards grant.b.edwa...@gmail.com wrote: I'm seeing what appears to me to be a socket leak in the accept() operation provided by the new BSD

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Grant Edwards
On 2010-07-28, Jay Foster j...@systech.com wrote: On 7/28/2010 12:56 PM, Grant Edwards wrote: It's possible that this bug has been found and fixed in the free BSD sources. You could download the latest free BSD source Can I? I can browse SVN or CVS repositories (which is nightmarishly

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Grant Edwards
On 2010-07-28, Andrew Lunn and...@lunn.ch wrote: On Wed, Jul 28, 2010 at 07:56:41PM +, Grant Edwards wrote: On 2010-07-28, Grant Edwards grant.b.edwa...@gmail.com wrote: On 2010-07-27, Grant Edwards grant.b.edwa...@gmail.com wrote: I'm seeing what appears to me to be a socket leak in

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Grant Edwards
On 2010-07-28, Andrew Lunn and...@lunn.ch wrote: On Wed, Jul 28, 2010 at 07:56:41PM +, Grant Edwards wrote: On 2010-07-28, Grant Edwards grant.b.edwa...@gmail.com wrote: On 2010-07-27, Grant Edwards grant.b.edwa...@gmail.com wrote: I'm seeing what appears to me to be a socket leak in

Re: [ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Ross Younger
I can browse SVN or CVS repositories (which is nightmarishly slow and I can't grep for things). But, while you can browse sources, they don't allow sources to be checked out without prior authorization. FreeBSD's own notes (found at http://wiki.freebsd.org/SubversionPrimer) are a bit

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-28 Thread Grant Edwards
On 2010-07-28, Ross Younger w...@ecoscentric.com wrote: I can browse SVN or CVS repositories (which is nightmarishly slow and I can't grep for things). But, while you can browse sources, they don't allow sources to be checked out without prior authorization. FreeBSD's own notes (found at

[ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-27 Thread Grant Edwards
On 2010-07-27, Jay Foster j...@systech.com wrote: I don't know about the socket leak, per se, but I have had some dealings with the original BSD network stack with regards to the accept() call. From my memory, I remember there being two queues on which the socket might be placed

Re: [ECOS] Re: Socket leak when accept() is aborted by TCP RST?

2010-07-27 Thread Jay Foster
You could try TCP/IP Illustrated, Volume 2 (and volume 1) by Gary R. Wright and W. Richard Stevens, published by Addison Wesley. It's a bit dated, but the basics are there. It shows the network code listings, bit by bit, with an explanation for each line. Jay On 7/27/2010 3:39 PM, Grant