syzbot


INFO: task hung in synchronize_rcu

Status: upstream: reported C repro on 2023/04/01 04:49
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+a7cb7d83f9a1ddae7487@syzkaller.appspotmail.com
First crash: 557d, last: 31d
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: INFO: rcu detected stall in corrupted (log)
Repro: C syz .config
  
Bug presence (2)
Date Name Commit Repro Result
2023/05/11 linux-6.1.y (ToT) ca48fc16c493 C [report] INFO: rcu detected stall in corrupted
2023/05/11 upstream (ToT) 80e62bc8487b C Didn't crash
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in synchronize_rcu (3) C done done 374 602d 1539d 22/28 fixed on 2023/02/24 13:50
android-49 INFO: task hung in synchronize_rcu 1 1775d 1775d 0/3 auto-closed as invalid on 2020/03/28 16:57
linux-4.14 INFO: task hung in synchronize_rcu vfs C error 162 616d 1798d 0/1 upstream: reported C repro on 2019/11/07 04:32
linux-4.19 INFO: task hung in synchronize_rcu C error 70 606d 1796d 0/1 upstream: reported C repro on 2019/11/08 21:27
linux-5.15 INFO: task hung in synchronize_rcu 1 542d 542d 0/3 auto-obsoleted due to no activity on 2023/08/14 02:05
linux-5.15 INFO: task hung in synchronize_rcu (3) origin:lts-only C error 8 10d 75d 0/3 upstream: reported C repro on 2024/07/26 03:55
upstream INFO: task hung in synchronize_rcu syz done 1206 1776d 1802d 14/28 fixed on 2019/11/29 15:48
upstream INFO: task hung in synchronize_rcu (4) fs net C done error 687 18h12m 524d 0/28 upstream: reported C repro on 2023/05/04 02:01
linux-5.15 INFO: task hung in synchronize_rcu (2) 1 231d 231d 0/3 auto-obsoleted due to no activity on 2024/05/31 13:53
android-414 INFO: task hung in synchronize_rcu 1 1794d 1794d 0/1 auto-closed as invalid on 2020/03/10 10:42
upstream INFO: task hung in synchronize_rcu (2) trace 8 1775d 1775d 0/28 closed as invalid on 2019/11/30 16:54
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2023/11/04 15:56 6h51m fix candidate upstream OK (1) job log
2023/10/20 14:20 2h47m bisect fix linux-6.1.y OK (0) job log log
2023/09/15 19:01 2h03m bisect fix linux-6.1.y OK (0) job log log
2023/07/01 18:15 1h18m bisect fix linux-6.1.y OK (0) job log log
2023/06/01 08:18 1h16m bisect fix linux-6.1.y OK (0) job log log
2023/05/01 15:41 1h03m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
INFO: task dhcpcd:5015 blocked for more than 143 seconds.
      Not tainted 6.1.22-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:dhcpcd          state:D stack:28104 pid:5015  ppid:3212   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 exp_funnel_lock kernel/rcu/tree_exp.h:315 [inline]
 synchronize_rcu_expedited+0x789/0x8a0 kernel/rcu/tree_exp.h:948
 synchronize_rcu+0x11c/0x3f0 kernel/rcu/tree.c:3510
 __unregister_prot_hook+0x40d/0x590 net/packet/af_packet.c:382
 packet_do_bind+0x45f/0xbd0 net/packet/af_packet.c:3226
 __sys_bind+0x233/0x2e0 net/socket.c:1776
 __do_sys_bind net/socket.c:1787 [inline]
 __se_sys_bind net/socket.c:1785 [inline]
 __x64_sys_bind+0x76/0x80 net/socket.c:1785
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fb9c6cafce7
RSP: 002b:00007ffc3855f638 EFLAGS: 00000217 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 000055a823cb6b60 RCX: 00007fb9c6cafce7
RDX: 0000000000000014 RSI: 00007ffc3855f648 RDI: 0000000000000005
RBP: 0000000000000000 R08: 000055a8255928f0 R09: 00007fb9c6d70a60
R10: 0000000020000000 R11: 0000000000000217 R12: 000055a82558f600
R13: 000055a8255927d8 R14: 00007ffc3857ff1c R15: 00007ffc3857ff44
 </TASK>
INFO: task dhcpcd:5051 blocked for more than 144 seconds.
      Not tainted 6.1.22-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:dhcpcd          state:D stack:28104 pid:5051  ppid:3212   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 exp_funnel_lock kernel/rcu/tree_exp.h:315 [inline]
 synchronize_rcu_expedited+0x789/0x8a0 kernel/rcu/tree_exp.h:948
 synchronize_rcu+0x11c/0x3f0 kernel/rcu/tree.c:3510
 __unregister_prot_hook+0x40d/0x590 net/packet/af_packet.c:382
 packet_do_bind+0x45f/0xbd0 net/packet/af_packet.c:3226
 __sys_bind+0x233/0x2e0 net/socket.c:1776
 __do_sys_bind net/socket.c:1787 [inline]
 __se_sys_bind net/socket.c:1785 [inline]
 __x64_sys_bind+0x76/0x80 net/socket.c:1785
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fb9c6cafce7
RSP: 002b:00007ffc3855f638 EFLAGS: 00000217 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 000055a823cb6b60 RCX: 00007fb9c6cafce7
RDX: 0000000000000014 RSI: 00007ffc3855f648 RDI: 0000000000000005
RBP: 0000000000000000 R08: 000055a825592a70 R09: 00007fb9c6d70a60
R10: 0000000020000000 R11: 0000000000000217 R12: 000055a82558f600
R13: 000055a825592958 R14: 00007ffc3857ff1c R15: 00007ffc3857ff44
 </TASK>
INFO: task dhcpcd:5349 blocked for more than 145 seconds.
      Not tainted 6.1.22-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:dhcpcd          state:D stack:28104 pid:5349  ppid:3212   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 exp_funnel_lock kernel/rcu/tree_exp.h:315 [inline]
 synchronize_rcu_expedited+0x789/0x8a0 kernel/rcu/tree_exp.h:948
 synchronize_rcu+0x11c/0x3f0 kernel/rcu/tree.c:3510
 packet_release+0x9b8/0xca0 net/packet/af_packet.c:3157
 __sock_release net/socket.c:652 [inline]
 sock_close+0xcd/0x230 net/socket.c:1370
 __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+0xd9/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:0x7fb9c6ca0fc3
RSP: 002b:00007ffc3855f638 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 000055a823cb6b60 RCX: 00007fb9c6ca0fc3
RDX: 000000000000010f RSI: 0000000000000000 RDI: 0000000000000005
RBP: 0000000000000000 R08: 000055a825592bf0 R09: 00007fb9c6d70a60
R10: 0000000020000000 R11: 0000000000000246 R12: 000055a82558f600
R13: 000055a825592ad8 R14: 00007ffc3857ff1c R15: 00007ffc3857ff44
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8cf26830 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8cf27030 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
3 locks held by kworker/1:1/26:
1 lock held by khungtaskd/28:
 #0: ffffffff8cf26660 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3315:
 #0: ffff88814b37c098 (&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:2177
1 lock held by syz-executor201/3724:
6 locks held by syz-executor201/3725:
 #0: ffff888148c86460 (sb_writers#11){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393
 #1: ffff88807315f900 (&type->i_mutex_dir_key#7/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:791 [inline]
 #1: ffff88807315f900 (&type->i_mutex_dir_key#7/1){+.+.}-{3:3}, at: filename_create+0x256/0x530 fs/namei.c:3807
 #2: ffffffff8cf4e868 (cgroup_mutex){+.+.}-{3:3}, at: cgroup_kn_lock_live+0xe5/0x290 kernel/cgroup/cgroup.c:1667
 #3: ffffffff8cdc40b0 (cpu_hotplug_lock){++++}-{0:0}, at: cpuset_css_online+0x47/0x820 kernel/cgroup/cpuset.c:3099
 #4: ffffffff8cf5b190 (&cpuset_rwsem){++++}-{0:0}, at: cpuset_css_online+0x53/0x820 kernel/cgroup/cpuset.c:3100
 #5: ffffffff8cf2bc38 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:324 [inline]
 #5: ffffffff8cf2bc38 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x479/0x8a0 kernel/rcu/tree_exp.h:948
3 locks held by kworker/0:6/3766:
2 locks held by kworker/0:8/3780:
 #0: 
ffff888012466538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x77a/0x11f0
 #1: ffffc900047dfd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7bd/0x11f0 kernel/workqueue.c:2264

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.22-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/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+0xf18/0xf60 kernel/hung_task.c:377
 kthread+0x268/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 3766 Comm: kworker/0:6 Not tainted 6.1.22-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: events uhid_device_add_worker
RIP: 0010:__run_hrtimer kernel/time/hrtimer.c:1683 [inline]
RIP: 0010:__hrtimer_run_queues+0x5ac/0xe50 kernel/time/hrtimer.c:1749
Code: 38 84 c0 0f 85 56 03 00 00 0f b6 1b 31 ff 89 de e8 a9 86 10 00 85 db 74 11 e8 40 84 10 00 48 8b 3c 24 41 ff d5 41 89 c5 eb 5f <e8> 2f 84 10 00 4d 89 fc 65 4c 8b 3d c4 65 89 7e 49 81 c7 38 0a 00
RSP: 0018:ffffc90000007d60 EFLAGS: 00000046
RAX: 0000000080010001 RBX: 0000000000000000 RCX: ffff88807b6957c0
RDX: ffff88807b6957c0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000007eb0 R08: ffffffff81790957 R09: fffffbfff1ca4d86
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880b982a4c0
R13: ffffffff81794270 R14: ffff8880b982a4c0 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffb41d90b8 CR3: 0000000079925000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1096 [inline]
 __sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1113
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1107
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:console_trylock_spinning+0x3ad/0x450 kernel/printk/printk.c:1919
Code: 0f 84 4c ff ff ff e8 b2 56 1c 00 fb 31 db eb 41 e8 a8 56 1c 00 e8 c3 93 10 09 4d 85 ed 74 cd e8 99 56 1c 00 fb bb 01 00 00 00 <48> c7 c7 00 28 e0 8c 31 f6 ba 01 00 00 00 31 c9 41 b8 01 00 00 00
RSP: 0018:ffffc9000479f1c0 EFLAGS: 00000293
RAX: ffffffff816d3707 RBX: 0000000000000001 RCX: ffff88807b6957c0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000479f288 R08: ffffffff816d36c0 R09: fffffbfff204de4e
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920008f3e38
R13: 0000000000000200 R14: 0000000000000046 R15: dffffc0000000000
 vprintk_emit+0xb8/0x1f0 kernel/printk/printk.c:2267
 dev_vprintk_emit+0x2aa/0x323 drivers/base/core.c:4884
 dev_printk_emit+0xd9/0x118 drivers/base/core.c:4895
 _dev_warn+0x11e/0x165 drivers/base/core.c:4951
 hid_parser_main+0x749/0xae0 drivers/hid/hid-core.c:637
 hid_open_report+0xacd/0x1450 drivers/hid/hid-core.c:1272
 hid_parse include/linux/hid.h:1098 [inline]
 hid_generic_probe+0x39/0x80 drivers/hid/hid-generic.c:63
 hid_device_probe+0x298/0x3a0 drivers/hid/hid-core.c:2624
 really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
 __driver_probe_device+0x1c3/0x3f0 drivers/base/dd.c:778
 driver_probe_device+0x50/0x420 drivers/base/dd.c:808
 __device_attach_driver+0x2cf/0x510 drivers/base/dd.c:936
 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
 __device_attach+0x359/0x570 drivers/base/dd.c:1008
 bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
 device_add+0xb48/0xfd0 drivers/base/core.c:3664
 hid_add_device+0x3a5/0x510 drivers/hid/hid-core.c:2776
 uhid_device_add_worker+0x40/0xe0 drivers/hid/uhid.c:73
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x268/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/01 04:49 linux-6.1.y 3b29299e5f60 f325deb0 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in synchronize_rcu
2023/10/24 08:57 linux-6.1.y 7d24402875c7 af8d2e46 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in synchronize_rcu
2024/04/28 20:20 linux-6.1.y f2295faba5e8 07b455f9 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 INFO: task hung in synchronize_rcu
2024/09/08 06:39 linux-6.1.y 699506173494 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in synchronize_rcu
2024/07/10 10:00 linux-6.1.y 7753af06eebf bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in synchronize_rcu
2024/03/29 03:30 linux-6.1.y e5cd595e23c1 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in synchronize_rcu
2024/03/11 02:27 linux-6.1.y 61adba85cc40 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in synchronize_rcu
2023/11/04 16:01 linux-6.1.y 4a61839152cc 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in synchronize_rcu
* Struck through repros no longer work on HEAD.