syzbot


INFO: task hung in unix_stream_sendmsg

Status: upstream: reported C repro on 2024/03/03 03:41
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+8429d293417cb79835a3@syzkaller.appspotmail.com
First crash: 113d, last: 113d
Bug presence (2)
Date Name Commit Repro Result
2024/03/03 linux-6.1.y (ToT) a3eb3a74aa8c C [report] INFO: task hung in unix_dgram_sendmsg
2024/03/03 upstream (ToT) 04b8076df253 C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in unix_stream_sendmsg 3 111d 114d 0/3 auto-obsoleted due to no activity on 2024/06/13 18:51
upstream INFO: task hung in unix_stream_sendmsg net C done 4 124d 127d 26/27 fixed on 2024/03/29 01:33
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/03/21 09:55 1h53m fix candidate upstream job log (0)

Sample crash report:
INFO: task syz-executor122:11992 blocked for more than 143 seconds.
      Not tainted 6.1.80-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor122 state:D stack:27208 pid:11992 ppid:3569   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 wait_for_unix_gc+0x14c/0x210 net/unix/garbage.c:201
 unix_stream_sendmsg+0xc3/0x1070 net/unix/af_unix.c:2167
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514
 ___sys_sendmsg net/socket.c:2568 [inline]
 __sys_sendmsg+0x2a9/0x390 net/socket.c:2597
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fecb7b4d7a9
RSP: 002b:00007ffc61e733e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fecb7b4d7a9
RDX: 0000000000000041 RSI: 0000000020001480 RDI: 0000000000000003
RBP: 0000000000084ebf R08: 00007fecb7b8f09e R09: 00007fecb7b8f09e
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc61e7349c
R13: 431bde82d7b634db R14: 00007ffc61e734c0 R15: 00007ffc61e734a0
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12aa90 (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: ffffffff8d12b290 (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: ffffffff8d12a8c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:319 [inline]
 #0: ffffffff8d12a8c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:760 [inline]
 #0: ffffffff8d12a8c0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by kworker/u4:3/46:
 #0: ffff888012479138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90000b77d20 ((work_completion)(&(&kfence_timer)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by dhcpcd/3216:
2 locks held by getty/3302:
 #0: ffff88814b997098 (&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

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.80-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
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: 3216 Comm: dhcpcd Not tainted 6.1.80-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:unix_gc+0x1082/0x13e0
Code: a0 f8 e9 13 ff ff ff e8 2c cf 48 f8 eb 05 e8 25 cf 48 f8 48 8b 1d 4e 68 f7 04 49 c7 c7 40 18 39 8e 4c 39 fb 0f 84 aa 00 00 00 <48> 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74
RSP: 0018:ffffc900034dfa60 EFLAGS: 00000293
RAX: ffffffff8941b09d RBX: ffff88807e71f650 RCX: ffff888029260000
RDX: 0000000000000000 RSI: ffffffff8aebed40 RDI: ffffffff8b3d1140
RBP: ffffc900034dfbd0 R08: dffffc0000000000 R09: fffffbfff2092058
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88807e71f650
R13: 1ffff1100fce3eee R14: 0000000000000000 R15: ffffffff8e391840
FS:  00007f7ff886a740(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001480 CR3: 0000000021ba3000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 unix_release_sock+0xab8/0xcf0 net/unix/af_unix.c:669
 unix_release+0x88/0xc0 net/unix/af_unix.c:1039
 __sock_release net/socket.c:654 [inline]
 sock_close+0xcd/0x230 net/socket.c:1400
 __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:87
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7ff89350a8
Code: 48 8b 05 83 9d 0d 00 64 c7 00 16 00 00 00 83 c8 ff 48 83 c4 20 5b c3 64 8b 04 25 18 00 00 00 85 c0 75 20 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 5b 48 8b 15 51 9d 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffe923cbed8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7ff89350a8
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000017
RBP: 00007ffe923ec288 R08: 0000000000000007 R09: 247827cf7e7347b2
R10: 0000000000004000 R11: 0000000000000246 R12: 000055f6168fe4f0
R13: 00007ffe923dc0c8 R14: 0000000000000148 R15: 0000000000000004
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/03 03:40 linux-6.1.y a3eb3a74aa8c 25905f5d .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in unix_stream_sendmsg
* Struck through repros no longer work on HEAD.