syzbot


WARNING in can_migrate_task

Status: auto-closed as invalid on 2019/10/25 08:45
Reported-by: syzbot+0c79a0958d5004295801@syzkaller.appspotmail.com
First crash: 1868d, last: 1868d

Sample crash report:
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..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/05/07 17:57 android-4.14 0f36e8ef3704 d28f4ce5 .config console log report ci-android-414-kasan-gce-root
* Struck through repros no longer work on HEAD.