Re: lib-bsd socket close issues

2019-04-05 Thread Sebastian Huber
On 05/04/2019 14:40, Matthew J Fletcher wrote: Hi Peter, I dont think netstat can do that. It just shows in the closed state as it cannot connect (on purpose). The netstat command can should you if TCP sockets are in the TIME_WAIT state. -- Sebastian Huber, embedded brains GmbH Address :

Re: lib-bsd socket close issues

2019-04-05 Thread Matthew J Fletcher
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 wrote: > A basic question you probably checked: Are your sockets in TIME_WAIT state? > > On Apr 5, 2019, at 07:04 , Sebastian Huber < > s

Re: lib-bsd socket close issues

2019-04-05 Thread Peter Dufault
A basic question you probably checked: Are your sockets in TIME_WAIT state? > On Apr 5, 2019, at 07:04 , Sebastian Huber > 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 obviou

Re: lib-bsd socket close issues

2019-04-05 Thread Sebastian Huber
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

Re: lib-bsd socket close issues

2019-04-05 Thread Matthew J Fletcher
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 err

Re: lib-bsd socket close issues

2019-04-04 Thread Sebastian Huber
On 05/04/2019 01:17, Chris Johns wrote: On 5/4/19 4:53 am, Matthew J Fletcher wrote: Hi Sebastian I used rtems_task_wake_after(). On Thu, 4 Apr 2019, 18:22 Sebastian Huber, mailto:sebastian.hu...@embedded-brains.de>> wrote: How do you wait. Is this a busy wait? - Matthew J Fle

Re: lib-bsd socket close issues

2019-04-04 Thread Chris Johns
On 5/4/19 4:53 am, Matthew J Fletcher wrote: > Hi Sebastian > > I used rtems_task_wake_after(). > > > On Thu, 4 Apr 2019, 18:22 Sebastian Huber, > wrote: > > How do you wait. Is this a busy wait? > > - Matthew J Fletcher mailto:ami...@gma

Re: lib-bsd socket close issues

2019-04-04 Thread Matthew J Fletcher
Hi Sebastian I used rtems_task_wake_after(). On Thu, 4 Apr 2019, 18:22 Sebastian Huber, < sebastian.hu...@embedded-brains.de> wrote: > How do you wait. Is this a busy wait? > > - Matthew J Fletcher schrieb: > > replying to myself. > > > > With a 1 second pause between socket() and close()

Re: lib-bsd socket close issues

2019-04-04 Thread Sebastian Huber
How do you wait. Is this a busy wait? - Matthew J Fletcher schrieb: > replying to myself. > > With a 1 second pause between socket() and close() and 512 sockets it will > still ENOBUFS,.. without calculating it properly thats easily 10 minutes > since the first socket was allocated,. that mu

Re: lib-bsd socket close issues

2019-04-04 Thread Matthew J Fletcher
replying to myself. With a 1 second pause between socket() and close() and 512 sockets it will still ENOBUFS,.. without calculating it properly thats easily 10 minutes since the first socket was allocated,. that must be enough time to start freeing the socket buffers internally. On Thu, 4 Apr 20

lib-bsd socket close issues

2019-04-04 Thread Matthew J Fletcher
Hi, I have noticed an issue with lib-bsd that the legacy stack does not have. If have a loop that does for (;;) { wait(100) // milliseconds socket() // allocate close() // free } then i can see the socket numbers allocated upwards, but eventually the get ENOBUFS from socket(),.. allocatin