This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Socket leak when accept() is aborted by TCP RST?


I'm seeing what appears to me to be a socket leak in the accept()
operation provided by the "new" BSD network stack.

One of my customers is doing something goofy (but legal) on his end
which occasionally opens a socket (SYN,SYN/ACK,ACK) and then 140-150
us later sends a TCP RST. This results in accept() on my end returning
-1 with errno set to 353 (ECONNABORTED).  Each time this happens it
appears that a socket gets leaked.  After about 240 such aborts, the
stack runs out of sockets (I've configured eCos for 256 sockets, and
there are 16 other sockets that are always in-use).

If the TCP connection stays open for even a few milliseconds (long
enoug for accept() to return >= 0), then I never have any problems.

Has anybody seen this issue before?

-- 
Grant Edwards               grant.b.edwards        Yow! I wish I was on a
                                  at               Cincinnati street corner
                              gmail.com            holding a clean dog!


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]