syzbot


INFO: task hung in tls_sk_proto_close

Status: auto-obsoleted due to no activity on 2024/02/18 21:46
Reported-by: syzbot+3b820d9fad6d470e1967@syzkaller.appspotmail.com
First crash: 424d, last: 376d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in tls_sk_proto_close (2) 1 280d 280d 0/3 auto-obsoleted due to no activity on 2024/05/24 11:00
linux-5.15 INFO: task hung in tls_sk_proto_close 4 428d 487d 0/3 auto-obsoleted due to no activity on 2023/12/28 14:26
upstream INFO: task hung in tls_sk_proto_close C done error 964 7d06h 1697d 0/28 upstream: reported C repro on 2020/03/30 07:09
upstream INFO: task can't die in p9_fd_close C done 58 941d 1547d 0/28 closed as dup on 2022/08/26 12:44

Sample crash report:
INFO: task syz-executor.3:3496 blocked for more than 143 seconds.
      Not tainted 6.1.62-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:25000 pid:3496  ppid:3596   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_timeout+0xac/0x300 kernel/time/timer.c:1911
 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+0x350/0x610 kernel/sched/completion.c:138
 __flush_work+0x95b/0xad0 kernel/workqueue.c:3076
 __cancel_work_timer+0x519/0x6a0 kernel/workqueue.c:3163
 tls_sk_proto_close+0x121/0x980 net/tls/tls_main.c:331
 inet_release+0x174/0x1f0 net/ipv4/af_inet.c:429
 __sock_release net/socket.c:652 [inline]
 sock_close+0xcd/0x230 net/socket.c:1387
 __fput+0x3b7/0x890 fs/file_table.c:320
 task_work_run+0x246/0x300 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f0461a7b9da
RSP: 002b:00007fff39456bc0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f0461a7b9da
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f0461b9d980 R08: 0000001b33b20000 R09: 00000000000003a0
R10: 00000000813eec50 R11: 0000000000000293 R12: 000000000029cb41
R13: ffffffffffffffff R14: 00007f0461600000 R15: 000000000029c800
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12a230 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d12aa30 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
 #0: ffffffff8d12a060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:306 [inline]
 #0: ffffffff8d12a060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
 #0: ffffffff8d12a060 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6493
2 locks held by getty/3309:
 #0: ffff888141e75098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188
3 locks held by syz-executor.5/3587:
2 locks held by kworker/u4:11/13917:
3 locks held by kworker/0:13/29550:
 #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000801fd20 ((work_completion)(&(&sw_ctx_tx->tx_work.work)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffff888078cc7cd8 (&ctx->tx_lock){+.+.}-{3:3}, at: tx_work_handler+0x107/0x200 net/tls/tls_sw.c:2443
3 locks held by kworker/0:1/22650:
 #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000f8dfd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8d12f638 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:292 [inline]
 #2: ffffffff8d12f638 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3b0/0x8a0 kernel/rcu/tree_exp.h:950
1 lock held by syz-executor.2/1018:
2 locks held by kworker/0:8/1679:
 #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc900035bfd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by syz-executor.3/3496:
 #0: ffff88809e8eb210 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
 #0: ffff88809e8eb210 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release net/socket.c:651 [inline]
 #0: ffff88809e8eb210 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: sock_close+0x98/0x230 net/socket.c:1387
2 locks held by syz-executor.4/5098:
2 locks held by syz-executor.0/5102:

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.62-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xf88/0xfd0 kernel/hung_task.c:377
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3587 Comm: syz-executor.5 Not tainted 6.1.62-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:stack_trace_consume_entry+0x98/0x270 kernel/stacktrace.c:93
Code: 44 8b 37 45 85 f6 74 22 41 ff ce 41 0f b6 44 15 00 84 c0 0f 85 65 01 00 00 44 89 37 b0 01 e9 95 00 00 00 31 c0 e9 8e 00 00 00 <48> 89 d8 48 c1 e8 03 80 3c 10 00 74 26 4c 89 0c 24 48 89 df 49 89
RSP: 0018:ffffc900042af850 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffc900042af980 RCX: ffffffff8fb07000
RDX: dffffc0000000000 RSI: ffffffff81e1a056 RDI: ffffc900042af98c
RBP: ffffc900042af988 R08: 0000000000000002 R09: ffffc900042af990
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000855f31
R13: 1ffff92000855f31 R14: 0000000000000000 R15: 1ffff92000855f32
FS:  0000555557382480(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555557393978 CR3: 000000003ce5e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 arch_stack_walk+0x101/0x140 arch/x86/kernel/stacktrace.c:27
 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1724 [inline]
 slab_free_freelist_hook mm/slub.c:1750 [inline]
 slab_free mm/slub.c:3661 [inline]
 __kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674
 free_rb_tree_fname fs/ext4/dir.c:426 [inline]
 ext4_htree_free_dir_info fs/ext4/dir.c:448 [inline]
 ext4_release_dir+0x88/0xf0 fs/ext4/dir.c:638
 __fput+0x3b7/0x890 fs/file_table.c:320
 task_work_run+0x246/0x300 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fd5bb07c3a7
Code: 44 00 00 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb bc 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffe4a2f1bf8 EFLAGS: 00000206 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000065 RCX: 00007fd5bb07c3a7
RDX: fffffffffffff000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007fd5bb0c73b9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffe4a2f2d70
R13: 00007fd5bb0c73b9 R14: 00000000002c1008 R15: 000000000000000b
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/10 21:45 linux-6.1.y fb2635ac69ab 45e9b83e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in tls_sk_proto_close
2023/09/23 21:39 linux-6.1.y d23900f974e0 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in tls_sk_proto_close
* Struck through repros no longer work on HEAD.