syzbot


INFO: task hung in lock_sock_nested (3)

Status: upstream: reported on 2022/06/23 22:52
Reported-by: syzbot+3afaac5a56f7a2935e5f@syzkaller.appspotmail.com
First crash: 666d, last: 452d
Similar bugs (14)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in lock_sock_nested (2) net C done 418 1505d 1518d 15/26 fixed on 2020/04/15 17:19
upstream INFO: task hung in lock_sock_nested net C 2593 1523d 2323d 0/26 closed as dup on 2017/12/23 20:15
android-44 INFO: task hung in lock_sock_nested (2) 4 1605d 1701d 0/2 auto-closed as invalid on 2020/03/27 01:37
upstream INFO: task hung in lock_sock_nested (3) net C done 5 1294d 1296d 15/26 fixed on 2020/11/16 12:12
android-49 INFO: task hung in lock_sock_nested (2) 2 1684d 1803d 0/3 auto-closed as invalid on 2020/01/08 15:18
linux-4.14 INFO: task hung in lock_sock_nested 1 1626d 1626d 0/1 auto-closed as invalid on 2020/03/06 15:38
linux-4.14 INFO: task hung in lock_sock_nested (2) 1 1363d 1363d 0/1 auto-closed as invalid on 2020/11/24 03:07
android-44 INFO: task hung in lock_sock_nested C 82 2243d 2245d 0/2 closed as invalid on 2019/03/08 00:11
upstream INFO: task can't die in __lock_sock bluetooth C done error 1067 165d 979d 0/26 auto-obsoleted due to no activity on 2024/01/16 13:36
upstream INFO: task hung in lock_sock_nested (4) mptcp C done 6 1188d 1235d 19/26 fixed on 2021/03/10 01:48
android-49 INFO: task hung in lock_sock_nested C 101 1883d 2245d 0/3 closed as invalid on 2019/03/08 00:11
android-414 INFO: task hung in lock_sock_nested 65 1649d 1834d 0/1 auto-closed as invalid on 2020/02/12 04:11
linux-4.19 INFO: task hung in lock_sock_nested (2) 1 863d 863d 0/1 auto-closed as invalid on 2022/04/08 17:15
linux-4.19 INFO: task hung in lock_sock_nested 1 1442d 1442d 0/1 auto-closed as invalid on 2020/09/05 19:53

Sample crash report:
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
INFO: task syz-executor.0:27589 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0  D30616 27589   8193 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 __lock_sock+0x13d/0x260 net/core/sock.c:2338
 lock_sock_nested+0xf1/0x110 net/core/sock.c:2886
 lock_sock include/net/sock.h:1512 [inline]
 inet_stream_connect+0x3f/0xa0 net/ipv4/af_inet.c:718
 __sys_connect+0x265/0x2c0 net/socket.c:1775
 __do_sys_connect net/socket.c:1786 [inline]
 __se_sys_connect net/socket.c:1783 [inline]
 __x64_sys_connect+0x6f/0xb0 net/socket.c:1783
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f31bd49a0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f31bb9a9168 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 00007f31bd5ba1f0 RCX: 00007f31bd49a0c9
RDX: 000000000000001c RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00007f31bd4f5ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffe59f223f R14: 00007f31bb9a9300 R15: 0000000000022000
INFO: task syz-executor.0:27591 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0  D29504 27591   8193 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 __lock_sock+0x13d/0x260 net/core/sock.c:2338
 lock_sock_nested+0xf1/0x110 net/core/sock.c:2886
 lock_sock include/net/sock.h:1512 [inline]
 do_ipv6_setsockopt.constprop.0+0x264/0x3ed0 net/ipv6/ipv6_sockglue.c:167
 ipv6_setsockopt+0xb9/0x160 net/ipv6/ipv6_sockglue.c:940
 tcp_setsockopt+0x86/0xd0 net/ipv4/tcp.c:3108
 __sys_setsockopt+0x14d/0x240 net/socket.c:2013
 __do_sys_setsockopt net/socket.c:2024 [inline]
 __se_sys_setsockopt net/socket.c:2021 [inline]
 __x64_sys_setsockopt+0xba/0x150 net/socket.c:2021
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f31bd49a0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f31bb967168 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f31bd5ba390 RCX: 00007f31bd49a0c9
RDX: 000000000000003b RSI: 0000000000000029 RDI: 0000000000000003
RBP: 00007f31bd4f5ae9 R08: 0000000000000008 R09: 0000000000000000
R10: 0000000020000080 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffe59f223f R14: 00007f31bb967300 R15: 0000000000022000

Showing all locks held in the system:
2 locks held by kworker/0:0/5:
 #0: 0000000095d492b8 ((wq_completion)"rcu_gp"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 0000000098b302c1 ((work_completion)(&rew.rew_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
1 lock held by khungtaskd/1570:
 #0: 000000007f11a7a0 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7801:
3 locks held by kworker/1:2/27480:
 #0: 000000005e99c3a7 ((wq_completion)"events"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 00000000270f3331 (deferred_process_work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
 #2: 00000000b72012f9 (rtnl_mutex){+.+.}, at: switchdev_deferred_process_work+0xa/0x20 net/switchdev/switchdev.c:150
4 locks held by kworker/u4:0/27348:
3 locks held by syz-executor.0/27577:
3 locks held by kworker/1:1/27920:
 #0: 000000005e99c3a7 ((wq_completion)"events"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 0000000083d42ed4 ((linkwatch_work).work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
 #2: 00000000b72012f9 (rtnl_mutex){+.+.}, at: linkwatch_event+0xb/0x60 net/core/link_watch.c:236
4 locks held by syz-executor.0/28926:
 #0: 00000000daef7192 (&hdev->req_lock){+.+.}, at: hci_dev_do_close+0x122/0x1020 net/bluetooth/hci_core.c:1629
 #1: 00000000ecd11e21 (&hdev->lock){+.+.}, at: hci_dev_do_close+0x343/0x1020 net/bluetooth/hci_core.c:1674
 #2: 00000000efd82f2f (hci_cb_list_lock){+.+.}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1260 [inline]
 #2: 00000000efd82f2f (hci_cb_list_lock){+.+.}, at: hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1512
 #3: 000000008ddbf8e7 (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline]
 #3: 000000008ddbf8e7 (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x4dc/0x6f0 kernel/rcu/tree_exp.h:667

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

NMI backtrace for cpu 1
CPU: 1 PID: 1570 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 27348 Comm: kworker/u4:0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Workqueue: netns cleanup_net
RIP: 0010:mark_lock+0xc/0x1160 kernel/locking/lockdep.c:3100
Code: 41 5f c3 0f 0b 48 c7 c7 68 83 f1 89 e8 dd 7c 4d 00 eb 87 4c 89 ff e8 43 7c 4d 00 eb c7 90 48 b8 00 00 00 00 00 fc ff df 41 57 <89> d1 41 89 d7 41 56 4c 8d 76 20 4c 89 f2 41 55 49 89 fd 41 54 48
RSP: 0018:ffff88804d66f680 EFLAGS: 00000002
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: 1ffff11016539d3f
RDX: 0000000000000006 RSI: ffff8880b29cea00 RDI: ffff8880b29ce100
RBP: 0000000000000007 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000006
R13: ffff8880b29ce100 R14: dffffc0000000000 R15: ffff8880b29ce988
FS:  0000000000000000(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f910d732000 CR3: 00000000a1cca000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 mark_held_locks+0xa6/0xf0 kernel/locking/lockdep.c:2810
 __trace_hardirqs_on_caller kernel/locking/lockdep.c:2839 [inline]
 lockdep_hardirqs_on+0x3a8/0x5c0 kernel/locking/lockdep.c:2884
 __local_bh_enable_ip+0x159/0x270 kernel/softirq.c:194
 local_bh_enable include/linux/bottom_half.h:32 [inline]
 get_next_corpse net/netfilter/nf_conntrack_core.c:1907 [inline]
 nf_ct_iterate_cleanup+0x239/0x520 net/netfilter/nf_conntrack_core.c:1930
 nf_ct_iterate_cleanup_net net/netfilter/nf_conntrack_core.c:2015 [inline]
 nf_ct_iterate_cleanup_net+0x113/0x170 net/netfilter/nf_conntrack_core.c:2000

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/24 06:42 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in lock_sock_nested
2023/01/11 13:37 linux-4.19.y 3f8a27f9e27b 96166539 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in lock_sock_nested
2022/12/27 16:23 linux-4.19.y 3f8a27f9e27b 44712fbc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in lock_sock_nested
2022/09/12 22:13 linux-4.19.y 3f8a27f9e27b f371ed7e .config console log report info ci2-linux-4-19 INFO: task hung in lock_sock_nested
2022/08/09 02:26 linux-4.19.y 3f8a27f9e27b da700653 .config console log report info ci2-linux-4-19 INFO: task hung in lock_sock_nested
2022/06/23 22:51 linux-4.19.y 3f8a27f9e27b 912f5df7 .config console log report info ci2-linux-4-19 INFO: task hung in lock_sock_nested
* Struck through repros no longer work on HEAD.