From: Dominique Martinet <asmadeus@codewreck.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Latchesar Ionkov <lucho@ionkov.net>,
Eric Van Hensbergen <ericvh@gmail.com>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
LKML <linux-kernel@vger.kernel.org>,
syzbot <syzbot+f425456ea8aa16b40d20@syzkaller.appspotmail.com>,
Al Viro <viro@zeniv.linux.org.uk>,
v9fs-developer@lists.sourceforge.net,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Ron Minnich <rminnich@sandia.gov>
Subject: Re: [V9fs-developer] INFO: task hung in grab_super
Date: Fri, 3 Aug 2018 00:18:30 +0200 [thread overview]
Message-ID: <20180802221830.GA18901@nautica> (raw)
In-Reply-To: <CACT4Y+YShmryp_RJErUrjP=9GJ3YcRPLXyQP8XKoA9AW114Ygg@mail.gmail.com>
Dmitry Vyukov via V9fs-developer wrote on Wed, Jul 18, 2018:
> >> Btw, I see that p9_client_rpc uses wait_event_killable, why wasn't it
> >> killed along with the whole process?
> >>
> >
> > wait_event_killable() would return -ERESTARTSYS if got SIGKILL.
> > But if (c->status == Connected) && (type == P9_TFLUSH) is also true,
> > it ignores SIGKILL by retrying the loop...
> >
> > again:
> > err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD);
> > if ((err == -ERESTARTSYS) && (c->status == Connected) && (type == P9_TFLUSH)) {
> > sigpending = 1;
> > clear_thread_flag(TIF_SIGPENDING);
> > goto again;
> > }
> >
> > I wish they don't ignore SIGKILL (by e.g. offloading operations to a kernel thread).
>
>
> I guess that's the problem, right? SIGKILL-ed task must not ignore
> SIGKILL and hang in infinite loop. This would explain a bunch of hangs
> in 9p.
Tricky with the current way we handle this, as the normal action if
wait_event_killable is interrupted is to send a tflush message (which is
what you could also notice, if you just send one sigkill it'll just send
a flush message and wait for that instead)
There's work in progress to add refcounting to requests which would make
us one step closer to being able to not wait for the flush reply (or
rather, it'll give us the ability to wait for it asynchronously) ; we
should be able to get rid of that loop after that.
--
Dominique
prev parent reply other threads:[~2018-08-02 22:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 10:38 INFO: task hung in grab_super syzbot
2018-07-18 10:49 ` Tetsuo Handa
2018-07-18 11:02 ` Dmitry Vyukov
2018-07-18 11:41 ` Dmitry Vyukov
2018-07-18 12:53 ` Tetsuo Handa
2018-07-18 13:04 ` Dmitry Vyukov
2018-07-18 13:35 ` Tetsuo Handa
2018-07-18 14:11 ` Dmitry Vyukov
2018-07-18 14:17 ` Tetsuo Handa
2018-11-02 19:19 ` Dmitry Vyukov
2018-11-02 22:45 ` Dominique Martinet
2018-08-02 22:18 ` Dominique Martinet [this message]
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=20180802221830.GA18901@nautica \
--to=asmadeus@codewreck.org \
--cc=dvyukov@google.com \
--cc=ericvh@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rminnich@sandia.gov \
--cc=syzbot+f425456ea8aa16b40d20@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=viro@zeniv.linux.org.uk \
/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).