syzbot


INFO: task hung in btrfs_page_mkwrite

Status: auto-obsoleted due to no activity on 2023/09/26 02:15
Reported-by: syzbot+a5a0956b72fa605f4763@syzkaller.appspotmail.com
First crash: 541d, last: 541d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in btrfs_page_mkwrite (3) 1 1d03h 1d03h 0/3 upstream: reported on 2024/12/09 07:52
linux-6.1 INFO: task hung in btrfs_page_mkwrite 8 128d 208d 0/3 auto-obsoleted due to no activity on 2024/11/11 21:53
upstream INFO: task hung in btrfs_page_mkwrite btrfs 49 294d 433d 0/28 auto-obsoleted due to no activity on 2024/05/29 11:09
linux-5.15 INFO: task hung in btrfs_page_mkwrite (2) 4 157d 208d 0/3 auto-obsoleted due to no activity on 2024/10/14 01:09

Sample crash report:
INFO: task syz-executor.2:4364 blocked for more than 143 seconds.
      Not tainted 5.15.117-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:    0 pid: 4364 ppid:  4017 flags:0x00000001
Call trace:
 __switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0xf10/0x1e38 kernel/sched/core.c:6372
 schedule+0x11c/0x1c8 kernel/sched/core.c:6455
 io_schedule+0x8c/0x194 kernel/sched/core.c:8472
 wait_on_page_bit_common+0x6fc/0xc14 mm/filemap.c:1356
 __lock_page+0x8c/0xa8 mm/filemap.c:1648
 lock_page include/linux/pagemap.h:625 [inline]
 btrfs_page_mkwrite+0x5e8/0xde8 fs/btrfs/inode.c:8888
 do_page_mkwrite+0x144/0x37c mm/memory.c:2883
 wp_page_shared+0x14c/0x398 mm/memory.c:3216
 do_wp_page+0x7cc/0x9c4 mm/memory.c:3317
 handle_pte_fault mm/memory.c:4626 [inline]
 __handle_mm_fault mm/memory.c:4743 [inline]
 handle_mm_fault+0x1ce4/0x33c4 mm/memory.c:4841
 __do_page_fault arch/arm64/mm/fault.c:505 [inline]
 do_page_fault+0x700/0xb60 arch/arm64/mm/fault.c:605
 do_mem_abort+0x70/0x1d8 arch/arm64/mm/fault.c:819
 el0_da+0x94/0x20c arch/arm64/kernel/entry-common.c:482
 el0t_64_sync_handler+0xc0/0xe4 arch/arm64/kernel/entry-common.c:617
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor.2:4435 blocked for more than 143 seconds.
      Not tainted 5.15.117-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:    0 pid: 4435 ppid:  4017 flags:0x00000009
Call trace:
 __switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0xf10/0x1e38 kernel/sched/core.c:6372
 schedule+0x11c/0x1c8 kernel/sched/core.c:6455
 wait_on_state fs/btrfs/extent_io.c:868 [inline]
 wait_extent_bit+0x3e4/0x52c fs/btrfs/extent_io.c:906
 lock_extent_bits+0x100/0x1d4 fs/btrfs/extent_io.c:1469
 btrfs_page_mkwrite+0x66c/0xde8 fs/btrfs/inode.c:8898
 do_page_mkwrite+0x144/0x37c mm/memory.c:2883
 wp_page_shared+0x14c/0x398 mm/memory.c:3216
 do_wp_page+0x7cc/0x9c4 mm/memory.c:3317
 handle_pte_fault mm/memory.c:4626 [inline]
 __handle_mm_fault mm/memory.c:4743 [inline]
 handle_mm_fault+0x1ce4/0x33c4 mm/memory.c:4841
 __do_page_fault arch/arm64/mm/fault.c:505 [inline]
 do_page_fault+0x700/0xb60 arch/arm64/mm/fault.c:605
 do_mem_abort+0x70/0x1d8 arch/arm64/mm/fault.c:819
 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:358
 el1h_64_sync_handler+0x5c/0x98 arch/arm64/kernel/entry-common.c:409
 el1h_64_sync+0x78/0x7c arch/arm64/kernel/entry.S:579
 __arch_copy_to_user+0x88/0x218 arch/arm64/lib/copy_template.S:90
 emit_fiemap_extent fs/btrfs/extent_io.c:5460 [inline]
 extent_fiemap+0xd84/0x10d4 fs/btrfs/extent_io.c:5686
 btrfs_fiemap+0x100/0x150 fs/btrfs/inode.c:8521
 ioctl_fiemap fs/ioctl.c:219 [inline]
 do_vfs_ioctl+0x1bcc/0x2a38 fs/ioctl.c:814
 __do_sys_ioctl fs/ioctl.c:872 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __arm64_sys_ioctl+0xe4/0x1c8 fs/ioctl.c:860
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffff800014ac19a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:268
2 locks held by getty/3727:
 #0: ffff0000d30c6098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
 #1: ffff80001a29e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1200 drivers/tty/n_tty.c:2147
3 locks held by syz-executor.2/4364:
 #0: ffff0000c0ec5d18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline]
 #0: ffff0000c0ec5d18 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x380/0xb60 arch/arm64/mm/fault.c:586
 #1: ffff0000cffae558 (sb_pagefaults#2){.+.+}-{0:0}, at: do_page_mkwrite+0x144/0x37c mm/memory.c:2883
 #2: ffff0000df1e5318 (&ei->i_mmap_lock){.+.+}-{3:3}, at: btrfs_page_mkwrite+0x530/0xde8 fs/btrfs/inode.c:8887
3 locks held by syz-executor.2/4435:
 #0: ffff0000c0ec5d18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline]
 #0: ffff0000c0ec5d18 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x380/0xb60 arch/arm64/mm/fault.c:586
 #1: ffff0000cffae558 (sb_pagefaults#2){.+.+}-{0:0}, at: do_page_mkwrite+0x144/0x37c mm/memory.c:2883
 #2: ffff0000df1e5318 (&ei->i_mmap_lock){.+.+}-{3:3}, at: btrfs_page_mkwrite+0x530/0xde8 fs/btrfs/inode.c:8887
3 locks held by kworker/u4:9/4545:
2 locks held by kworker/u4:11/4547:
 #0: ffff0000c0029138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2280
 #1: ffff80001d477c00 ((work_completion)(&sub_info->work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2282
3 locks held by kworker/u4:12/4811:
1 lock held by syz-executor.4/6754:
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x66c/0xb60 arch/arm64/mm/fault.c:590
1 lock held by syz-executor.4/6759:
 #0: ffff800014ac5f28 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #0: ffff800014ac5f28 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x320/0x660 kernel/rcu/tree_exp.h:842
1 lock held by syz-executor.4/6764:
1 lock held by syz-executor.4/6804:
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x66c/0xb60 arch/arm64/mm/fault.c:590
1 lock held by syz-executor.4/6807:
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x66c/0xb60 arch/arm64/mm/fault.c:590
1 lock held by syz-executor.4/6810:
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x66c/0xb60 arch/arm64/mm/fault.c:590
1 lock held by syz-executor.4/6811:
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 #0: ffff0000d2f634d8 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x66c/0xb60 arch/arm64/mm/fault.c:590
1 lock held by syz-executor.3/6765:
 #0: ffff0000cbc9a468 (&lo->lo_mutex){+.+.}-{3:3}, at: __loop_clr_fd+0xa8/0x9b8 drivers/block/loop.c:1365
1 lock held by udevadm/6806:

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


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/18 02:14 linux-5.15.y 471e639e59d1 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in btrfs_page_mkwrite
* Struck through repros no longer work on HEAD.