See https://github.com/dsheets/ocaml-inotify-event/blob/master/src/inotify_events.ml#L38
The fix is too run:
(* Block until there is something to read. Otherwise, our ioctl
returns 0 and then makes a 0 read which errors with EINVAL. *)
ignore (Unix.select [inotify] [] [] ~-.1.);
before calling Inotify.read