syzbot


possible deadlock in io_poll_double_wake (3)
Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+e654d4e15e6b3b9deb53@syzkaller.appspotmail.com
Fix commit: aa43477b0402 io_uring: poll rework
First crash: 413d, last: 136d

Cause bisection: failed (bisect log)

Fix bisection: fixed by (bisect log) :
commit aa43477b040251f451db0d844073ac00a8ab66ee
Author: Pavel Begunkov <asml.silence@gmail.com>
Date: Wed Dec 15 22:08:48 2021 +0000

  io_uring: poll rework

similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in io_poll_double_wake (2) C error error 431 413d 606d 22/22 fixed on 2021/04/09 19:46
upstream possible deadlock in io_poll_double_wake C 17 622d 650d 0/22 closed as dup on 2020/08/15 18:15
Patch testing requests:
Created Duration User Patch Repo Result
2021/05/07 20:03 11m alaaemadhossney.ae@gmail.com upstream error
2021/04/27 01:29 10m alaaemadhossney.ae@gmail.com upstream report log

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.16.0-rc8-syzkaller #0 Not tainted
--------------------------------------------
ksoftirqd/1/19 is trying to acquire lock:
ffff88807cea4130 (&runtime->sleep){..-.}-{2:2}, at: io_poll_double_wake+0x2ba/0x7c0 fs/io_uring.c:5467

but task is already holding lock:
ffff888076461130 (&runtime->sleep){..-.}-{2:2}, at: __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:137

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&runtime->sleep);
  lock(&runtime->sleep);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by ksoftirqd/1/19:
 #0: ffff8880245b9910 (&group->lock){..-.}-{2:2}, at: _snd_pcm_stream_lock_irqsave+0x9f/0xd0 sound/core/pcm_native.c:170
 #1: ffff888076461130 (&runtime->sleep){..-.}-{2:2}, at: __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:137

stack backtrace:
CPU: 1 PID: 19 Comm: ksoftirqd/1 Not tainted 5.16.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2956 [inline]
 check_deadlock kernel/locking/lockdep.c:2999 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5027
 lock_acquire kernel/locking/lockdep.c:5637 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
 io_poll_double_wake+0x2ba/0x7c0 fs/io_uring.c:5467
 __wake_up_common+0x147/0x650 kernel/sched/wait.c:108
 __wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:138
 snd_pcm_update_state+0x46a/0x540 sound/core/pcm_lib.c:204
 snd_pcm_update_hw_ptr0+0xa75/0x1a50 sound/core/pcm_lib.c:465
 snd_pcm_period_elapsed_under_stream_lock+0x15a/0x230 sound/core/pcm_lib.c:1817
 snd_pcm_period_elapsed+0x28/0x50 sound/core/pcm_lib.c:1849
 dummy_hrtimer_callback+0x94/0x1b0 sound/drivers/dummy.c:377
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1766
 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558
 run_ksoftirqd kernel/softirq.c:921 [inline]
 run_ksoftirqd+0x2d/0x60 kernel/softirq.c:913
 smpboot_thread_fn+0x645/0x9c0 kernel/smpboot.c:164
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (703):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/01/05 11:31 upstream c9e6606c7fe9 0a2584dd .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-smack-root 2022/01/02 11:07 upstream 278218f6778b e1768e9c .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/12/29 01:06 upstream ecf71de775a0 76c8cf06 .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/25 16:51 upstream b927dfc67d05 6caa12e4 .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/17 20:07 upstream 6441998e2e37 44068e19 .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/06/17 17:53 upstream 70585216fe77 aba2b2fb .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/04/10 01:08 upstream 17e7124aad76 6a81331a .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-linux-next-kasan-gce-root 2021/12/17 15:55 linux-next fbf252e09678 44068e19 .config log report syz C possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2022/01/12 04:56 upstream 6f38be8f2ccd 44d1319a .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-selinux-root 2022/01/11 02:18 upstream 133d9c53c9dc ddb0ab8c .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2022/01/10 04:51 upstream df0cc57e057f 2ca0d385 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-smack-root 2022/01/09 22:35 upstream 4634129ad9fd 2ca0d385 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2022/01/08 07:29 upstream d1587f7bfe9a 2ca0d385 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-selinux-root 2022/01/01 08:22 upstream 800829388818 e1768e9c .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-selinux-root 2021/12/31 21:04 upstream 4f3d93c6eaff e1768e9c .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/12/31 15:51 upstream 4f3d93c6eaff 36bd2e48 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-selinux-root 2021/12/30 23:18 upstream eec4df26e24e 2e49f10d .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/12/28 22:10 upstream ecf71de775a0 76c8cf06 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-smack-root 2021/12/26 19:22 upstream 438645193e59 e4f103c4 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/12/24 18:38 upstream 7a29b11da965 6caa12e4 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/12/15 02:06 upstream 5472f14a3742 d018dd31 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/08 20:08 upstream 2a987e65025e a4a2a501 .config log report info possible deadlock in io_poll_double_wake
ci-qemu-upstream 2021/12/07 09:09 upstream f80ef9e49fdf 0230ba3e .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/03 10:33 upstream 5f58da2befa5 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/03 07:50 upstream a51e3ac43ddb 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/03 05:18 upstream a51e3ac43ddb 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/02 21:42 upstream a51e3ac43ddb 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/02 07:35 upstream 58e1100fdc59 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/01 22:13 upstream 58e1100fdc59 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/01 20:27 upstream 58e1100fdc59 5fa3eacc .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/01 10:51 upstream 58e1100fdc59 5fa3eacc .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/01 09:21 upstream 58e1100fdc59 5fa3eacc .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/01 02:31 upstream f080815fdb3e 80270552 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/12/01 00:27 upstream f080815fdb3e 80270552 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/30 20:29 upstream f080815fdb3e 80270552 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/30 19:20 upstream f080815fdb3e 80270552 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/30 12:18 upstream d58071a8a76d 80270552 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/11/30 06:45 upstream d58071a8a76d d0830353 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/29 17:18 upstream d58071a8a76d d0830353 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/29 15:29 upstream d58071a8a76d d0830353 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/29 13:51 upstream d58071a8a76d 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/29 02:10 upstream d06c942efea4 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/29 00:29 upstream d06c942efea4 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/28 23:01 upstream d06c942efea4 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/11/28 19:55 upstream 3498e7f2bb41 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/28 10:29 upstream 3498e7f2bb41 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-selinux-root 2021/11/28 04:23 upstream 741392771338 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/27 21:41 upstream 741392771338 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/27 20:22 upstream 741392771338 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-root 2021/11/27 14:47 upstream c5c17547b778 63eeac02 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce 2021/04/09 21:01 upstream 17e7124aad76 6a81331a .config log report info possible deadlock in io_poll_double_wake
ci-qemu-upstream-386 2021/12/06 00:26 upstream 944207047ca4 a617004c .config log report info possible deadlock in io_poll_double_wake
ci-upstream-kasan-gce-386 2021/11/08 22:45 upstream e851dfae4371 d29682f1 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-linux-next-kasan-gce-root 2021/12/03 03:33 linux-next f81e94e91878 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-linux-next-kasan-gce-root 2021/12/01 23:25 linux-next f81e94e91878 61f86278 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-linux-next-kasan-gce-root 2021/11/30 13:40 linux-next f81e94e91878 80270552 .config log report info possible deadlock in io_poll_double_wake
ci-upstream-linux-next-kasan-gce-root 2021/11/27 14:33 linux-next f81e94e91878 63eeac02 .config log report info possible deadlock in io_poll_double_wake