Re: kernel BUG at kernel/sched/core.c:3490!

From: Kohli, Gaurav
Date: Sat Jan 12 2019 - 03:57:21 EST


HI Peter, Oleg,

as per flag and state this seems to be possible only from below code:
XXX: 0 1 0x40844c
PF_NOFREEZE
PF_RANDOMIZE
PF_SIGNALED
PF_FORKNOEXEC
PF_EXITING
PF_EXITPIDONE

above state shows do_exit runs properely and if somehow after parked stated , TASK_WAKEKILL got set and signal_pending_state returns 1 in below case:

switch_count = &prev->nivcsw;
if (!preempt && prev->state) {
if (unlikely(signal_pending_state(prev->state, prev))) {
prev->state = TASK_RUNNING;
} else {
deactivate_task(rq, prev, DEQUEUE_SLEEP | DEQUEUE_NOCLOCK);

Regards
Gaurav


On 1/11/2019 9:47 PM, Qian Cai wrote:
On Fri, 2019-01-11 at 16:07 +0530, Kohli, Gaurav wrote:

On 1/7/2019 11:26 PM, Oleg Nesterov wrote:
pr_crit("XXX: %ld %d\n", current->state, current->on_rq);

Can we also add flags, this may help to know the path of problem:

 pr_crit("XXX: %ld %d 0x%x\n", current->state, current->on_rq,
current->flags);


XXX: 0 1 0x40844c


--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.