Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 197966 - LinuxNotifier could watch many more dirs using extra file handles
LinuxNotifier could watch many more dirs using extra file handles
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Filesystems
7.0
PC Linux
: P3 (vote)
: 7.0.1
Assigned To: Jaroslav Tulach
issues@platform
: PERFORMANCE
Depends on: 185135
Blocks: 190675 26230
  Show dependency treegraph
 
Reported: 2011-04-21 19:49 UTC by Jesse Glick
Modified: 2011-05-09 10:55 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Multiple PollFd instances (8.09 KB, patch)
2011-04-25 16:13 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-04-21 19:49:44 UTC
See bug #190675 comment #7. A major limitation of the Linux FS notifier using inotify is that Linux distributions typically set the fs.inotify.max_user_watches to 8192 by default, too small for watching a big tree. You can increase your limit manually but most people will not have done so.

One possible way around this limitation might be to cheat a little and open additional file handles when you run out of watches on the first handle. Would make the implementation more complex, but could greatly expand the limit.

Marking as a DEFECT since the current implementation does not even check the return value of inotify_add_watch - so if you run out of watches, the IDE will just silently not listen for additional changes, until some recursive listeners are removed.
Comment 1 Jaroslav Tulach 2011-04-25 11:57:01 UTC
Reporting errors during add_watch: ergonomics#74b0a4008588, making enhancement.
Comment 2 Jaroslav Tulach 2011-04-25 15:30:51 UTC
Calling select via JNA seems impossible (one cannot call FD_XXX macros). Using poll looks much easier.
Comment 3 Jaroslav Tulach 2011-04-25 16:13:44 UTC
Created attachment 107930 [details]
Multiple PollFd instances
Comment 4 Jaroslav Tulach 2011-04-25 16:16:25 UTC
Here is a patch that allocates new instances of inotify, but as soon as first one hits a limit, all of the new ones return -1/28 error too. Looks like the inotify limit is per user/process in spite what documentation says!?

If you can find out why the patch does not work for me, that would be great.
Comment 5 Jaroslav Tulach 2011-05-09 10:55:51 UTC
Looks like Jesse's suggestion does not work.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo