From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: syzbot <syzbot+8cc1843d4eec9c0dfb35@syzkaller.appspotmail.com>,
aarcange@redhat.com, avagin@gmail.com, davem@davemloft.net,
ebiederm@xmission.com, linux-kernel@vger.kernel.org,
oleg@redhat.com, prsood@codeaurora.org,
syzkaller-bugs@googlegroups.com, tj@kernel.org,
Ingo Molnar <mingo@kernel.org>
Subject: Re: INFO: task hung in exit_mm
Date: Tue, 2 Jul 2019 11:36:08 +0200 [thread overview]
Message-ID: <20190702093608.GG3463@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190702090608.GA3419@hirez.programming.kicks-ass.net>
On Tue, Jul 02, 2019 at 11:06:08AM +0200, Peter Zijlstra wrote:
> On Mon, Jul 01, 2019 at 05:14:12PM -0700, Andrew Morton wrote:
> > On Mon, 01 Jul 2019 01:27:04 -0700 syzbot <syzbot+8cc1843d4eec9c0dfb35@syzkaller.appspotmail.com> wrote:
> >
> > > Hello,
> > >
> > > syzbot found the following crash on:
> >
> > At a guess I'd say that perf_mmap() hit a deadlock on event->mmap_mutex
> > while holding down_write(mmap_sem) (via vm_mmap_pgoff). The
> > down_read(mmap_sem) in do_exit() happened to stumble across this and
> > that's what got reported.
>
> lockdep never reported that and I don't see event->mmap_mutex being held
> anywhere.
>
> AFAICT CPU0 is running 8355 and only 'has' mmap_sem -- it's blocked
> waiting to acquire.
>
> CPU1 is running 8354 and has mmap_sem and is waiting to acquire
> event->mmap_mutex.
>
> But nobody is actually owning it
>
> We take mmap_mutex in:
>
> perf_mmap() - called with mmap_sem held
> perf_mmap_close() - called with mmap_sem held
>
> _free_event() - no faults/mmap while holding it
> perf_poll() - idem
> perf_event_set_output() - idem
>
> I don't see any of those functions in the below stacktrace, and having
> just looked them over, I don't see how they would end up trying to
> acquire mmap_sem and AB-BA.
>
> Now, clearly there's something screwy, but I'm not seeing a deadlock.
> Let me go play with that reproducer.
>
> > > HEAD commit: 249155c2 Merge branch 'parisc-5.2-4' of git://git.kernel.o..
> > > git tree: upstream
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=1306be61a00000
> > > kernel config: https://syzkaller.appspot.com/x/.config?x=9a31528e58cc12e2
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=8cc1843d4eec9c0dfb35
> > > compiler: clang version 9.0.0 (/home/glider/llvm/clang
Also note that I very much do not trust that compiler to build a working
kernel. There's still known code-gen bugs with it.
prev parent reply other threads:[~2019-07-02 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 8:27 INFO: task hung in exit_mm syzbot
2019-07-02 0:14 ` Andrew Morton
2019-07-02 9:06 ` Peter Zijlstra
2019-07-02 9:36 ` Peter Zijlstra [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=20190702093608.GG3463@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@gmail.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=prsood@codeaurora.org \
--cc=syzbot+8cc1843d4eec9c0dfb35@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tj@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