lib-bsd socket close issues

Matthew J Fletcher amimjf at gmail.com
Fri Apr 5 12:40:05 UTC 2019


Hi Peter,

I dont think netstat can do that. It just shows in the closed state as it
cannot connect (on purpose).



On Fri, 5 Apr 2019 at 12:35, Peter Dufault <dufault at hda.com> wrote:

> A basic question you probably checked: Are your sockets in TIME_WAIT state?
>
> On Apr 5, 2019, at 07:04 , Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
>
> On 05/04/2019 12:41, Matthew J Fletcher wrote:
>
> Hi,
>
> I've not been able to reproduce either in a simple test case yet, which
> would lead to the obvious conclusion that there is some fault in my
> application. However, from my diagnostics i can see that a) all opened
> socket FD's are being passed to close() and b) that close() is not
> returning an error. The particular case is when my application tries to
> connect(), which fails as the tcp port is not open.
>
> The application is a reasonably complex multi task project that will have
> lots of threads using sockets at the same time, could that be relevant ?
>
> Interestingly i've also had problems with the httpd (mongoose) server
> "leaking" if web pages are opened to quickly as well, i never really got to
> the bottom of it, i just ended up at 512 sockets and hope people dont view
> pages to quickly.
>
>
> You can view the status of the sockets with the "netstat -la" command.
> Maybe it helps to port also the SOCKSTAT(1) command:
>
>
> https://www.freebsd.org/cgi/man.cgi?query=sockstat&sektion=1&manpath=freebsd-release-ports
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
>
> Peter
> -----------------
> Peter Dufault
> HD Associates, Inc.      Software and System Engineering
>
> This email is delivered through the public internet using protocols
> subject to interception and tampering.
>
>

-- 

regards
---
Matthew J Fletcher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190405/283e8bc3/attachment.html>


More information about the users mailing list