syzbot


INFO: task hung in block_invalidate_folio

Status: auto-obsoleted due to no activity on 2025/03/07 11:30
Subsystems: gfs2
[Documentation on labels]
First crash: 166d, last: 154d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in block_invalidate_folio syz 1 24d 24d 0/3 upstream: reported syz repro on 2025/05/16 15:41

Sample crash report:
INFO: task kworker/1:1H:1163 blocked for more than 143 seconds.
      Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:1H    state:D stack:24952 pid:1163  tgid:1163  ppid:2      flags:0x00004000
Workqueue: gfs2-glock/syz:syz glock_work_func
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5371 [inline]
 __schedule+0x189f/0x4c80 kernel/sched/core.c:6758
 __schedule_loop kernel/sched/core.c:6835 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6850
 io_schedule+0x8d/0x110 kernel/sched/core.c:7683
 bit_wait_io+0x12/0xd0 kernel/sched/wait_bit.c:247
 __wait_on_bit_lock+0xd5/0x530 kernel/sched/wait_bit.c:90
 out_of_line_wait_on_bit_lock+0x1d5/0x260 kernel/sched/wait_bit.c:117
 wait_on_bit_lock_io include/linux/wait_bit.h:221 [inline]
 __lock_buffer fs/buffer.c:71 [inline]
 lock_buffer include/linux/buffer_head.h:426 [inline]
 discard_buffer fs/buffer.c:1576 [inline]
 block_invalidate_folio+0x36a/0x790 fs/buffer.c:1633
 folio_invalidate mm/truncate.c:126 [inline]
 truncate_cleanup_folio+0x203/0x300 mm/truncate.c:146
 truncate_inode_pages_range+0x2e5/0x10e0 mm/truncate.c:326
 do_xmote+0x6dc/0x1250 fs/gfs2/glock.c:754
 glock_work_func+0x343/0x5c0 fs/gfs2/glock.c:1090
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
 worker_thread+0x870/0xd30 kernel/workqueue.c:3391
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
INFO: task syz-executor:5834 blocked for more than 143 seconds.
      Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor    state:D stack:20160 pid:5834  tgid:5834  ppid:1      flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5371 [inline]
 __schedule+0x189f/0x4c80 kernel/sched/core.c:6758
 __schedule_loop kernel/sched/core.c:6835 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6850
 schedule_timeout+0xb0/0x290 kernel/time/sleep_timeout.c:75
 do_wait_for_common kernel/sched/completion.c:95 [inline]
 __wait_for_common kernel/sched/completion.c:116 [inline]
 wait_for_common kernel/sched/completion.c:127 [inline]
 wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
 __flush_work+0xa47/0xc60 kernel/workqueue.c:4235
 flush_work kernel/workqueue.c:4256 [inline]
 flush_delayed_work+0x169/0x1c0 kernel/workqueue.c:4278
 gfs2_clear_rgrpd+0xd0/0x6d0 fs/gfs2/rgrp.c:731
 gfs2_put_super+0x8c0/0x940 fs/gfs2/super.c:647
 generic_shutdown_super+0x139/0x2d0 fs/super.c:642
 kill_block_super+0x44/0x90 fs/super.c:1710
 deactivate_locked_super+0xc4/0x130 fs/super.c:473
 cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1414
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0xa2f/0x28e0 kernel/exit.c:938
 do_group_exit+0x207/0x2c0 kernel/exit.c:1087
 __do_sys_exit_group kernel/exit.c:1098 [inline]
 __se_sys_exit_group kernel/exit.c:1096 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096
 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6965b85d29
RSP: 002b:00007ffc4977cdf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f6965c01919 RCX: 00007f6965b85d29
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000005 R08: 00007ffc4977ab97 R09: 00007ffc4977e040
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc4977e040
R13: 00007f6965c018f4 R14: 00007ffc4977e080 R15: 0000000000000015
 </TASK>

Showing all locks held in the system:
2 locks held by kworker/u8:0/11:
1 lock held by khungtaskd/30:
 #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744
2 locks held by kworker/u8:4/66:
2 locks held by kworker/1:1H/1163:
 #0: ffff888027bf9948 ((wq_completion)gfs2-glock/syz:syz){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
 #0: ffff888027bf9948 ((wq_completion)gfs2-glock/syz:syz){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
 #1: ffffc90004457c60 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
 #1: ffffc90004457c60 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
2 locks held by getty/5584:
 #0: ffff88814c3f10a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc90002fde2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211
1 lock held by syz-executor/5834:
 #0: ffff8880292040e0 (&type->s_umount_key#93){++++}-{4:4}, at: __super_lock fs/super.c:56 [inline]
 #0: ffff8880292040e0 (&type->s_umount_key#93){++++}-{4:4}, at: __super_lock_excl fs/super.c:71 [inline]
 #0: ffff8880292040e0 (&type->s_umount_key#93){++++}-{4:4}, at: deactivate_super+0xb5/0xf0 fs/super.c:505
2 locks held by kworker/u9:8/5849:
 #0: ffff8880259f4148 ((wq_completion)nbd9-recv){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
 #0: ffff8880259f4148 ((wq_completion)nbd9-recv){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
 #1: ffffc90004287c60 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
 #1: ffffc90004287c60 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
2 locks held by kworker/u8:10/7390:
 #0: ffff8881476c8148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
 #0: ffff8881476c8148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310
 #1: ffffc90004657c60 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
 #1: ffffc90004657c60 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310
1 lock held by syz.6.365/8406:
 #0: ffff8880292040e0 (&type->s_umount_key#93){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
 #0: ffff8880292040e0 (&type->s_umount_key#93){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120
1 lock held by syz.5.377/8499:
 #0: ffff8880292040e0 (&type->s_umount_key#93){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
 #0: ffff8880292040e0 (&type->s_umount_key#93){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120
2 locks held by syz-executor/8793:
 #0: ffffffff8f05e928 (bio_slab_lock){+.+.}-{4:4}, at: bio_put_slab block/bio.c:140 [inline]
 #0: ffffffff8f05e928 (bio_slab_lock){+.+.}-{4:4}, at: bioset_exit+0x42f/0x650 block/bio.c:1755
 #1: ffffffff8e93d140 (rcu_state.barrier_mutex){+.+.}-{4:4}, at: rcu_barrier+0x4c/0x530 kernel/rcu/tree.c:3741
2 locks held by syz.7.478/9481:
3 locks held by syz.9.479/9483:
 #0: ffff8880259f0198 (&nbd->config_lock){+.+.}-{4:4}, at: nbd_ioctl+0x13c/0xf40 drivers/block/nbd.c:1572
 #1: ffff888142fc1438 (&q->q_usage_counter(io)#58){+.+.}-{0:0}, at: nbd_set_size+0xe0/0x8f0 drivers/block/nbd.c:387
 #2: ffff888142fc1470 (&q->q_usage_counter(queue)#42){+.+.}-{0:0}, at: nbd_set_size+0xe0/0x8f0 drivers/block/nbd.c:387
1 lock held by syz.9.479/9485:
 #0: ffff8880259f0198 (&nbd->config_lock){+.+.}-{4:4}, at: nbd_ioctl+0x13c/0xf40 drivers/block/nbd.c:1572
1 lock held by dhcpcd/9492:
 #0: ffff88805e890208 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:863 [inline]
 #0: ffff88805e890208 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: __sock_release net/socket.c:639 [inline]
 #0: ffff88805e890208 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x90/0x240 net/socket.c:1419
2 locks held by dhcpcd/9493:
 #0: ffff88805e85ee08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:863 [inline]
 #0: ffff88805e85ee08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: __sock_release net/socket.c:639 [inline]
 #0: ffff88805e85ee08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x90/0x240 net/socket.c:1419
 #1: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:334 [inline]
 #1: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:996
2 locks held by dhcpcd/9494:
 #0: ffff8880570bfa08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:863 [inline]
 #0: ffff8880570bfa08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: __sock_release net/socket.c:639 [inline]
 #0: ffff8880570bfa08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x90/0x240 net/socket.c:1419
 #1: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:334 [inline]
 #1: ffffffff8e93d278 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:996

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

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:234 [inline]
 watchdog+0xff6/0x1040 kernel/hung_task.c:397
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 9505 Comm: sed Not tainted 6.13.0-rc3-next-20241220-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:get_current arch/x86/include/asm/current.h:49 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x8/0x70 kernel/kcov.c:216
Code: 8b 3d 44 af 70 0c 48 89 de 5b e9 73 08 5b 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 <65> 48 8b 0c 25 c0 d6 03 00 65 8b 15 90 b2 44 7e 81 e2 00 01 ff 00
RSP: 0018:ffffc9000c28f898 EFLAGS: 00000246
RAX: ffffffff8216839b RBX: ffff88805fe803e0 RCX: ffff88802b8ada00
RDX: ffff88802b8ada00 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000c28f9f8 R08: ffffffff8216834d R09: 1ffff1100a79a3cd
R10: dffffc0000000000 R11: ffffed100a79a3ce R12: dffffc0000000000
R13: 1ffff92001851f24 R14: 0000000000000000 R15: ffff88805cf240f8
FS:  00007f81b92b3380(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9fd10cc000 CR3: 0000000061a1e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 __split_vma+0x22b/0xc50 mm/vma.c:474
 split_vma mm/vma.c:543 [inline]
 vma_modify+0x244/0x330 mm/vma.c:1530
 vma_modify_flags+0x3a5/0x430 mm/vma.c:1548
 mprotect_fixup+0x45a/0xaa0 mm/mprotect.c:666
 do_mprotect_pkey+0x99e/0xde0 mm/mprotect.c:840
 __do_sys_mprotect mm/mprotect.c:861 [inline]
 __se_sys_mprotect mm/mprotect.c:858 [inline]
 __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:858
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f81b95d7bb7
Code: 00 00 00 b8 0b 00 00 00 0f 05 48 3d 01 f0 ff ff 73 01 c3 48 8d 0d b9 46 01 00 f7 d8 89 01 48 83 c8 ff c3 b8 0a 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8d 0d 99 46 01 00 f7 d8 89 01 48 83
RSP: 002b:00007ffd162b2028 EFLAGS: 00000206 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00007f81b95b4ac0 RCX: 00007f81b95d7bb7
RDX: 0000000000000001 RSI: 0000000000001000 RDI: 00007f81b933c000
RBP: 00007ffd162b2140 R08: 00007ffd162b1fb8 R09: 00007f81b95b45c0
R10: 00007f81b9330c08 R11: 0000000000000206 R12: 00007f81b95b4ac0
R13: 00007f81b95dfeda R14: 00007f81b933cf98 R15: 00007f81b933cd98
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/06 11:19 linux-next 8155b4ef3466 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in block_invalidate_folio
2024/12/25 18:40 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in block_invalidate_folio
* Struck through repros no longer work on HEAD.