syzbot


INFO: task hung in lock_extent_bits

Status: upstream: reported C repro on 2023/03/30 19:10
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+d359f673fb66296c98be@syzkaller.appspotmail.com
First crash: 565d, last: 4d22h
Fix commit to backport (bisect log) :
tree: upstream
commit a1912f712188291f9d7d434fba155461f1ebef66
Author: Josef Bacik <josef@toxicpanda.com>
Date: Wed Nov 22 17:17:55 2023 +0000

  btrfs: remove code for inode_cache and recovery mount options

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: INFO: task hung in lock_extent_bits (log)
Repro: C syz .config
  
Bug presence (3)
Date Name Commit Repro Result
2024/01/16 linux-5.15.y (ToT) ddcaf4999061 C [report] INFO: task hung in lock_extent_bits
2023/06/04 upstream (ToT) e5282a7d8f6b C [report] INFO: task hung in lock_extent
2024/01/16 upstream (ToT) 052d534373b7 C Didn't crash
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2024/03/26 07:49 8h20m fix candidate upstream OK (1) job log
2024/02/24 11:17 1h38m bisect fix linux-5.15.y OK (0) job log log
2023/12/25 05:58 1h28m bisect fix linux-5.15.y OK (0) job log log
2023/11/23 12:25 1h12m bisect fix linux-5.15.y OK (0) job log log
2023/10/22 11:21 1h15m bisect fix linux-5.15.y OK (0) job log log
2023/09/21 08:43 1h24m bisect fix linux-5.15.y OK (0) job log log
2023/07/08 03:33 1h43m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
INFO: task syz-executor371:3581 blocked for more than 143 seconds.
      Not tainted 5.15.167-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor371 state:D stack:22784 pid: 3581 ppid:  3580 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 wait_on_state fs/btrfs/extent_io.c:868 [inline]
 wait_extent_bit+0x3f9/0x530 fs/btrfs/extent_io.c:906
 lock_extent_bits+0x10d/0x1e0 fs/btrfs/extent_io.c:1469
 btrfs_page_mkwrite+0x5f2/0xd60 fs/btrfs/inode.c:8960
 do_page_mkwrite+0x1a9/0x440 mm/memory.c:2892
 wp_page_shared+0x179/0x690 mm/memory.c:3229
 handle_pte_fault mm/memory.c:4638 [inline]
 __handle_mm_fault mm/memory.c:4755 [inline]
 handle_mm_fault+0x2a3d/0x5960 mm/memory.c:4853
 do_user_addr_fault arch/x86/mm/fault.c:1357 [inline]
 handle_page_fault arch/x86/mm/fault.c:1445 [inline]
 exc_page_fault+0x271/0x700 arch/x86/mm/fault.c:1501
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568
RIP: 0010:copy_user_generic_unrolled+0x89/0xc0 arch/x86/lib/copy_user_64.S:92
Code: 38 4c 89 47 20 4c 89 4f 28 4c 89 57 30 4c 89 5f 38 48 8d 76 40 48 8d 7f 40 ff c9 75 b6 89 d1 83 e2 07 c1 e9 03 74 12 4c 8b 06 <4c> 89 07 48 8d 76 08 48 8d 7f 08 ff c9 75 ee 21 d2 74 10 89 d1 8a
RSP: 0018:ffffc900031e7668 EFLAGS: 00050202
RAX: ffffffff84096e01 RBX: 0000000020005918 RCX: 0000000000000007
RDX: 0000000000000000 RSI: ffffc900031e7720 RDI: 00000000200058e0
RBP: ffffc900031e77d0 R08: 0000000000000000 R09: fffff5200063ceeb
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000038
R13: 00007ffffffff000 R14: ffffc900031e7720 R15: 00000000200058e0
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
 _copy_to_user+0xef/0x130 lib/usercopy.c:40
 copy_to_user include/linux/uaccess.h:200 [inline]
 fiemap_fill_next_extent+0x231/0x410 fs/ioctl.c:144
 emit_fiemap_extent fs/btrfs/extent_io.c:5448 [inline]
 extent_fiemap+0x1185/0x1650 fs/btrfs/extent_io.c:5687
 btrfs_fiemap+0x121/0x160 fs/btrfs/inode.c:8583
 ioctl_fiemap fs/ioctl.c:219 [inline]
 do_vfs_ioctl+0x1934/0x2b70 fs/ioctl.c:814
 __do_sys_ioctl fs/ioctl.c:872 [inline]
 __se_sys_ioctl+0x81/0x160 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fea07c51f99
RSP: 002b:00007ffc7a1bd2b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 70735f6473736f6e RCX: 00007fea07c51f99
RDX: 00000000200058c0 RSI: 00000000c020660b RDI: 0000000000000004
RBP: 00007fea07ccb5f0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc7a1bd2f0
R13: 00007ffc7a1bd518 R14: 431bde82d7b634db R15: 00007fea07c9b03b
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fc60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3322:
 #0: ffff88814b7f7098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000228e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
3 locks held by syz-executor371/3581:
 #0: ffff88801a7d4728 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline]
 #0: ffff88801a7d4728 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1298 [inline]
 #0: ffff88801a7d4728 (&mm->mmap_lock){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1445 [inline]
 #0: ffff88801a7d4728 (&mm->mmap_lock){++++}-{3:3}, at: exc_page_fault+0x181/0x700 arch/x86/mm/fault.c:1501
 #1: ffff888020152558 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x1a9/0x440 mm/memory.c:2892
 #2: ffff88806ff88e68 (&ei->i_mmap_lock){++++}-{3:3}, at: btrfs_page_mkwrite+0x4a2/0xd60 fs/btrfs/inode.c:8949

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.167-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:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:108 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:562

Crashes (42):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/29 03:51 linux-5.15.y 3a5928702e71 ba29ff75 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2023/06/04 05:15 linux-5.15.y 0ab06468cbd1 a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/10/11 00:54 linux-5.15.y 3a5928702e71 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/10/09 16:57 linux-5.15.y 3a5928702e71 56fb2cb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/10/07 13:08 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/10/07 05:24 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/10/01 15:12 linux-5.15.y 3a5928702e71 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/09/30 04:49 linux-5.15.y 3a5928702e71 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/09/28 13:09 linux-5.15.y 3a5928702e71 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/09/28 13:09 linux-5.15.y 3a5928702e71 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/09/28 05:37 linux-5.15.y 3a5928702e71 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/07/09 00:07 linux-5.15.y f45bea23c39c cde64f7d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/07/07 12:02 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/06/06 03:00 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/06/06 03:00 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/06/05 00:09 linux-5.15.y c61bd26ae81a e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/06/05 00:09 linux-5.15.y c61bd26ae81a e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/06/04 13:33 linux-5.15.y c61bd26ae81a 11f2afa5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/06/04 09:35 linux-5.15.y c61bd26ae81a a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/06/01 12:52 linux-5.15.y c61bd26ae81a 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/05/26 20:36 linux-5.15.y c61bd26ae81a a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/05/20 13:12 linux-5.15.y 83655231580b c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/05/18 07:26 linux-5.15.y 83655231580b c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/19 18:34 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/19 18:34 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/14 00:58 linux-5.15.y fa3df276cd36 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/12 22:45 linux-5.15.y cdfd0a7f0139 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/12 22:45 linux-5.15.y cdfd0a7f0139 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/11 19:45 linux-5.15.y cdfd0a7f0139 95ed9ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/05 05:33 linux-5.15.y 9465fef4ae35 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/04/05 05:33 linux-5.15.y 9465fef4ae35 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/03/27 20:42 linux-5.15.y 9465fef4ae35 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/03/12 14:57 linux-5.15.y 574362648507 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/03/12 13:53 linux-5.15.y 574362648507 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/03/12 13:23 linux-5.15.y 574362648507 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/03/09 21:45 linux-5.15.y 574362648507 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/03/09 04:13 linux-5.15.y 574362648507 8e75c913 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2024/05/15 15:59 linux-5.15.y 284087d4f7d5 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in lock_extent_bits
2024/03/12 13:36 linux-5.15.y 574362648507 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in lock_extent_bits
2023/03/30 19:09 linux-5.15.y c957cbb87315 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_extent_bits
2023/06/03 16:20 linux-5.15.y 0ab06468cbd1 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in lock_extent_bits
* Struck through repros no longer work on HEAD.