linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Olivier Chapelliere <olivier.chapelliere@alcmeon.com>
Cc: jack@suse.cz, linux-fsdevel@vger.kernel.org
Subject: Re: stuck in inotify_release
Date: Thu, 28 Mar 2019 10:52:07 +0100	[thread overview]
Message-ID: <20190328095207.GD22915@quack2.suse.cz> (raw)
In-Reply-To: <CANp+0hhbsegocrx-MK0DS=Qx4DfivB27nSKHrukiFAY6x6cJQA@mail.gmail.com>

Hello,

On Thu 28-03-19 09:26:45, Olivier Chapelliere wrote:
> According to what I read on internet you seem to be the right person to get
> in touch with when one has problems with inotify.

Yes, there's also linux-fsdevel@vger.kernel.org mailing list which we use
(added to CC).

> We are monitoring several directories in python processes through inotify.
> But after few days all processes are stuck in a call to inotify_release.
> Once I detected the problem, I dumped info to dmesg with sysrq-trigger
> (dmesg content attached):
> echo w > /proc/sysrq-trigger

Looking through the stack traces, all of them wait in fput() ->
inotify_release() -> ... -> fsnotify_wait_marks_destroyed() ->
flush_delayed_work(&reaper_work). So they wait for worker process to
destroy all marks for the group. However that worker (kworker/u8:4) is
stuck in:

fsnotify_mark_destroy_workfn() -> synchronize_srcu(&fsnotify_mark_srcu)

So the question is who is holding fsnotify_mark_srcu so that SRCU cannot
declare new grace period. I don't see any such process among the processes
you've shown in the dump (but it should be there) so it's a bit of a
mystery.

> Our production env is ubuntu 18.04 kernel 4.15 fs ext4
> This problem appears on a weekly basis so I will be able to run additional
> commands to track down the issue if needed.

So when this happens again, try grabbing output of sysrq-l and sysrq-t if
we can find the task holding fsnotify_mark_srcu.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

       reply	other threads:[~2019-03-28  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANp+0hhbsegocrx-MK0DS=Qx4DfivB27nSKHrukiFAY6x6cJQA@mail.gmail.com>
2019-03-28  9:52 ` Jan Kara [this message]
2019-05-06 18:54   ` stuck in inotify_release Olivier Chapelliere
2019-05-14  6:22     ` Olivier Chapelliere
2019-05-14  9:25     ` Jan Kara
     [not found]       ` <CANp+0hiZt=oEWMUqRC-pv9=8JnvSyPcpDCf+O5whth1C_q0jNA@mail.gmail.com>
     [not found]         ` <CAC8Mkjy=igiQatSVXNXphjyzGn2faZ75XZZGANWOtt3hvwk8DA@mail.gmail.com>
2019-05-14 15:44           ` Jan Kara

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=20190328095207.GD22915@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=olivier.chapelliere@alcmeon.com \
    /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;
as well as URLs for NNTP newsgroup(s).