From: Marc Giger <gigerstyle@gmx.ch>
To: linux-kernel@vger.kernel.org
Subject: Missing inotify events
Date: Wed, 21 Mar 2012 16:42:52 +0100 [thread overview]
Message-ID: <20120321164252.7b5ff276@rigi.itserve.ch> (raw)
Hello,
I have a Java application which writes multiple files in a short period of time. When I watch the
filechanges with inotifywait sometimes events are missing. To find out what's going on I straced
the java application to see if the files are e.g. properly closed:
26467 open("/tmp/refapps2/20051002/giger/documents/891877A1C3FB7CEA477B/1332340770691_Ping_unknown_TransmitterRequestRaw_UTF-8.xml", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 804
26467 close(804) = 0
26467 open("/tmp/refapps2/20051002/giger/documents/891877A1C3FB7CEA477B/1332340770728_PingResponse_unknown_TransmitterResponseRaw_UTF-8.xml", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 805
26467 close(805)
inotifywait reports:
/tmp/refapps2/20051002/giger/documents/ CREATE,ISDIR 891877A1C3FB7CEA477B
/tmp/refapps2/20051002/giger/documents/ OPEN,ISDIR 891877A1C3FB7CEA477B
/tmp/refapps2/20051002/giger/documents/ CLOSE_NOWRITE,CLOSE,ISDIR 891877A1C3FB7CEA477B
/tmp/refapps2/20051002/giger/documents/891877A1C3FB7CEA477B/ CREATE 1332340770728_PingResponse_unknown_TransmitterResponseRaw_UTF-8.xml
/tmp/refapps2/20051002/giger/documents/891877A1C3FB7CEA477B/ OPEN 1332340770728_PingResponse_unknown_TransmitterResponseRaw_UTF-8.xml
/tmp/refapps2/20051002/giger/documents/891877A1C3FB7CEA477B/ MODIFY 1332340770728_PingResponse_unknown_TransmitterResponseRaw_UTF-8.xml
/tmp/refapps2/20051002/giger/documents/891877A1C3FB7CEA477B/ CLOSE_WRITE,CLOSE 1332340770728_PingResponse_unknown_TransmitterResponseRaw_UTF-8.xml
This behavior can be repeated easily, but not that easy when running the app under strace (timing issue?).
I would expect that I get _all_ events as long as the event-queue is not full. No?
Ubuntu Kernel 2.6.32-37-server and also vanilla-kernel 3.2.6 running gentoo behave the same way.
Marc
reply other threads:[~2012-03-21 15:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120321164252.7b5ff276@rigi.itserve.ch \
--to=gigerstyle@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®