lib-bsd socket close issues

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Apr 5 06:59:12 UTC 2019


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, <sebastian.huber at embedded-brains.de
>> <mailto:sebastian.huber at embedded-brains.de>> wrote:
>>
>>      How do you wait. Is this a busy wait?
>>
>>      ----- Matthew J Fletcher <amimjf at gmail.com <mailto:amimjf at gmail.com>> 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 must be enough time to start
>>      > freeing the socket buffers internally.
>>      >
>>      >
>>      > On Thu, 4 Apr 2019 at 16:47, Matthew J Fletcher <amimjf at gmail.com
>>      <mailto:amimjf at gmail.com>> wrote:
>>      >
>>      > > 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
>>      > > }
> Are you able to make a small stand alone test?

Yes, a self contained test case would be helpful. I cannot reproduce the 
issue with the modified test case in attached patch for libbsd.

-- 
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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-syscalls01-Add-infinite-socket-close-test.patch
Type: text/x-patch
Size: 1058 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20190405/36f508d9/attachment-0002.bin>


More information about the users mailing list