thebolt commented on PR #10706:
URL: https://github.com/apache/nuttx/pull/10706#issuecomment-1742477261

   Unfortunately I have to retract my last statement. I have found at least two 
more issues with the patchset:
   
   1. If pollsetup on a file does pollnotify with a mask that is not "caught" 
(in my case, eventfd does EPOLLOUT as long as it is not "full", but I don't 
listen to EPOLLOUT), then performing a epoll_wait with a short timeout where 
the EPOLLIN event does not happen will result in an infinite loop.
   My quick analysis is that pollsetup will set notified=true, revents=0, 
nxsem_tickwait returns -ETIMEDOUT, epoll_teardown returns 0 and the goto retry 
triggers, repeating infinitely. My local quick-fix right now is to set timeout 
= 0 when nxsem_tickwait returns -ETIMEDOUT
   
   2. A similar issue will happen if pollnotify with an not-listened-for-event 
happens during the wait. The same fix _should_ catch this as well though (as it 
basically forces no retry loops if the nxsem_tickwait times out).


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

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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

Reply via email to