You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/05 16:56:31 UTC

[GitHub] [incubator-nuttx] v01d opened a new issue #3375: FIFO CLEAN-UP AFTER CLOSING UNIX DOMAIN DATAGRAM SOCKET

v01d opened a new issue #3375:
URL: https://github.com/apache/incubator-nuttx/issues/3375


   ```
     Description: FIFOs are used as the IPC underlying all local Unix domain
                  sockets.  In NuttX, FIFOs are implemented as device drivers
                  (not as a special FIFO files).  The FIFO device driver is
                  instantiated when the Unix domain socket communications begin
                  and will automatically be released when (1) the driver is
                  unlinked and (2) all open references to the driver have been
                  closed.  But there is no mechanism in place now to unlink the
                  FIFO when the Unix domain datagram socket is no longer used.
                  The primary issue is timing.. the FIFO should persist until
                  it is no longer needed.  Perhaps there should be a delayed
                  call to unlink() (using a watchdog or the work queue).  If
                  the driver is re-opened, the delayed unlink could be
                  canceled?  Needs more thought.
                  NOTE: This is not an issue for Unix domain streams sockets:
                  The end-of-life of the FIFO is well determined when sockets
                  are disconnected and support for that case is fully implemented.
     Status:      Open
     Priority:    Low for now because I don't have a situation where this is a
                  problem for me.  If you use the same Unix domain paths, then
                  it is not a issue; in fact it is more efficient if the FIFO
                  devices persist.  But this would be a serious problem if,
                  for example, you create new Unix domain paths dynamically.
                  In that case you would effectively have a memory leak and the
                  number of FIFO instances grow.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org