syzbot


INFO: task hung in scan_update_work

Status: closed as invalid on 2022/02/07 18:59
Subsystems: bluetooth
[Documentation on labels]
First crash: 903d, last: 864d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in scan_update_work (2) bluetooth 1 795d 795d 0/26 auto-closed as invalid on 2022/04/19 17:30

Sample crash report:
INFO: task kworker/u5:7:6615 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc4-next-20211208-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u5:7    state:D stack:28984 pid: 6615 ppid:     2 flags:0x00004000
Workqueue: hci3 scan_update_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4986 [inline]
 __schedule+0xab2/0x4d90 kernel/sched/core.c:6296
 schedule+0xd2/0x260 kernel/sched/core.c:6369
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6428
 __mutex_lock_common kernel/locking/mutex.c:673 [inline]
 __mutex_lock+0xa32/0x12f0 kernel/locking/mutex.c:733
 hci_req_sync net/bluetooth/hci_request.c:198 [inline]
 scan_update_work+0x26/0xb0 net/bluetooth/hci_request.c:1900
 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2318
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2465
 kthread+0x405/0x4f0 kernel/kthread.c:345
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
INFO: task systemd-rfkill:16704 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc4-next-20211208-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:systemd-rfkill  state:D stack:26000 pid:16704 ppid:     1 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4986 [inline]
 __schedule+0xab2/0x4d90 kernel/sched/core.c:6296
 schedule+0xd2/0x260 kernel/sched/core.c:6369
 schedule_timeout+0x1db/0x2a0 kernel/time/timer.c:1857
 do_wait_for_common kernel/sched/completion.c:85 [inline]
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x174/0x270 kernel/sched/completion.c:138
 __flush_work+0x56c/0xb10 kernel/workqueue.c:3104
 __cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3191
 hci_request_cancel_all+0x38/0x100 net/bluetooth/hci_request.c:2698
 hci_dev_close_sync+0xa1/0x1120 net/bluetooth/hci_sync.c:4028
 hci_dev_do_close+0x32/0x70 net/bluetooth/hci_core.c:553
 hci_rfkill_set_block+0x19c/0x1d0 net/bluetooth/hci_core.c:935
 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:344
 rfkill_fop_write+0x41a/0x500 net/rfkill/core.c:1276
 vfs_write+0x28e/0xae0 fs/read_write.c:588
 ksys_write+0x1ee/0x250 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f5d1aadb1b0
RSP: 002b:00007ffda086f998 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000055b100d5c040 RCX: 00007f5d1aadb1b0
RDX: 0000000000000008 RSI: 00007ffda086f9e0 RDI: 0000000000000003
RBP: 00007ffda086f9d8 R08: 0000000000000003 R09: 0000000000001010
R10: 000055b100d5d2f0 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffda086f9d0 R14: 0000000000000000 R15: 0000000000000003
 </TASK>
INFO: task syz-executor.4:16709 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc4-next-20211208-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:23832 pid:16709 ppid:     1 flags:0x00000004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4986 [inline]
 __schedule+0xab2/0x4d90 kernel/sched/core.c:6296
 schedule+0xd2/0x260 kernel/sched/core.c:6369
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6428
 __mutex_lock_common kernel/locking/mutex.c:673 [inline]
 __mutex_lock+0xa32/0x12f0 kernel/locking/mutex.c:733
 rfkill_fop_open+0x10d/0x720 net/rfkill/core.c:1148
 misc_open+0x372/0x4a0 drivers/char/misc.c:141
 chrdev_open+0x266/0x770 fs/char_dev.c:414
 do_dentry_open+0x4c8/0x1250 fs/open.c:824
 do_open fs/namei.c:3476 [inline]
 path_openat+0x1c9e/0x2940 fs/namei.c:3609
 do_filp_open+0x1aa/0x400 fs/namei.c:3636
 do_sys_openat2+0x16d/0x4d0 fs/open.c:1214
 do_sys_open fs/open.c:1230 [inline]
 __do_sys_openat fs/open.c:1246 [inline]
 __se_sys_openat fs/open.c:1241 [inline]
 __x64_sys_openat+0x13f/0x1f0 fs/open.c:1241
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f8b14ab2db4
RSP: 002b:00007ffe635774b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007ffe63577bf8 RCX: 00007f8b14ab2db4
RDX: 0000000000000002 RSI: 00007f8b14b5931c RDI: 00000000ffffff9c
RBP: 00007f8b14b5931c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000002
R13: 00007ffe63577690 R14: 00007f8b14c134d8 R15: 0000000000000006
 </TASK>

Showing all locks held in the system:
2 locks held by kworker/u4:0/8:
1 lock held by khungtaskd/27:
 #0: ffffffff8bb828a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6460
1 lock held by in:imklog/6252:
 #0: ffff888012b9dc70 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:994
3 locks held by kworker/u5:7/6615:
 #0: ffff88807b99f138 ((wq_completion)hci3){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff88807b99f138 ((wq_completion)hci3){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff88807b99f138 ((wq_completion)hci3){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline]
 #0: ffff88807b99f138 ((wq_completion)hci3){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:635 [inline]
 #0: ffff88807b99f138 ((wq_completion)hci3){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:662 [inline]
 #0: ffff88807b99f138 ((wq_completion)hci3){+.+.}-{0:0}, at: process_one_work+0x896/0x1690 kernel/workqueue.c:2289
 #1: ffffc90002a3fdb0 ((work_completion)(&hdev->scan_update)){+.+.}-{0:0}, at: process_one_work+0x8ca/0x1690 kernel/workqueue.c:2293
 #2: ffff88807e269000 (&hdev->req_lock){+.+.}-{3:3}, at: hci_req_sync net/bluetooth/hci_request.c:198 [inline]
 #2: ffff88807e269000 (&hdev->req_lock){+.+.}-{3:3}, at: scan_update_work+0x26/0xb0 net/bluetooth/hci_request.c:1900
2 locks held by systemd-rfkill/16704:
 #0: ffffffff8d70c0c8 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0xff/0x500 net/rfkill/core.c:1260
 #1: ffff88807e269000 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x2a/0x70 net/bluetooth/hci_core.c:551
2 locks held by syz-executor.4/16709:
 #0: ffffffff8c5ed4c8 (misc_mtx){+.+.}-{3:3}, at: misc_open+0x55/0x4a0 drivers/char/misc.c:107
 #1: ffffffff8d70c0c8 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_open+0x10d/0x720 net/rfkill/core.c:1148

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.16.0-rc4-next-20211208-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
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b3/0x230 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:256 [inline]
 watchdog+0xcb7/0xed0 kernel/hung_task.c:413
 kthread+0x405/0x4f0 kernel/kthread.c:345
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2953 Comm: systemd-journal Not tainted 5.16.0-rc4-next-20211208-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__exit_to_user_mode kernel/entry/common.c:132 [inline]
RIP: 0010:syscall_exit_to_user_mode+0x33/0x60 kernel/entry/common.c:302
Code: 9c 58 fa f6 c4 02 75 39 48 89 ef e8 97 f3 11 f8 e8 22 69 2a f8 48 8b 7c 24 08 e8 c8 b3 08 f8 eb 14 66 90 0f 00 2d 5d 17 5a 00 <48> 8b 7c 24 08 5d e9 c2 f3 ff ff bf 01 00 00 00 e8 08 03 00 00 eb
RSP: 0018:ffffc90001abff30 EFLAGS: 00000046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc90001abfe80
RDX: 1ffff1100f791bdc RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90001abff58 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffffc90001abff58
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  00007fb041ef68c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb03f40d280 CR3: 00000000221db000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fb04118ef17
Code: ff ff ff 48 8b 4d a0 0f b7 51 fe 48 8b 4d a8 66 89 54 08 fe e9 1a ff ff ff 66 2e 0f 1f 84 00 00 00 00 00 b8 27 00 00 00 0f 05 <c3> 0f 1f 84 00 00 00 00 00 b8 6e 00 00 00 0f 05 c3 0f 1f 84 00 00
RSP: 002b:00007ffe858098e8 EFLAGS: 00000202 ORIG_RAX: 0000000000000027
RAX: 0000000000000b89 RBX: 0000559654fc81e0 RCX: 00007fb04118ef17
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000559654fc81e0
RBP: 0000000000000b89 R08: 0000000061b3d575 R09: 00007ffe8588e080
R10: 00007ffe8588e080 R11: 0000000000000202 R12: ffffffffffffffff
R13: 00007ffe85809978 R14: 0000559654dc0958 R15: 0005d2d24be3a3bb
 </TASK>
----------------
Code disassembly (best guess):
   0:	9c                   	pushfq
   1:	58                   	pop    %rax
   2:	fa                   	cli
   3:	f6 c4 02             	test   $0x2,%ah
   6:	75 39                	jne    0x41
   8:	48 89 ef             	mov    %rbp,%rdi
   b:	e8 97 f3 11 f8       	callq  0xf811f3a7
  10:	e8 22 69 2a f8       	callq  0xf82a6937
  15:	48 8b 7c 24 08       	mov    0x8(%rsp),%rdi
  1a:	e8 c8 b3 08 f8       	callq  0xf808b3e7
  1f:	eb 14                	jmp    0x35
  21:	66 90                	xchg   %ax,%ax
  23:	0f 00 2d 5d 17 5a 00 	verw   0x5a175d(%rip)        # 0x5a1787
* 2a:	48 8b 7c 24 08       	mov    0x8(%rsp),%rdi <-- trapping instruction
  2f:	5d                   	pop    %rbp
  30:	e9 c2 f3 ff ff       	jmpq   0xfffff3f7
  35:	bf 01 00 00 00       	mov    $0x1,%edi
  3a:	e8 08 03 00 00       	callq  0x347
  3f:	eb                   	.byte 0xeb

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/10 22:32 linux-next 4eee8d0b64ec 49ca1f59 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/12/10 17:28 linux-next 4eee8d0b64ec 49ca1f59 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/12/04 02:51 linux-next f81e94e91878 a617004c .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/12/01 13:10 linux-next f81e94e91878 5fa3eacc .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/29 02:26 linux-next f81e94e91878 63eeac02 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/29 01:54 linux-next f81e94e91878 63eeac02 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/21 21:38 linux-next 5191249f8803 4eb20a4e .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/21 18:33 linux-next 5191249f8803 4eb20a4e .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/15 03:30 linux-next 09bd48c4acfa 83f5c9b5 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/14 15:45 linux-next f2e19fd15bd7 83f5c9b5 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/11 21:59 linux-next ad8be4fa6e81 75b04091 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/10 02:56 linux-next c8109c2ba35e 55fa030c .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/09 13:41 linux-next c8109c2ba35e 59bcaf9a .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/08 23:59 linux-next e844ee04dee0 8ab17e57 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/08 03:02 linux-next 6a37ebbe07bf 4c1be0be .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/07 18:27 linux-next 6a37ebbe07bf 4c1be0be .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
2021/11/02 09:23 linux-next 9150de4aac1e 098b5d53 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in scan_update_work
* Struck through repros no longer work on HEAD.