syzbot


INFO: task hung in writepage_delalloc (2)

Status: auto-obsoleted due to no activity on 2024/01/30 19:55
Subsystems: btrfs
[Documentation on labels]
First crash: 367d, last: 367d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in writepage_delalloc (2) 1 403d 403d 0/3 auto-obsoleted due to no activity on 2024/01/04 22:50
upstream INFO: task hung in writepage_delalloc btrfs 1 462d 462d 0/28 auto-obsoleted due to no activity on 2023/09/28 02:46
linux-5.15 INFO: task hung in writepage_delalloc 1 593d 593d 0/3 auto-obsoleted due to no activity on 2023/07/19 03:54

Sample crash report:
INFO: task kworker/u4:3:22850 blocked for more than 143 seconds.
      Not tainted 6.6.0-syzkaller-06824-g8bc9e6515183 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:3    state:D stack:22136 pid:22850 tgid:22850 ppid:2      flags:0x00004000
Workqueue: writeback wb_workfn (flush-btrfs-2812)
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5376 [inline]
 __schedule+0x1960/0x4a80 kernel/sched/core.c:6688
 __schedule_loop kernel/sched/core.c:6763 [inline]
 schedule+0x149/0x260 kernel/sched/core.c:6778
 io_schedule+0x8c/0x100 kernel/sched/core.c:8998
 folio_wait_bit_common+0x881/0x12a0 mm/filemap.c:1301
 btrfs_page_start_writer_lock+0x71/0x2f0 fs/btrfs/subpage.c:344
 lock_delalloc_pages+0x2d8/0x870 fs/btrfs/extent_io.c:280
 find_lock_delalloc_range+0x44d/0x970 fs/btrfs/extent_io.c:373
 writepage_delalloc+0x17f/0x470 fs/btrfs/extent_io.c:1178
 __extent_writepage fs/btrfs/extent_io.c:1435 [inline]
 extent_write_cache_pages fs/btrfs/extent_io.c:2103 [inline]
 extent_writepages+0x144b/0x2e50 fs/btrfs/extent_io.c:2225
 do_writepages+0x3a6/0x670 mm/page-writeback.c:2553
 __writeback_single_inode+0x155/0xfa0 fs/fs-writeback.c:1625
 writeback_sb_inodes+0x8e3/0x1210 fs/fs-writeback.c:1916
 __writeback_inodes_wb+0x11b/0x260 fs/fs-writeback.c:1987
 wb_writeback+0x461/0xc60 fs/fs-writeback.c:2094
 wb_check_background_flush fs/fs-writeback.c:2164 [inline]
 wb_do_writeback fs/fs-writeback.c:2252 [inline]
 wb_workfn+0xc6f/0xff0 fs/fs-writeback.c:2279
 process_one_work kernel/workqueue.c:2630 [inline]
 process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703
 worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784
 kthread+0x2d3/0x370 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
INFO: task syz-executor.4:21961 blocked for more than 144 seconds.
      Not tainted 6.6.0-syzkaller-06824-g8bc9e6515183 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:23544 pid:21961 tgid:21888 ppid:5094   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5376 [inline]
 __schedule+0x1960/0x4a80 kernel/sched/core.c:6688
 __schedule_loop kernel/sched/core.c:6763 [inline]
 schedule+0x149/0x260 kernel/sched/core.c:6778
 wait_extent_bit fs/btrfs/extent-io-tree.c:799 [inline]
 lock_extent+0x69d/0x850 fs/btrfs/extent-io-tree.c:1843
 btrfs_page_mkwrite+0x5bd/0xd10 fs/btrfs/inode.c:8151
 do_page_mkwrite+0x197/0x470 mm/memory.c:2934
 wp_page_shared mm/memory.c:3294 [inline]
 do_wp_page+0xf87/0x4190 mm/memory.c:3379
 handle_pte_fault mm/memory.c:4997 [inline]
 __handle_mm_fault mm/memory.c:5122 [inline]
 handle_mm_fault+0x1b45/0x62b0 mm/memory.c:5287
 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline]
 handle_page_fault arch/x86/mm/fault.c:1505 [inline]
 exc_page_fault+0x2ac/0x860 arch/x86/mm/fault.c:1561
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0010:rep_movs_alternative+0x33/0x70 arch/x86/lib/copy_user_64.S:58
Code: 40 83 f9 08 73 21 85 c9 74 0f 8a 06 88 07 48 ff c7 48 ff c6 48 ff c9 75 f1 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 8b 06 <48> 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 df 83 f9 08 73 e8 eb
RSP: 0018:ffffc90016217550 EFLAGS: 00050206
RAX: 0000000000000000 RBX: 0000000020002398 RCX: 0000000000000038
RDX: 0000000000000000 RSI: ffffc90016217600 RDI: 0000000020002360
RBP: ffffc900162176b0 R08: ffffc90016217637 R09: 1ffff92002c42ec6
R10: dffffc0000000000 R11: fffff52002c42ec7 R12: 0000000000000038
R13: ffffc90016217600 R14: 0000000020002360 R15: ffffc90016217600
 copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:133 [inline]
 _copy_to_user+0x86/0xa0 lib/usercopy.c:41
 copy_to_user include/linux/uaccess.h:191 [inline]
 fiemap_fill_next_extent+0x235/0x410 fs/ioctl.c:145
 emit_last_fiemap_cache fs/btrfs/extent_io.c:2505 [inline]
 extent_fiemap+0x1b9c/0x1fe0 fs/btrfs/extent_io.c:3032
 btrfs_fiemap+0x178/0x1e0 fs/btrfs/inode.c:7823
 ioctl_fiemap fs/ioctl.c:220 [inline]
 do_vfs_ioctl+0x19ea/0x2b40 fs/ioctl.c:811
 __do_sys_ioctl fs/ioctl.c:869 [inline]
 __se_sys_ioctl+0x81/0x170 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f585fa7cae9
RSP: 002b:00007f585e5dd0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f585fb9c120 RCX: 00007f585fa7cae9
RDX: 0000000020002340 RSI: 00000000c020660b RDI: 0000000000000005
RBP: 00007f585fac847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f585fb9c120 R15: 00007ffe4a4e2f48
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/29:
 #0: ffffffff8d72d4a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline]
 #0: ffffffff8d72d4a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
 #0: ffffffff8d72d4a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6613
2 locks held by getty/4797:
 #0: ffff88802aa7a0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b1/0x1dc0 drivers/tty/n_tty.c:2206
1 lock held by syz-executor.3/5075:
 #0: ffff88801af960e0 (&type->s_umount_key#62){++++}-{3:3}, at: __super_lock fs/super.c:56 [inline]
 #0: ffff88801af960e0 (&type->s_umount_key#62){++++}-{3:3}, at: __super_lock_excl fs/super.c:71 [inline]
 #0: ffff88801af960e0 (&type->s_umount_key#62){++++}-{3:3}, at: deactivate_super+0xad/0xf0 fs/super.c:513
1 lock held by syz-executor.2/5099:
 #0: ffffffff8d732e78 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:325 [inline]
 #0: ffffffff8d732e78 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x46c/0x890 kernel/rcu/tree_exp.h:996
2 locks held by kworker/1:4/5133:
 #0: ffff888012c72938 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline]
 #0: ffff888012c72938 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703
 #1: ffffc90004867d20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline]
 #1: ffffc90004867d20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703
3 locks held by kworker/u4:3/22850:
 #0: ffff88801926dd38 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline]
 #0: ffff88801926dd38 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703
 #1: ffffc90016347d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline]
 #1: ffffc90016347d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703
 #2: ffff8880357c20e0 (&type->s_umount_key#62){++++}-{3:3}, at: super_trylock_shared+0x22/0xf0 fs/super.c:607
4 locks held by syz-executor.4/21961:
 #0: ffff888031faf4e8 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:812 [inline]
 #0: ffff888031faf4e8 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: btrfs_inode_lock+0x60/0xd0 fs/btrfs/inode.c:370
 #1: ffff8880173bb120 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline]
 #1: ffff8880173bb120 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5314 [inline]
 #1: ffff8880173bb120 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x32/0x2d0 mm/memory.c:5374
 #2: ffff8880357c2510 (sb_pagefaults#3){.+.+}-{0:0}, at: do_page_mkwrite+0x197/0x470 mm/memory.c:2934
 #3: ffff888031faf370 (&ei->i_mmap_lock){++++}-{3:3}, at: btrfs_page_mkwrite+0x49c/0xd10 fs/btrfs/inode.c:8140
1 lock held by udevd/21999:
 #0: ffff88814894b740 (mapping.invalidate_lock#2){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:857 [inline]
 #0: ffff88814894b740 (mapping.invalidate_lock#2){.+.+}-{3:3}, at: page_cache_ra_unbounded+0xf1/0x7c0 mm/readahead.c:225
2 locks held by kworker/0:4/22078:

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

NMI backtrace for cpu 1
CPU: 1 PID: 29 Comm: khungtaskd Not tainted 6.6.0-syzkaller-06824-g8bc9e6515183 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x498/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x310 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xfa9/0xff0 kernel/hung_task.c:379
 kthread+0x2d3/0x370 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 5135 Comm: kworker/0:6 Not tainted 6.6.0-syzkaller-06824-g8bc9e6515183 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Workqueue: events kfree_rcu_work
RIP: 0010:__debug_check_no_obj_freed lib/debugobjects.c:1024 [inline]
RIP: 0010:debug_check_no_obj_freed+0x199/0x420 lib/debugobjects.c:1063
Code: 18 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 48 89 df e8 f1 f0 62 fd 4c 8b 2b 4c 3b 6c 24 50 72 96 <4d> 39 ec 76 91 48 8d 5d 10 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00
RSP: 0018:ffffc90004887960 EFLAGS: 00000002
RAX: 1ffff11005b5e7df RBX: ffff88802daf3ef8 RCX: dffffc0000000000
RDX: dffffc0000000000 RSI: 0000000000000004 RDI: ffffc90004887840
RBP: ffff88802daf3ee0 R08: 0000000000000003 R09: fffff52000910f08
R10: dffffc0000000000 R11: fffff52000910f08 R12: ffff88803f85b0e0
R13: ffff88803f85b900 R14: 1ffff11005b5e7dc R15: 0000000000000003
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b91505ca08 CR3: 000000007a4a1000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 slab_free_hook mm/slub.c:1775 [inline]
 slab_free_freelist_hook mm/slub.c:1826 [inline]
 slab_free mm/slub.c:3809 [inline]
 kmem_cache_free_bulk+0x4dd/0x770 mm/slub.c:3927
 kfree_bulk include/linux/slab.h:517 [inline]
 kvfree_rcu_bulk+0x240/0x4b0 kernel/rcu/tree.c:2976
 kfree_rcu_work+0x447/0x500 kernel/rcu/tree.c:3055
 process_one_work kernel/workqueue.c:2630 [inline]
 process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703
 worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784
 kthread+0x2d3/0x370 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/01 19:53 upstream 8bc9e6515183 69904c9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in writepage_delalloc
* Struck through repros no longer work on HEAD.