syzbot


INFO: task can't die in __lock_sock

Status: upstream: reported C repro on 2021/08/15 16:47
Reported-by: syzbot+7d51f807c81b190a127d@syzkaller.appspotmail.com
First crash: 327d, last: 25d

Cause bisection: introduced by (bisect log) :
commit b7ce436a5d798bc59e71797952566608a4b4626b
Author: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Date: Tue Aug 10 04:14:09 2021 +0000

  Bluetooth: switch to lock_sock in RFCOMM

Crash: INFO: task hung in lock_sock_nested (log)
Repro: C syz .config
similar bugs (14):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in lock_sock_nested (3) 1 11d 11d 0/1 upstream: reported on 2022/06/23 22:52
linux-4.19 INFO: task hung in lock_sock_nested (2) 1 207d 207d 0/1 auto-closed as invalid on 2022/04/08 17:15
upstream INFO: task hung in lock_sock_nested (2) C done 418 850d 863d 17/22 fixed on 2020/04/15 17:19
upstream INFO: task hung in lock_sock_nested C 2593 867d 1667d 0/22 closed as dup on 2017/12/23 20:15
android-44 INFO: task hung in lock_sock_nested (2) 4 949d 1045d 0/2 auto-closed as invalid on 2020/03/27 01:37
upstream INFO: task hung in lock_sock_nested (3) C done 5 639d 640d 17/22 fixed on 2020/11/16 12:12
android-49 INFO: task hung in lock_sock_nested (2) 2 1028d 1147d 0/3 auto-closed as invalid on 2020/01/08 15:18
linux-4.14 INFO: task hung in lock_sock_nested 1 970d 970d 0/1 auto-closed as invalid on 2020/03/06 15:38
linux-4.14 INFO: task hung in lock_sock_nested (2) 1 707d 707d 0/1 auto-closed as invalid on 2020/11/24 03:07
android-44 INFO: task hung in lock_sock_nested C 82 1587d 1589d 0/2 closed as invalid on 2019/03/08 00:11
upstream INFO: task hung in lock_sock_nested (4) C done 6 533d 580d 21/22 fixed on 2021/03/10 01:48
android-49 INFO: task hung in lock_sock_nested C 101 1227d 1589d 0/3 closed as invalid on 2019/03/08 00:11
android-414 INFO: task hung in lock_sock_nested 65 993d 1178d 0/1 auto-closed as invalid on 2020/02/12 04:11
linux-4.19 INFO: task hung in lock_sock_nested 1 787d 787d 0/1 auto-closed as invalid on 2020/09/05 19:53
Patch testing requests:
Created Duration User Patch Repo Result
2021/10/04 06:51 18m desmondcheongzx@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master OK
2021/10/04 05:50 18m desmondcheongzx@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master OK
2021/09/20 14:24 12m hdanton@sina.com patch upstream report log

Sample crash report:
INFO: task syz-executor966:3649 blocked for more than 143 seconds.
      Tainted: G        W         5.17.0-syzkaller-11138-gf022814633e1 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor966 state:D stack:26552 pid: 3649 ppid:  3643 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5073 [inline]
 __schedule+0x937/0x1090 kernel/sched/core.c:6382
 schedule+0xeb/0x1b0 kernel/sched/core.c:6454
 __lock_sock+0x1cf/0x330 net/core/sock.c:2770
 lock_sock_nested+0x9f/0x100 net/core/sock.c:3317
 lock_sock include/net/sock.h:1682 [inline]
 rfcomm_sk_state_change+0x63/0x300 net/bluetooth/rfcomm/sock.c:73
 __rfcomm_dlc_close+0x2cc/0x480 net/bluetooth/rfcomm/core.c:489
 rfcomm_dlc_close+0x10d/0x1c0 net/bluetooth/rfcomm/core.c:520
 __rfcomm_sock_close+0x101/0x220 net/bluetooth/rfcomm/sock.c:220
 rfcomm_sock_shutdown+0xa5/0x220 net/bluetooth/rfcomm/sock.c:905
 rfcomm_sock_release+0x55/0x120 net/bluetooth/rfcomm/sock.c:925
 __sock_release net/socket.c:650 [inline]
 sock_close+0xd8/0x260 net/socket.c:1318
 __fput+0x3f6/0x860 fs/file_table.c:317
 task_work_run+0x146/0x1c0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0x5e3/0x20f0 kernel/exit.c:794
 do_group_exit+0x2af/0x2b0 kernel/exit.c:924
 get_signal+0x1831/0x2330 kernel/signal.c:2903
 arch_do_signal_or_restart+0x9c/0x730 arch/x86/kernel/signal.c:868
 handle_signal_work kernel/entry/common.c:149 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:187 [inline]
 exit_to_user_mode_prepare+0x165/0x200 kernel/entry/common.c:222
 __syscall_exit_to_user_mode_work kernel/entry/common.c:304 [inline]
 syscall_exit_to_user_mode+0x2e/0x70 kernel/entry/common.c:315
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fc460f5f7c9
RSP: 002b:00007ffd6246dfe8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: fffffffffffffffc RBX: 000055555726a3b8 RCX: 00007fc460f5f7c9
RDX: 0000000000000080 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 0000000000000072 R14: 00007ffd6246e060 R15: 0000000000000000
 </TASK>
INFO: lockdep is turned off.
NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Tainted: G        W         5.17.0-syzkaller-11138-gf022814633e1 #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+0x1dc/0x2d8 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x45f/0x490 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x16a/0x280 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline]
 watchdog+0xc82/0xcd0 kernel/hung_task.c:369
 kthread+0x2a3/0x2d0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 11 Comm: kworker/u4:1 Tainted: G        W         5.17.0-syzkaller-11138-gf022814633e1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:memcpy_erms+0x8/0x10
Code: cc cc eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 f3 a4 <c3> 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe 7c 35
RSP: 0018:ffffc900001077d8 EFLAGS: 00000002
RAX: 00002aaaaaaab9df RBX: ffff88813fe20000 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff8f7f944b RDI: 00002aaaaaaab9e0
RBP: ffffc90000107990 R08: dffffc0000000000 R09: fffffbfff1eff28a
R10: fffffbfff1eff28a R11: 0000000000000000 R12: ffffc900001078a0
R13: ffff88813fe9ba00 R14: 8000000000000063 R15: ffff88813fe15558
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560c5ecff680 CR3: 00000001400fb000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __text_poke+0x606/0x9f0 arch/x86/kernel/alternative.c:1024
 text_poke arch/x86/kernel/alternative.c:1083 [inline]
 text_poke_bp_batch+0x680/0x920 arch/x86/kernel/alternative.c:1398
 text_poke_flush arch/x86/kernel/alternative.c:1504 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1511
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12d/0x250 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x460 mm/kfence/core.c:779
 process_one_work+0x83c/0x11a0 kernel/workqueue.c:2289
 worker_thread+0xa6c/0x1290 kernel/workqueue.c:2436
 kthread+0x2a3/0x2d0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30
 </TASK>
----------------
Code disassembly (best guess):
   0:	cc                   	int3
   1:	cc                   	int3
   2:	eb 1e                	jmp    0x22
   4:	0f 1f 00             	nopl   (%rax)
   7:	48 89 f8             	mov    %rdi,%rax
   a:	48 89 d1             	mov    %rdx,%rcx
   d:	48 c1 e9 03          	shr    $0x3,%rcx
  11:	83 e2 07             	and    $0x7,%edx
  14:	f3 48 a5             	rep movsq %ds:(%rsi),%es:(%rdi)
  17:	89 d1                	mov    %edx,%ecx
  19:	f3 a4                	rep movsb %ds:(%rsi),%es:(%rdi)
  1b:	c3                   	retq
  1c:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
  22:	48 89 f8             	mov    %rdi,%rax
  25:	48 89 d1             	mov    %rdx,%rcx
  28:	f3 a4                	rep movsb %ds:(%rsi),%es:(%rdi)
* 2a:	c3                   	retq <-- trapping instruction
  2b:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
  32:	48 89 f8             	mov    %rdi,%rax
  35:	48 83 fa 20          	cmp    $0x20,%rdx
  39:	72 7e                	jb     0xb9
  3b:	40 38 fe             	cmp    %dil,%sil
  3e:	7c 35                	jl     0x75

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/06/09 16:17 upstream 6bfb56e93bce 89bc8608 .config log report syz C
ci-upstream-kasan-gce-smack-root 2022/05/10 12:03 upstream 9be9ed2612b5 89bc8608 .config log report syz C
ci-upstream-net-kasan-gce 2022/02/03 14:01 net-next 52cc6ffc0ab2 7eb7e152 .config log report syz C
ci-upstream-net-kasan-gce 2021/11/29 23:37 net-next 09ae03e2fc9d 7eb7e152 .config log report syz C
ci-upstream-net-kasan-gce 2021/10/30 23:14 net-next ae0393500e3b 7eb7e152 .config log report syz C
Crashes (932):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/03/27 22:34 upstream f022814633e1 89bc8608 .config log report syz C INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2021/09/01 19:19 net-next 29ce8f970107 7eb7e152 .config log report syz C INFO: task hung in lock_sock_nested
ci-upstream-linux-next-kasan-gce-root 2021/09/01 17:34 linux-next c1b13fe76e95 7eb7e152 .config log report syz C INFO: task hung in lock_sock_nested
ci-upstream-linux-next-kasan-gce-root 2022/03/13 06:55 linux-next 91265a6da44d 9e8eaa75 .config log report info INFO: task can't die in __lock_sock
ci-upstream-linux-next-kasan-gce-root 2021/09/20 12:32 linux-next 9004fd387338 70b76c1d .config log report info INFO: task can't die in __lock_sock
ci-upstream-linux-next-kasan-gce-root 2021/08/15 08:24 linux-next 4b358aabb93a 2489ab88 .config log report info INFO: task can't die in __lock_sock
ci-upstream-linux-next-kasan-gce-root 2021/08/11 16:36 linux-next 8ca403f3e7a2 6972b106 .config log report info INFO: task can't die in __lock_sock
ci-upstream-kasan-gce-smack-root 2022/04/01 03:23 upstream b4a5ea09b293 68fc921a .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-selinux-root 2022/03/29 18:24 upstream 1930a6e739c4 6bdac766 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-selinux-root 2022/03/27 08:42 upstream bddac7c1e02b 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-selinux-root 2022/03/26 15:01 upstream 52d543b5497c 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-smack-root 2022/03/25 05:29 upstream 52deda9551a0 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-root 2022/03/25 04:18 upstream 52deda9551a0 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-root 2022/03/24 18:44 upstream ed4643521e6a 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-root 2022/03/01 15:14 upstream 719fce7539cd 45a13a73 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-smack-root 2022/02/19 05:05 upstream 7993e65fdd0f 3cd800e4 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-root 2021/12/31 19:53 upstream 4f3d93c6eaff e1768e9c .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce 2021/12/26 07:53 upstream e2ae0d4a6b0b 6caa12e4 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce 2021/12/26 03:10 upstream e2ae0d4a6b0b 6caa12e4 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce 2021/12/25 20:08 upstream b927dfc67d05 6caa12e4 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce 2021/12/23 01:09 upstream 3f066e882bf1 6caa12e4 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce 2021/12/12 16:22 upstream a763d5a5abd6 49ca1f59 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-kasan-gce-386 2022/02/15 03:26 upstream d567f5db412e 8b9ca619 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/04/08 06:35 net ec4eb8a86ade c6ff3e05 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/04/06 23:34 net b423e54ba965 97582466 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/04/06 07:18 net 11f8e7c122ce 0127c10f .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/04/05 19:46 net e3d37210df5c 0127c10f .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/04/04 00:43 net 692930cc4350 79a2a8fc .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/04/02 19:00 net c21cabb0fd0b 79a2a8fc .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/04/01 00:37 net 2975dbdc3989 68fc921a .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/03/25 02:32 net 169e77764adc 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2022/01/01 09:53 net d6d86830705f e1768e9c .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/26 15:13 net e6007b85dfa2 e4f103c4 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/21 19:55 net ac8c58f5b535 a938f0b8 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/19 21:33 net 60ec7fcfe768 44068e19 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/15 18:32 net 1d1c950faa81 572bcb40 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/15 08:04 net 3dd7d40b4366 f752fb53 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/14 14:45 net b0cdc5dbcf2b d018dd31 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/12 22:53 net 3748939bce3f 49ca1f59 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-this-kasan-gce 2021/12/12 13:13 net ee60e626d536 49ca1f59 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/04/01 21:31 net-next 2975dbdc3989 20955a24 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/04/01 03:20 net-next 2975dbdc3989 68fc921a .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/03/29 17:07 net-next d717e4cae0fe 6bdac766 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/03/28 21:45 net-next 169e77764adc ee339263 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/03/27 03:32 net-next 169e77764adc 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/03/26 03:33 net-next 169e77764adc 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/03/25 01:31 net-next 169e77764adc 89bc8608 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/03/01 01:00 net-next f2b77012ddd5 45a13a73 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2022/02/27 09:42 net-next 0cc70c6eecf1 45a13a73 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-bpf-next-kasan-gce 2022/01/04 05:19 bpf-next e63a02348958 7f723fbe .config log report info INFO: task hung in lock_sock_nested
ci-upstream-bpf-next-kasan-gce 2021/12/30 06:59 bpf-next 4b443bc1785f 6cc879d4 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2021/12/13 15:20 net-next 9b5bcb193a3b 49ca1f59 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2021/12/13 04:46 net-next 8c8b7aa7fb0c 49ca1f59 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2021/12/12 19:08 net-next 8c8b7aa7fb0c 49ca1f59 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-bpf-next-kasan-gce 2021/12/11 11:41 bpf-next 229fae38d0fc 49ca1f59 .config log report info INFO: task hung in lock_sock_nested
ci-upstream-net-kasan-gce 2021/09/29 05:40 net-next b69c99463d41 d82cb927 .config log report info INFO: task hung in lock_sock_nested