syzbot


INFO: task hung in tls_sk_proto_close

Status: auto-obsoleted due to no activity on 2023/12/28 14:26
Reported-by: syzbot+ce4a6760048c45da2912@syzkaller.appspotmail.com
First crash: 285d, last: 226d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in tls_sk_proto_close 2 174d 222d 0/3 auto-obsoleted due to no activity on 2024/02/18 21:46
linux-5.15 INFO: task hung in tls_sk_proto_close (2) 1 78d 78d 0/3 upstream: reported on 2024/02/14 11:00
upstream INFO: task hung in tls_sk_proto_close C done error 963 11d 1494d 0/26 upstream: reported C repro on 2020/03/30 07:09
upstream INFO: task can't die in p9_fd_close C done 58 739d 1345d 0/26 closed as dup on 2022/08/26 12:44

Sample crash report:
INFO: task syz-executor.1:17721 blocked for more than 145 seconds.
      Not tainted 5.15.132-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:27064 pid:17721 ppid:  3553 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 schedule_timeout+0xac/0x300 kernel/time/timer.c:1860
 do_wait_for_common+0x2d9/0x480 kernel/sched/completion.c:85
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x48/0x60 kernel/sched/completion.c:138
 __flush_work+0x124/0x1a0 kernel/workqueue.c:3094
 __cancel_work_timer+0x519/0x6a0 kernel/workqueue.c:3181
 tls_sk_proto_close+0x121/0x980 net/tls/tls_main.c:308
 inet_release+0x174/0x1f0 net/ipv4/af_inet.c:431
 __sock_release net/socket.c:649 [inline]
 sock_close+0xcd/0x230 net/socket.c:1317
 __fput+0x3bf/0x890 fs/file_table.c:280
 task_work_run+0x129/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f036f1ab9da
RSP: 002b:00007ffe93d9e540 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f036f1ab9da
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007f036f2cd980 R08: 0000001b31020000 R09: 0000000000000a5d
R10: 0000000081c33965 R11: 0000000000000293 R12: 00000000000fba06
R13: ffffffffffffffff R14: 00007f036ed30000 R15: 00000000000fb6c5
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91f0a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3262:
 #0: ffff88814ab1f098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900024a32e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
2 locks held by kworker/0:3/3594:
3 locks held by kworker/0:5/3635:
 #0: ffff888011c70d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc9000445fd20 ((work_completion)(&(&sw_ctx_tx->tx_work.work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff8880737d1cd8 (&ctx->tx_lock){+.+.}-{3:3}, at: tx_work_handler+0x107/0x200 net/tls/tls_sw.c:2292
2 locks held by kworker/1:20/9755:
 #0: ffff888011c72538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900043efd20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
1 lock held by syz-executor.1/17721:
 #0: ffff888071134410 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #0: ffff888071134410 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:648 [inline]
 #0: ffff888071134410 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x98/0x230 net/socket.c:1317
4 locks held by udevd/18623:
 #0: ffff8880b9a39718 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xa8/0x140 kernel/sched/core.c:483
 #1: ffff8880b9a27848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x53d/0x810 kernel/sched/psi.c:891
 #2: ffff88807cdbb558 (&ep->lock){...-}-{2:2}, at: ep_poll_callback+0x75/0x970 fs/eventpoll.c:1138
 #3: ffff88807cdbb4a8 (&ep->wq){..-.}-{2:2}, at: __wake_up_common_lock kernel/sched/wait.c:137 [inline]
 #3: ffff88807cdbb4a8 (&ep->wq){..-.}-{2:2}, at: __wake_up+0xf5/0x1c0 kernel/sched/wait.c:157
3 locks held by kworker/u4:20/19160:
 #0: ffff8880b9a39718 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xa8/0x140 kernel/sched/core.c:483
 #1: ffffc9000ab87d20 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff8880b9a28098 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 kernel/time/timer.c:946
1 lock held by syz-executor.3/19693:
 #0: ffffffff8c923668 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #0: ffffffff8c923668 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:845
1 lock held by syz-executor.1/19706:

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.132-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/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+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 19149 Comm: kworker/u4:15 Not tainted 5.15.132-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Workqueue: bat_events batadv_nc_worker
RIP: 0010:__this_cpu_preempt_check+0x0/0x10 lib/smp_processor_id.c:65
Code: 4c 89 fe 4c 89 f2 e8 58 c5 fe ff 48 8b 74 24 30 48 c7 c7 00 7a d8 8a e8 47 c5 fe ff e8 c3 6c ff ff eb a9 e8 12 eb ff ff 66 90 <48> 89 fe 48 c7 c7 80 79 d8 8a e9 e1 fe ff ff cc eb 1e 0f 1f 00 48
RSP: 0018:ffffc9000946fa18 EFLAGS: 00000082
RAX: 0000000000000001 RBX: ffffc9000946fa80 RCX: 1ffff9200128def0
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffffffff8a8b1f00
RBP: ffffc9000946fb70 R08: dffffc0000000000 R09: fffffbfff1f7b221
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200128df4c
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000246
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30921000 CR3: 000000002589d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 lockdep_recursion_finish kernel/locking/lockdep.c:436 [inline]
 lock_acquire+0x1eb/0x4f0 kernel/locking/lockdep.c:5624
 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:269
 rcu_read_lock include/linux/rcupdate.h:696 [inline]
 batadv_nc_process_nc_paths+0xb8/0x350 net/batman-adv/network-coding.c:691
 batadv_nc_worker+0x3d4/0x5b0 net/batman-adv/network-coding.c:732
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/19 14:25 linux-5.15.y 35ecaa3632bf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in tls_sk_proto_close
2023/09/05 10:40 linux-5.15.y 8f790700c974 0b6286dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in tls_sk_proto_close
2023/07/30 21:19 linux-5.15.y 09996673e313 2a0d0f29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in tls_sk_proto_close
2023/07/22 12:29 linux-5.15.y d54cfc420586 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in tls_sk_proto_close
* Struck through repros no longer work on HEAD.