syzbot


possible deadlock in __flush_workqueue (2)

Status: closed as dup on 2024/08/13 06:06
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+e528c9aad0fb5383ec83@syzkaller.appspotmail.com
First crash: 107d, last: 75d
Cause bisection: failed (error log, bisect log)
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
possible deadlock in touch_wq_lockdep_map usb C 1208 54d 250d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] drivers/xillybus: fix deadlock upon cleanup_dev 2 (2) 2024/08/13 06:15
[syzbot] [usb?] possible deadlock in __flush_workqueue (2) 0 (3) 2024/08/13 06:06
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in __flush_workqueue bluetooth 1456 110d 309d 26/28 fixed on 2024/08/06 11:02
linux-6.1 possible deadlock in __flush_workqueue 140 106d 251d 0/3 auto-obsoleted due to no activity on 2024/10/16 01:58
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/08/12 17:49 32m snovitoll@gmail.com https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/82/25482/1 OK log

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.11.0-rc2-syzkaller-00004-gb446a2dae984 #0 Not tainted
--------------------------------------------
kworker/0:1H/58 is trying to acquire lock:
ffff88802c60a148 ((wq_completion)xillyusb){+.+.}-{0:0}, at: touch_wq_lockdep_map kernel/workqueue.c:3876 [inline]
ffff88802c60a148 ((wq_completion)xillyusb){+.+.}-{0:0}, at: __flush_workqueue+0x1b0/0x1710 kernel/workqueue.c:3918

but task is already holding lock:
ffff88802c60a148 ((wq_completion)xillyusb){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline]
ffff88802c60a148 ((wq_completion)xillyusb){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312

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

       CPU0
       ----
  lock((wq_completion)xillyusb);
  lock((wq_completion)xillyusb);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by kworker/0:1H/58:
 #0: ffff88802c60a148 ((wq_completion)xillyusb){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline]
 #0: ffff88802c60a148 ((wq_completion)xillyusb){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312
 #1: ffffc9000133fd00 ((work_completion)(&xdev->wakeup_workitem)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline]
 #1: ffffc9000133fd00 ((work_completion)(&xdev->wakeup_workitem)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312

stack backtrace:
CPU: 0 UID: 0 PID: 58 Comm: kworker/0:1H Not tainted 6.11.0-rc2-syzkaller-00004-gb446a2dae984 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Workqueue: xillyusb wakeup_all
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
 check_deadlock kernel/locking/lockdep.c:3061 [inline]
 validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3855
 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
 touch_wq_lockdep_map kernel/workqueue.c:3876 [inline]
 __flush_workqueue+0x1c9/0x1710 kernel/workqueue.c:3918
 drain_workqueue+0xc9/0x3a0 kernel/workqueue.c:4082
 destroy_workqueue+0xba/0xc40 kernel/workqueue.c:5781
 cleanup_dev drivers/char/xillybus/xillyusb.c:558 [inline]
 kref_put+0x104/0x180 include/linux/kref.h:65
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (43):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/06 16:16 upstream b446a2dae984 e1bdb00a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/06 15:12 upstream b446a2dae984 e1bdb00a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/06 14:10 upstream b446a2dae984 e1bdb00a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/09/06 23:13 upstream b831f83e40a2 ce70880a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/08/20 06:57 upstream b0da640826ba 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/18 14:53 upstream c3f2d783a459 dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/13 19:59 upstream 6b4aa469f049 f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/10 19:00 upstream afdab700f65e 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/10 18:27 upstream afdab700f65e 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/10 17:27 upstream afdab700f65e 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/10 17:21 upstream afdab700f65e 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/10 17:07 upstream afdab700f65e 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/10 15:21 upstream afdab700f65e 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 09:19 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/09 09:17 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/09 07:52 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 07:12 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 06:24 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 06:20 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 06:17 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 05:53 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 05:45 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 05:19 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 04:40 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 04:26 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 04:23 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 04:21 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 04:13 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 04:13 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 04:05 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 03:57 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 03:54 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 03:50 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/09 03:45 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/08/08 20:55 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/08/08 20:54 upstream cf6d429eb656 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/08/08 14:45 upstream 6a0e38264012 de12cf65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/06 17:58 upstream eb5e56d14912 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/08/06 13:43 upstream b446a2dae984 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/06 13:42 upstream b446a2dae984 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/08/17 09:51 upstream e5fa841af679 dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in __flush_workqueue
2024/08/13 05:31 upstream d74da846046a 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in __flush_workqueue
2024/08/12 21:34 linux-next 9e6869691724 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
* Struck through repros no longer work on HEAD.