syzbot


INFO: task hung in gfs2_withdraw

Status: upstream: reported C repro on 2025/01/22 02:01
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+fe56f38467063990bcb7@syzkaller.appspotmail.com
First crash: 353d, last: 9d01h
Fix commit to backport (bisect log) :
tree: upstream
commit fe0690f0a6f190a9ec0736c01ddeba7a729cf30d
Author: Andreas Gruenbacher <agruenba@redhat.com>
Date: Fri Aug 25 09:18:38 2023 +0000

  gfs2: Sanitize kthread stopping

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: INFO: task hung in gfs2_withdraw (log)
Repro: C syz .config
  
Bug presence (2)
Date Name Commit Repro Result
2025/03/22 linux-6.1.y (ToT) 344a09659766 C [report] INFO: task hung in gfs2_withdraw
2025/03/22 upstream (ToT) 88d324e69ea9 C Didn't crash
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2025/03/29 06:22 7h58m fix candidate upstream OK (1) job log
2025/02/22 15:39 2h20m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
INFO: task syz.1.24:4526 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.24        state:D stack:25696 pid:4526  ppid:4390   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x10ec/0x40b0 kernel/sched/core.c:6561
 schedule+0xb9/0x180 kernel/sched/core.c:6637
 schedule_timeout+0x97/0x280 kernel/time/timer.c:2144
 do_wait_for_common kernel/sched/completion.c:85 [inline]
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x2b9/0x590 kernel/sched/completion.c:138
 kthread_stop+0x197/0x650 kernel/kthread.c:711
 signal_our_withdraw fs/gfs2/util.c:159 [inline]
 gfs2_withdraw+0x643/0x1780 fs/gfs2/util.c:354
 gfs2_metatype_check_ii+0x74/0x90 fs/gfs2/util.c:533
 gfs2_metatype_check_i fs/gfs2/util.h:129 [inline]
 gfs2_quota_init+0xc81/0xe80 fs/gfs2/quota.c:1406
 gfs2_make_fs_rw+0x3f5/0x560 fs/gfs2/super.c:155
 gfs2_fill_super+0x1888/0x1f80 fs/gfs2/ops_fstype.c:1271
 get_tree_bdev+0x3f1/0x610 fs/super.c:1366
 gfs2_get_tree+0x4d/0x1e0 fs/gfs2/ops_fstype.c:1327
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 do_new_mount+0x24a/0xa40 fs/namespace.c:3078
 do_mount fs/namespace.c:3421 [inline]
 __do_sys_mount fs/namespace.c:3629 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3606
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f32a0790eea
RSP: 002b:00007ffcd89139c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffcd8913a50 RCX: 00007f32a0790eea
RDX: 0000200000000400 RSI: 0000200000012500 RDI: 00007ffcd8913a10
RBP: 0000200000000400 R08: 00007ffcd8913a50 R09: 0000000002000000
R10: 0000000002000000 R11: 0000000000000246 R12: 0000200000012500
R13: 00007ffcd8913a10 R14: 00000000000125d8 R15: 00002000000022c0
 </TASK>
INFO: task gfs2_quotad:4530 blocked for more than 147 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:gfs2_quotad     state:D stack:28240 pid:4530  ppid:2      flags:0x00024000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x10ec/0x40b0 kernel/sched/core.c:6561
 schedule+0xb9/0x180 kernel/sched/core.c:6637
 bit_wait+0xd/0xc0 kernel/sched/wait_bit.c:199
 __wait_on_bit+0xa8/0x2d0 kernel/sched/wait_bit.c:49
 out_of_line_wait_on_bit+0x11f/0x160 kernel/sched/wait_bit.c:64
 wait_on_bit include/linux/wait_bit.h:76 [inline]
 __gfs2_glock_dq+0x6b1/0xa20 fs/gfs2/glock.c:1646
 gfs2_glock_dq+0x1a8/0x1c0 fs/gfs2/glock.c:1718
 gfs2_glock_dq_uninit+0x24/0xe0 fs/gfs2/glock.c:1738
 gfs2_statfs_sync+0x6fe/0x780 fs/gfs2/super.c:310
 quotad_check_timeo fs/gfs2/quota.c:1519 [inline]
 gfs2_quotad+0x380/0x670 fs/gfs2/quota.c:1561
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Showing all locks held in the system:
3 locks held by kworker/u4:1/11:
 #0: ffff888017479138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #1: ffffc90000107d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #2: ffffffff8db3b3a8 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xa/0x50 net/core/link_watch.c:263
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8c92bab0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x33/0xf00 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8c92c2d0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x33/0xf00 kernel/rcu/tasks.h:517
1 lock held by khungtaskd/28:
 #0: ffffffff8c92b120 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8c92b120 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8c92b120 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6513
2 locks held by kworker/u4:3/52:
 #0: ffff888017479138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #1: ffffc90000bd7d00 ((reaper_work).work){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
2 locks held by kworker/u4:4/62:
 #0: ffff8880b8f3aad8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
 #1: ffff8880b8f27848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x398/0x6d0 kernel/sched/psi.c:999
3 locks held by kworker/0:2/126:
 #0: ffff888017470938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #1: ffffc90002df7d00 (deferred_process_work){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #2: ffffffff8db3b3a8 (rtnl_mutex){+.+.}-{3:3}, at: switchdev_deferred_process_work+0xa/0x20 net/switchdev/switchdev.c:104
1 lock held by dhcpcd/3933:
 #0: ffffffff8db3b3a8 (rtnl_mutex){+.+.}-{3:3}, at: devinet_ioctl+0x288/0x1af0 net/ipv4/devinet.c:1080
2 locks held by getty/4029:
 #0: ffff88814cb7f098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc9000327b2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x41b/0x1380 drivers/tty/n_tty.c:2198
3 locks held by kworker/0:6/4333:
2 locks held by kworker/1:12/4373:
 #0: ffff888017472138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #1: ffffc90003347d00 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
2 locks held by udevd/4429:
 #0: ffff88801788d420 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:768 [inline]
 #0: ffff88801788d420 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: blkdev_read_iter+0x41d/0x570 block/fops.c:667
 #1: ffff88801788d5c0 (mapping.invalidate_lock){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:813 [inline]
 #1: ffff88801788d5c0 (mapping.invalidate_lock){++++}-{3:3}, at: page_cache_ra_unbounded+0xd8/0x770 mm/readahead.c:226

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/01 13:11 linux-6.1.y 50cbba13faa2 d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/01/23 10:50 linux-6.1.y f4f677285b38 a44b0418 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/01/23 14:55 linux-6.1.y f4f677285b38 a44b0418 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/01/23 12:52 linux-6.1.y f4f677285b38 a44b0418 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2026/01/01 09:12 linux-6.1.y 50cbba13faa2 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/12/01 07:44 linux-6.1.y f6e38ae624cf d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/11/07 07:41 linux-6.1.y f6e38ae624cf 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/09/20 05:41 linux-6.1.y 363a599da6d9 67c37560 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/07/02 02:29 linux-6.1.y 7e69c33e4858 091a06cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/05/06 12:10 linux-6.1.y ac7079a42ea5 ae98e6b9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/05/06 12:06 linux-6.1.y ac7079a42ea5 ae98e6b9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/04/26 18:26 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
2025/01/22 02:00 linux-6.1.y f4f677285b38 da72ac06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in gfs2_withdraw
* Struck through repros no longer work on HEAD.