[Dovecot] Re: Dovecot inotify problem
Johannes Berg
johannes at sipsolutions.net
Mon Aug 22 10:04:07 EEST 2005
Hi Reuben,
I hope you don't mind me copying the dovecot list again.
> dovecot: Aug 21 04:08:22 Error: IMAP(reuben): inotify_rm_watch() failed:
> Invalid argument
Odd.
> This is with a 2.6.13-rc6-mm1 release. I've posted to LKML because there is
> also a kernel stack produced at one point which looks inotify related (but the
> messages above are contant).
> See http://www.ussg.iu.edu/hypermail/linux/kernel/0508.2/1180.html and the
> followup from akpm.
Thanks for the link. I don't think akpm is right, unless something is
really odd here. Could you add debugging output for me please?
Maybe something like (this is not a patch you can apply, look at line
164 in src/lib/ioloop-notify-inotify.c)
ctx->inotify_fd = inotify_init();
+ i_warning("inotify_init returned fd %d", ctx->inotify_fd);
if (ctx->inotify_fd == -1) {
and line 106:
IN_CLOSE | IN_MODIFY);
+ i_warning("inotify_add_watch returned %d", watchdescriptor);
if (watchdescriptor < 0) {
and line 145:
}
+ inotify_rm_watch("removing wd %d from inotify fd %d", io->notify_context, ctx->inotify_fd);
if (inotify_rm_watch(ctx->inotify_fd, io->notify_context) < 0)
Or something similar.
If that doesn't help and output looks consistent (we're not removing a
watch descriptor from a wrong fd etc.), can you try removing the
fd_close_on_exec call please (line 171)? I don't know if that could
cause trouble (I don't even think that the imap binary ever forks) but
you never know.
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20050822/c932b936/attachment.pgp
More information about the dovecot
mailing list