WARNING in enqueue_task_dl

4 views
Skip to first unread message

syzbot

unread,
Apr 10, 2019, 12:04:11 PM4/10/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7d2d5fc1 Merge 4.14.91 into android-4.14
git tree: android-4.14
console output: https://syzkaller.appspot.com/x/log.txt?x=14feef00c00000
kernel config: https://syzkaller.appspot.com/x/.config?x=c184a4faf24e0c0c
dashboard link: https://syzkaller.appspot.com/bug?extid=35d5769eecf8560635a6
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=147bc5fd400000

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

audit: type=1400 audit(1546265523.718:12): avc: denied { read } for
pid=1946 comm="syz-executor0"
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tclass=netlink_generic_socket permissive=1
sched: DL replenish lagged too much
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2017 at kernel/sched/deadline.c:596
assert_clock_updated kernel/sched/sched.h:927 [inline]
WARNING: CPU: 0 PID: 2017 at kernel/sched/deadline.c:596 rq_clock
kernel/sched/sched.h:933 [inline]
WARNING: CPU: 0 PID: 2017 at kernel/sched/deadline.c:596 update_dl_entity
kernel/sched/deadline.c:827 [inline]
WARNING: CPU: 0 PID: 2017 at kernel/sched/deadline.c:596 enqueue_dl_entity
kernel/sched/deadline.c:1369 [inline]
WARNING: CPU: 0 PID: 2017 at kernel/sched/deadline.c:596
enqueue_task_dl+0x1cc9/0x2ca0 kernel/sched/deadline.c:1446
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 2017 Comm: syz-executor0 Not tainted 4.14.91+ #1
Call Trace:
__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

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

but task is already holding lock:
(&rq->lock){-.-.}, at: [<ffffffff9b1619f8>] task_rq_lock+0xc8/0x330
kernel/sched/core.c:126

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-executor0/2017:
#0: (rcu_read_lock){....}, at: [<ffffffff9b172990>] SYSC_sched_setattr
kernel/sched/core.c:4512 [inline]
#0: (rcu_read_lock){....}, at: [<ffffffff9b172990>]
SyS_sched_setattr+0x1d0/0x390 kernel/sched/core.c:4498
#1: (&p->pi_lock){-.-.}, at: [<ffffffff9b16199a>] task_rq_lock+0x6a/0x330
kernel/sched/core.c:124
#2: (&rq->lock){-.-.}, at: [<ffffffff9b1619f8>] task_rq_lock+0xc8/0x330
kernel/sched/core.c:126

stack backtrace:
CPU: 0 PID: 2017 Comm: syz-executor0 Not tainted 4.14.91+ #1
Call Trace:
__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
Shutting down cpus with NMI
Kernel Offset: 0x1a000000 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 can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages