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

Many files problem on OSX Sierra #620

Merged
merged 2 commits into from
Jan 23, 2017

Conversation

sideshowcoder
Copy link
Collaborator

@sideshowcoder sideshowcoder commented Jan 17, 2017

It seems like there is a problem with fsevents when dealing with a large amount
of files on OSX sierra this added test fails reliably on mac Macbook Pro, with
the error

2017-01-17 22:52 filemonitor.test[69205] (FSEvents.framework)
FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc()
=> (null) (-22)

To test this up the count of files in filemonitor_test.TestFileMonitorFiles,
to something like 5000 and the error will show up in the log when running
make test-go.

To fix this the proposed quick solution is to on OSX monitor directories instead
of files, when a file is added to the watch list compute the directory it is
contained in and monitor this directory via FSEvents. This can cause more
restarts than before.

fixes #607 #589

It seems like there is a problem with fsevents when dealing with a large amount
of files on OSX sierra this added test fails reliably on mac Macbook Pro, with
the error

```
2017-01-17 22:52 filemonitor.test[69205] (FSEvents.framework)
FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc()
=> (null) (-22)
```

This more or less reporduces #589 #605 #607 on the basis of this being related
to many files the fix would be to not monitor files individualy on OSX but
rather monitor directories and filter client side, this should reduce the number
of files / directories to be monitored.
OSX is much more limited in the amount of files to keep open compared to other
unixes since Sierra. So instead of monitoring files we monitor directories and
assume a change in the directory warents a restart.

This is less than ideal but should provide a quick fix for the current problem
on Sierra erroring on large applications.
@sideshowcoder sideshowcoder merged commit a36f42b into master Jan 23, 2017
@sideshowcoder sideshowcoder deleted the macos-sierra-many-files-problem branch January 23, 2017 10:39
@sideshowcoder
Copy link
Collaborator Author

This has been released as 0.15.13.pre

@gjtorikian
Copy link

Thank you so much, @sideshowcoder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zeus crashing in Sierra
2 participants