LKML Archive on
help / color / mirror / Atom feed
* inotify_add_watch() returning ENOSPC in 2.6.24 [watch descriptor leak?]
@ 2008-02-06  1:49 Clem Taylor
  2008-02-06  9:51 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Clem Taylor @ 2008-02-06  1:49 UTC (permalink / raw)
  To: linux-kernel

I'm trying to move a MIPS based embedded system from to
2.6.24. Most things seem to be working, but I'm having troubles with
inotify. The code is using inotify to detect a file written to /tmp
(tmpfs). The writer creates a file with a temporary name and then
rename()s the tmp file over the file I'm monitoring.

With, everything works fine, but with 2.6.24, the inotify
process runs for a while (~100 events) and then inotify_add_watch()
returns ENOSPC. Once this happens, I can't add new watches, even if I
kill the process and restart it. fs.inotify.max_user_instances and
fs.inotify.max_user_watches are both 128, so I'd imagine I'm hitting
this limit. For some reason the watches aren't getting cleaned up
(even after the process is killed).

In a loop, the code is doing:
    wd = inotify_add_watch(fd, file, IN_CLOSE_WRITE|IN_DELETE_SELF|IN_ONESHOT);
    blocking read on notify fd

Has something changed in the inotify() API since, or could
this be a leak?


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-02-07 21:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-06  1:49 inotify_add_watch() returning ENOSPC in 2.6.24 [watch descriptor leak?] Clem Taylor
2008-02-06  9:51 ` Andrew Morton
2008-02-06 19:40   ` Clem Taylor
2008-02-07  3:04     ` Amy Griffis
2008-02-07 18:54     ` Ulisses Furquim
2008-02-07 21:24       ` Clem Taylor
2008-02-07 21:44         ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).