syzbot


INFO: task hung in sb_start_write

Status: upstream: reported on 2024/07/18 10:36
Reported-by: syzbot+0a4f71b83462db5b58fe@syzkaller.appspotmail.com
First crash: 51d, last: 41d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in sb_start_write ext4 401 1h01m 44d 0/27 upstream: reported on 2024/07/25 06:18
linux-5.15 INFO: task hung in sb_start_write 1 43d 43d 0/3 upstream: reported on 2024/07/26 04:36

Sample crash report:
INFO: task syz.3.598:5548 blocked for more than 143 seconds.
      Not tainted 6.1.100-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.3.598       state:D stack:27928 pid:5548  ppid:3553   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6561
 schedule+0xbf/0x180 kernel/sched/core.c:6637
 percpu_rwsem_wait+0x3b9/0x450 kernel/locking/percpu-rwsem.c:162
 __percpu_down_read+0xe6/0x130 kernel/locking/percpu-rwsem.c:177
 percpu_down_read include/linux/percpu-rwsem.h:65 [inline]
 __sb_start_write include/linux/fs.h:1891 [inline]
 sb_start_write+0x180/0x1c0 include/linux/fs.h:1966
 mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:437
 vfs_fchown fs/open.c:800 [inline]
 ksys_fchown+0x40/0x150 fs/open.c:815
 __do_sys_fchown fs/open.c:823 [inline]
 __se_sys_fchown fs/open.c:821 [inline]
 __x64_sys_fchown+0x76/0x80 fs/open.c:821
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f9097575f19
RSP: 002b:00007f9097339048 EFLAGS: 00000246 ORIG_RAX: 000000000000005d
RAX: ffffffffffffffda RBX: 00007f9097706470 RCX: 00007f9097575f19
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f90975e4e68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f9097706470 R15: 00007ffc804d7c88
 </TASK>
INFO: task kmmpd-loop3:5536 blocked for more than 143 seconds.
      Not tainted 6.1.100-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kmmpd-loop3     state:D stack:28376 pid:5536  ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6561
 schedule+0xbf/0x180 kernel/sched/core.c:6637
 percpu_rwsem_wait+0x3b9/0x450 kernel/locking/percpu-rwsem.c:162
 __percpu_down_read+0xe6/0x130 kernel/locking/percpu-rwsem.c:177
 percpu_down_read include/linux/percpu-rwsem.h:65 [inline]
 __sb_start_write include/linux/fs.h:1891 [inline]
 sb_start_write include/linux/fs.h:1966 [inline]
 write_mmp_block+0x2ee/0x390 fs/ext4/mmp.c:66
 kmmpd+0x263/0xa70 fs/ext4/mmp.c:246
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Showing all locks held in the system:
4 locks held by kworker/u4:1/11:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12af10 (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: ffffffff8d12b710 (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/27:
 #0: ffffffff8d12ad40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d12ad40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d12ad40 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
4 locks held by udevd/3003:
 #0: ffff888052662668 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xae/0xd10 fs/seq_file.c:182
 #1: ffff88805bb3a888 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x4f/0x3a0 fs/kernfs/file.c:150
 #2: ffff888049a20e88 (kn->active#5){++++}-{0:0}, at: kernfs_seq_start+0x6e/0x3a0 fs/kernfs/file.c:151
 #3: ffff88805d1020e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #3: ffff88805d1020e8 (&dev->mutex){....}-{3:3}, at: uevent_show+0x176/0x330 drivers/base/core.c:2661
1 lock held by dhcpcd/3217:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
2 locks held by getty/3300:
 #0: ffff88802882e098 (&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:2198
3 locks held by kworker/0:3/3556:
 #0: ffff888012470938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90003dbfd20 (deferred_process_work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: switchdev_deferred_process_work+0xa/0x20 net/switchdev/switchdev.c:104
3 locks held by kworker/0:5/3598:
 #0: ffff888012470938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc900042ffd20 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xa/0x50 net/core/link_watch.c:263
2 locks held by kworker/0:6/3599:
 #0: ffff888012472138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc900043efd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by syz.3.598/5548:
 #0: ffff8880777e2460 (sb_writers#4){++++}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:437
1 lock held by kmmpd-loop3/5536:
 #0: ffff8880777e2460 (sb_writers#4){++++}-{0:0}, at: kmmpd+0x263/0xa70 fs/ext4/mmp.c:246
7 locks held by syz-executor/8598:
 #0: ffff88807e448460 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x269/0xbc0 fs/read_write.c:580
 #1: ffff888059237888 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1e7/0x4f0 fs/kernfs/file.c:321
 #2: ffff888145b76e88 (kn->active#51){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20b/0x4f0 fs/kernfs/file.c:322
 #3: ffffffff8dc0d188 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: new_device_store+0x1ad/0x800 drivers/net/netdevsim/bus.c:160
 #4: ffff88805d1020e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #4: ffff88805d1020e8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8a/0x570 drivers/base/dd.c:990
 #5: ffff88805d1062f8 (&devlink->lock_key#7){+.+.}-{3:3}, at: nsim_drv_probe+0xc9/0xb20 drivers/net/netdevsim/dev.c:1539
 #6: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: register_nexthop_notifier+0x80/0x270 net/ipv4/nexthop.c:3605
1 lock held by syz.0.1633/8676:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
1 lock held by syz.0.1633/8681:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
1 lock held by syz.3.1635/8680:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: __tun_chr_ioctl+0x465/0x2430 drivers/net/tun.c:3101
1 lock held by syz.3.1635/8683:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: devinet_ioctl+0x2a5/0x1b20 net/ipv4/devinet.c:1070
1 lock held by syz.1.1637/8689:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
1 lock held by syz.1.1637/8690:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
1 lock held by syz.1.1637/8691:
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e299e28 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 6.1.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3661 Comm: kworker/u4:10 Not tainted 6.1.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Workqueue: bat_events batadv_nc_worker
RIP: 0010:bytes_is_nonzero mm/kasan/generic.c:84 [inline]
RIP: 0010:memory_is_nonzero mm/kasan/generic.c:102 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:128 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/generic.c:159 [inline]
RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline]
RIP: 0010:kasan_check_range+0x84/0x290 mm/kasan/generic.c:189
Code: 34 1a 4c 89 f5 4c 29 cd 48 83 fd 10 7f 26 48 85 ed 0f 84 3a 01 00 00 49 f7 d2 49 01 da 41 80 39 00 0f 85 c4 01 00 00 49 ff c1 <49> ff c2 75 ee e9 1d 01 00 00 45 89 cf 41 83 e7 07 0f 84 b5 00 00
RSP: 0018:ffffc90004617970 EFLAGS: 00000086
RAX: 0000000000000001 RBX: 1ffffffff209385e RCX: ffffffff816adafa
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff9049c2f0
RBP: 0000000000000001 R08: dffffc0000000000 R09: fffffbfff209385f
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffff88807544e468
R13: dffffc0000000000 R14: fffffbfff209385f R15: ffff88807544e448
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd4c3103fa8 CR3: 000000001bd71000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
 hlock_class kernel/locking/lockdep.c:228 [inline]
 mark_lock+0x9a/0x340 kernel/locking/lockdep.c:4606
 mark_held_locks kernel/locking/lockdep.c:4230 [inline]
 __trace_hardirqs_on_caller kernel/locking/lockdep.c:4256 [inline]
 lockdep_hardirqs_on_prepare+0x3a0/0x7a0 kernel/locking/lockdep.c:4315
 trace_hardirqs_on+0x34/0x40 kernel/trace/trace_preemptirq.c:49
 __local_bh_enable_ip+0x164/0x1f0 kernel/softirq.c:401
 spin_unlock_bh include/linux/spinlock.h:396 [inline]
 batadv_nc_purge_paths+0x30e/0x3b0 net/batman-adv/network-coding.c:471
 batadv_nc_worker+0x361/0x610 net/batman-adv/network-coding.c:722
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/23 22:41 linux-6.1.y 9b3f9a5b12dc e50e8da5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in sb_start_write
2024/07/28 17:24 linux-6.1.y c1cec4dad96b 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in sb_start_write
2024/07/27 23:19 linux-6.1.y c1cec4dad96b 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in sb_start_write
2024/07/18 10:36 linux-6.1.y cac15753b8ce 0f902625 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in sb_start_write
* Struck through repros no longer work on HEAD.