WARNING in can_migrate_task

17 views
Skip to first unread message

syzbot

unread,
May 7, 2019, 2:57:07 PM5/7/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 0f36e8ef ANDROID: cuttlefish 4.14: enable CONFIG_CRYPTO_AE..
git tree: android-4.14
console output: https://syzkaller.appspot.com/x/log.txt?x=114a1822a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=1edd8926524a47c9
dashboard link: https://syzkaller.appspot.com/bug?extid=0c79a0958d5004295801
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+0c79a0...@syzkaller.appspotmail.com

rq->clock_update_flags < RQCF_ACT_SKIP
------------[ cut here ]------------
WARNING: CPU: 0 PID: 31418 at kernel/sched/sched.h:933 assert_clock_updated
kernel/sched/sched.h:933 [inline]
WARNING: CPU: 0 PID: 31418 at kernel/sched/sched.h:933 rq_clock_task
kernel/sched/sched.h:947 [inline]
WARNING: CPU: 0 PID: 31418 at kernel/sched/sched.h:933 task_hot
kernel/sched/fair.c:8679 [inline]
WARNING: CPU: 0 PID: 31418 at kernel/sched/sched.h:933
can_migrate_task.cold+0x13/0x1a kernel/sched/fair.c:8809
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 31418 Comm: syz-executor.2 Not tainted 4.14.116 #1
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0xb9/0x10e lib/dump_stack.c:53
panic+0x1d9/0x3c2 kernel/panic.c:182
__warn.cold+0x2f/0x3b kernel/panic.c:546
</IRQ>

======================================================
WARNING: possible circular locking dependency detected
4.14.116 #1 Not tainted
------------------------------------------------------
syz-executor.2/31418 is trying to acquire lock:
((console_sem).lock){-.-.}, at: [<00000000fb4beec0>] down_trylock+0xe/0x60
kernel/locking/semaphore.c:136

but task is already holding lock:
(&rq->lock){-.-.}, at: [<000000007276cbfc>] double_rq_lock
kernel/sched/sched.h:2010 [inline]
(&rq->lock){-.-.}, at: [<000000007276cbfc>] _double_lock_balance
kernel/sched/sched.h:1906 [inline]
(&rq->lock){-.-.}, at: [<000000007276cbfc>] double_lock_balance
kernel/sched/sched.h:1953 [inline]
(&rq->lock){-.-.}, at: [<000000007276cbfc>] detach_task.isra.0+0x20d/0x540
kernel/sched/fair.c:8835

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&rq->lock){-.-.}:

-> #1 (&p->pi_lock){-.-.}:

-> #0 ((console_sem).lock){-.-.}:

other info that might help us debug this:

Chain exists of:
(console_sem).lock --> &p->pi_lock --> &rq->lock

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&rq->lock);
lock(&p->pi_lock);
lock(&rq->lock);
lock((console_sem).lock);

*** DEADLOCK ***

3 locks held by syz-executor.2/31418:
#0: (&u->iolock){+.+.}, at: [<00000000a481d302>]
unix_stream_read_generic+0x28c/0x1930 net/unix/af_unix.c:2294
#1: (rcu_read_lock){....}, at: [<000000008cb34775>]
rebalance_domains+0xd1/0xd50 kernel/sched/fair.c:11073
#2: (&rq->lock){-.-.}, at: [<000000007276cbfc>] double_rq_lock
kernel/sched/sched.h:2010 [inline]
#2: (&rq->lock){-.-.}, at: [<000000007276cbfc>] _double_lock_balance
kernel/sched/sched.h:1906 [inline]
#2: (&rq->lock){-.-.}, at: [<000000007276cbfc>] double_lock_balance
kernel/sched/sched.h:1953 [inline]
#2: (&rq->lock){-.-.}, at: [<000000007276cbfc>]
detach_task.isra.0+0x20d/0x540 kernel/sched/fair.c:8835

stack backtrace:
CPU: 0 PID: 31418 Comm: syz-executor.2 Not tainted 4.14.116 #1
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0xb9/0x10e lib/dump_stack.c:53
print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258
</IRQ>
Shutting down cpus with NMI
Kernel Offset: 0x26200000 from 0xffffffff81000000 (relocation range:
0xffffffff80000000-0xffffffffbfffffff)
Rebooting in 86400 seconds..


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Oct 25, 2019, 4:45:05 AM10/25/19
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages