ev_stat inotify implementation might miss events

Marc Lehmann schmorp at schmorp.de
Tue Jan 26 05:29:51 CET 2010


On Mon, Jan 25, 2010 at 04:13:50PM +0100, Yoann Vandoorselaere <yoann.v at prelude-ids.com> wrote:
> The ev_stat inotify backend can miss files events while the ev_stat
> notification callback execute. If additional changes occurs before the
> main libev loop resume, the events will be lost.

Hmm, could it be that you are losing events *after* your callback
executes?

If yes, then current cvs might fix this - there was indeed a race
condition in the inotify code, but again from your description and:

> Removing the call to ev_stat_stat() fixes the problem. 

... this is unlikely to be the same issue, as the ev_stat_stat does
nothing, and libev still will not guarantee that all the events you expect
will be reported (again, it's impossible to give you an event for every
change).

So, barring a kernel bug, this would really seem to be a bug in your
expectations.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list