Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable fsnotify recursive test under Darwin #6962

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Apr 26, 2018

A race has been discovered in the kqueue implementation of fsnotify which causes installation of a watch to a subdirectory of an already watched directory to fail occasionally.

Disabled the test because Auditbeat doesn't use fsnotify under Darwin, so there is no point on testing it anyway.

From my investigation it resulted that sometimes a directory creation event from the kernel is received twice. In Auditbeat, we react to the first one by adding a watch to the directory. Once the second event arrives, fsnotify overwrites the watch with an internal one, as it needs to install a watch on every file and directory it monitors. This second watch registers to receive events from the kernel when the directory is moved or deleted, but ignores when files are added to the directory.

A race has been discovered in the kqueue implementation of fsnotify
which causes installation of a watch to a subdirectory of an already
watched directory to fail occasionally.

Disabled the test because Auditbeat doesn't use fsnotify under Darwin,
so there is no point on testing it anyway.

From an initial investigation it resulted that  sometimes a directory
creation event from the kernel is received twice. In Auditbeat, we react
to the first one by adding a watch to the directory. Once the second
event arrives, fsnotify overwrites the watch with an internal one, as it
needs to install a watch on every file and directory it monitors.
@andrewkroh andrewkroh merged commit f29f61e into elastic:master Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants