From: Peter Zijlstra <peterz@infradead.org>
To: Qian Cai <cai@lca.pw>
Cc: Ingo Molnar <mingo@redhat.com>,
linux kernel <linux-kernel@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
gkohli@codeaurora.org
Subject: Re: kernel BUG at kernel/sched/core.c:3490!
Date: Mon, 7 Jan 2019 14:52:15 +0100 [thread overview]
Message-ID: <20190107135215.GG14122@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <ba9c5ad8-d78c-904d-0430-a67d8e3ea729@lca.pw>
On Tue, Jan 01, 2019 at 12:44:35AM -0500, Qian Cai wrote:
> Running some mmap() workloads to put the system on low memory situation with
> swapping and OOM, and then it trigger this BUG(),
>
> void __noreturn do_task_dead(void)
> {
> /* Causes final put_task_struct in finish_task_switch(): */
> set_special_state(TASK_DEAD);
>
> /* Tell freezer to ignore us: */
> current->flags |= PF_NOFREEZE;
>
> __schedule(false);
> BUG();
>
> /* Avoid "noreturn function does return" - but don't continue if BUG()
> is a NOP: */
> for (;;)
> cpu_relax();
> }
This would mean that we somehow loose the TASK_DEAD state before hitting
schedule(), but that is something that should be avoided by
set_special_state(), which is supposed to serialize against concurrent
wake-ups.
Also see commit: b5bf9a90bbeb ("sched/core: Introduce set_special_state()")
How readily does this reproduce?
next prev parent reply other threads:[~2019-01-07 13:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 5:44 kernel BUG at kernel/sched/core.c:3490! Qian Cai
2019-01-07 13:52 ` Peter Zijlstra [this message]
2019-01-07 14:36 ` Qian Cai
2019-01-07 17:56 ` Oleg Nesterov
2019-01-11 10:37 ` Kohli, Gaurav
2019-01-11 16:17 ` Qian Cai
2019-01-12 8:54 ` Kohli, Gaurav
2019-01-16 17:32 ` Oleg Nesterov
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=20190107135215.GG14122@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=cai@lca.pw \
--cc=gkohli@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.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).