From: Daniel Drake <dsd@gentoo.org>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: "David Gómez" <david@pleyades.net>,
"Robert Love" <rml@novell.com>,
"John McCutchan" <ttb@tentacle.dhs.org>,
Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Problem with inotify
Date: Sun, 03 Jul 2005 00:38:11 +0100 [thread overview]
Message-ID: <42C72563.7040103@gentoo.org> (raw)
In-Reply-To: <Pine.LNX.4.60.0507022253080.30401@hermes-1.csi.cam.ac.uk>
Hi Anton,
Anton Altaparmakov wrote:
> Thinking about it some more made me realize that there may be a problem in
> inotify after all... Could you try the below patch to fs/inotify.c and
> tell me if it cures the lockup you are seeing? (Note patch compiles but
> is otherwise untested. But given it locks up without the patch it can't
> do much worse with it!)
Thanks for writing that patch, the effort is much appreciated. Unfortunately
it does not help :(
I've done a bit more investigating for you though. I did some tests purely on
the console, using inotify-test (from inotify-utils) which is the most
simplistic way you can use inotify: it just prints out the recieved events to
the screen.
I found out that unmount works perfectly well as long as there are no active
inotify watches (this might be quite obvious though!) - i.e. closing
inotify-test before unmounting results in a clean unmount. Unmounting while
inotify-test is watching the NTFS partition causes the freeze.
When the machine freezes, it still responds to ping, but not to ssh. Sysrq
works, so I got a sysrq-p trace:
Pid 8997 comm umount
EIP is at inotify_unmount_inodes+0x38/0x140
stack trace:
invalidate_inodes+0x40/0x90
generic_shutdown_super+0x59/0x140
kill_block_super+0x2d/0x50
deactivate_super+0x5a/0x90
sys_umount+0x3f/0x90
filp_close+0x52/0xa0
sys_oldumount+0x17/0x20
sysenter_past_esp+0x54/0x75
Investigating that function:
(gdb) list *inotify_unmount_inodes+0x38
0x9c8 is in inotify_unmount_inodes (inotify.c:565).
560 */
561 void inotify_unmount_inodes(struct list_head *list)
562 {
563 struct inode *inode, *next_i, *need_iput = NULL;
564
565 list_for_each_entry_safe(inode, next_i, list, i_sb_list) {
566 struct inode *need_iput_tmp;
567 struct inotify_watch *watch, *next_w;
568 struct list_head *watches;
569
I then added a loop counter printk in at line 569 above. It shows that the
loop iterates 8 times on a clean unmount, and goes into a seemingly infinite
loop (i.e. freeze) when unmounting with inotify watches active.
I don't know much about filesystem internals so I'm pretty stuck here, haven't
reached that chapter of Robert's book yet ;)
Please let me know if theres any other info I can provide.
Thanks,
Daniel
next prev parent reply other threads:[~2005-07-02 23:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-30 18:18 Problem with inotify David Gómez
2005-06-30 18:29 ` Robert Love
2005-06-30 18:38 ` David Gómez
2005-06-30 19:33 ` David Gómez
2005-06-30 20:39 ` Anton Altaparmakov
2005-06-30 20:48 ` David Gómez
2005-06-30 22:35 ` Anton Altaparmakov
2005-07-01 20:25 ` Robert Love
2005-07-02 12:54 ` David Gómez
2005-07-02 16:25 ` Robert Love
2005-07-02 9:12 ` Daniel Drake
2005-07-02 22:09 ` Anton Altaparmakov
2005-07-02 23:38 ` Daniel Drake [this message]
2005-07-03 0:08 ` Anton Altaparmakov
2005-07-03 10:34 ` Daniel Drake
2005-07-04 14:27 ` Anton Altaparmakov
2005-07-04 14:39 ` Anton Altaparmakov
2005-07-04 15:12 ` Anton Altaparmakov
2005-07-04 15:55 ` Gautam Singaraju
2005-07-04 16:00 ` Anton Altaparmakov
2005-07-04 17:57 ` Daniel Drake
2005-07-04 19:09 ` Anton Altaparmakov
2005-07-05 1:33 ` John McCutchan
2005-07-05 7:56 ` Anton Altaparmakov
2005-07-05 15:48 ` John McCutchan
2005-07-05 17:06 ` Anton Altaparmakov
2005-07-05 18:07 ` John McCutchan
2005-07-05 20:53 ` Anton Altaparmakov
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=42C72563.7040103@gentoo.org \
--to=dsd@gentoo.org \
--cc=aia21@cam.ac.uk \
--cc=david@pleyades.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@novell.com \
--cc=ttb@tentacle.dhs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.