syzbot


INFO: task hung in lock_extent

Status: upstream: reported C repro on 2023/01/28 07:38
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+eaa05fbc7563874b7ad2@syzkaller.appspotmail.com
First crash: 490d, last: 37d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit b0ad381fa7690244802aed119b478b4bdafc31dd
Author: Josef Bacik <josef@toxicpanda.com>
Date: Mon Feb 12 16:56:02 2024 +0000

  btrfs: fix deadlock with fiemap and extent locking

  
Discussions (9)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] INFO: task hung in lock_extent 0 (2) 2024/04/14 08:41
[syzbot] Monthly btrfs report (Mar 2024) 0 (1) 2024/03/12 09:29
[syzbot] Monthly btrfs report (Feb 2024) 2 (3) 2024/02/12 12:15
[syzbot] Monthly btrfs report (Jan 2024) 0 (1) 2024/01/10 09:16
[syzbot] Monthly btrfs report (Dec 2023) 0 (1) 2023/12/06 10:05
[syzbot] Monthly btrfs report (Nov 2023) 0 (1) 2023/11/05 13:07
[syzbot] Monthly btrfs report (Oct 2023) 0 (1) 2023/10/04 14:48
[syzbot] Monthly btrfs report (Aug 2023) 0 (1) 2023/08/30 09:53
[syzbot] [btrfs] Monthly Report 1 (2) 2023/03/27 13:42
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in lock_extent origin:lts-only C done 11 5d00h 346d 0/3 upstream: reported C repro on 2023/05/08 17:01
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/03/03 00:48 1h13m retest repro upstream OK log
2024/03/02 22:19 46m retest repro upstream OK log
2024/03/02 22:19 1h02m retest repro upstream OK log
2024/03/02 22:19 58m retest repro upstream OK log
2024/03/02 22:19 23m retest repro upstream OK log
2024/03/02 22:19 28m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/03/02 19:09 19m retest repro upstream OK log
2024/03/02 19:42 21m retest repro linux-next error OK
2024/03/02 19:09 19m retest repro upstream OK log
2024/03/02 19:42 22m retest repro linux-next error OK

Sample crash report:
INFO: task syz-executor322:5034 blocked for more than 143 seconds.
      Not tainted 6.5.0-rc3-next-20230728-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor322 state:D stack:25920 pid:5034  ppid:5033   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0xee1/0x59f0 kernel/sched/core.c:6711
 schedule+0xe7/0x1b0 kernel/sched/core.c:6787
 wait_on_state fs/btrfs/extent-io-tree.c:719 [inline]
 wait_extent_bit+0x578/0x670 fs/btrfs/extent-io-tree.c:763
 lock_extent+0x104/0x190 fs/btrfs/extent-io-tree.c:1755
 btrfs_page_mkwrite+0x653/0x11e0 fs/btrfs/inode.c:8053
 do_page_mkwrite+0x17a/0x380 mm/memory.c:3080
 wp_page_shared mm/memory.c:3440 [inline]
 do_wp_page+0xd04/0x3550 mm/memory.c:3525
 handle_pte_fault mm/memory.c:5152 [inline]
 __handle_mm_fault+0x1704/0x4030 mm/memory.c:5276
 handle_mm_fault+0x47a/0xa00 mm/memory.c:5441
 do_user_addr_fault+0x3ad/0xfe0 arch/x86/mm/fault.c:1391
 handle_page_fault arch/x86/mm/fault.c:1483 [inline]
 exc_page_fault+0x5c/0xd0 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0010:rep_movs_alternative+0x33/0xb0 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 66 2e 0f 1f 84 00 00 00 00 00 66 90 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:ffffc90003a0f8d8 EFLAGS: 00050206
RAX: 0000000000000000 RBX: 0000000000000038 RCX: 0000000000000038
RDX: fffff52000741f32 RSI: ffffc90003a0f958 RDI: 00000000200000e0
RBP: 00000000200000e0 R08: 0000000000000000 R09: fffff52000741f31
R10: ffffc90003a0f98f R11: ffffffff81dbaca5 R12: ffffc90003a0f958
R13: 0000000020000118 R14: 0000000000000000 R15: 0000000000000000
 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 lib/usercopy.c:41 [inline]
 _copy_to_user+0xa8/0xb0 lib/usercopy.c:34
 copy_to_user include/linux/uaccess.h:191 [inline]
 fiemap_fill_next_extent+0x232/0x380 fs/ioctl.c:144
 emit_last_fiemap_cache fs/btrfs/extent_io.c:2532 [inline]
 extent_fiemap+0x13e0/0x19f0 fs/btrfs/extent_io.c:3059
 btrfs_fiemap+0xe4/0x160 fs/btrfs/inode.c:7725
 ioctl_fiemap fs/ioctl.c:219 [inline]
 do_vfs_ioctl+0x339/0x1920 fs/ioctl.c:810
 __do_sys_ioctl fs/ioctl.c:868 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x112/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f2672873b19
RSP: 002b:00007ffe11deffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000020000080 RCX: 00007f2672873b19
RDX: 00000000200000c0 RSI: 00000000c020660b RDI: 0000000000000004
RBP: 00007f26728eb5f0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe11df0020
R13: 00007ffe11df0248 R14: 431bde82d7b634db R15: 00007f26728bc03b
 </TASK>
INFO: lockdep is turned off.
NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.5.0-rc3-next-20230728-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x277/0x380 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x2ac/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+0xfab/0x1230 kernel/hung_task.c:379
 kthread+0x33a/0x430 kernel/kthread.c:389
 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 57 Comm: kworker/u4:4 Not tainted 6.5.0-rc3-next-20230728-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:memcpy_orig+0x11e/0x120 arch/x86/lib/memcpy_64.S:170
Code: 66 66 2e 0f 1f 84 00 00 00 00 00 90 83 ea 01 72 19 0f b6 0e 74 12 4c 0f b6 46 01 4c 0f b6 0c 16 44 88 47 01 44 88 0c 17 88 0f <c3> 90 f3 0f 1e fa 48 89 f8 48 39 fe 7d 0f 49 89 f0 49 01 d0 49 39
RSP: 0018:ffffc900015979b8 EFLAGS: 00000046
RAX: 00002aaaaaaab757 RBX: ffff888012867558 RCX: 000000000000000f
RDX: 0000000000000000 RSI: ffffc90001597b18 RDI: 00002aaaaaaab757
RBP: ffffffff81db8757 R08: 0000000000000000 R09: ffffed100250d0f0
R10: ffff888012868783 R11: 0000000000000000 R12: ffffffff8eac97d4
R13: 0000000000000757 R14: 0000000000000758 R15: ffffffff8cb157c0
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564eb4987068 CR3: 0000000012863000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 __text_poke+0x303/0x8f0 arch/x86/kernel/alternative.c:1839
 text_poke arch/x86/kernel/alternative.c:1900 [inline]
 text_poke_bp_batch+0x507/0x780 arch/x86/kernel/alternative.c:2289
 text_poke_flush arch/x86/kernel/alternative.c:2402 [inline]
 text_poke_flush arch/x86/kernel/alternative.c:2399 [inline]
 text_poke_finish+0x1a/0x30 arch/x86/kernel/alternative.c:2409
 arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:146
 jump_label_update+0x32e/0x410 kernel/jump_label.c:829
 static_key_disable_cpuslocked+0x154/0x1b0 kernel/jump_label.c:235
 static_key_disable+0x1a/0x20 kernel/jump_label.c:243
 toggle_allocation_gate mm/kfence/core.c:834 [inline]
 toggle_allocation_gate+0x13f/0x250 mm/kfence/core.c:821
 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2603
 worker_thread+0x687/0x1110 kernel/workqueue.c:2754
 kthread+0x33a/0x430 kernel/kthread.c:389
 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.271 msecs

Crashes (262):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/28 18:19 linux-next d7b3af5a77e8 92476829 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root INFO: task hung in lock_extent
2023/05/23 08:20 linux-next 715abedee4cd 4bce1a3e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root INFO: task hung in lock_extent
2024/02/11 20:21 upstream 7521f258ea30 77b23aa1 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/12 00:13 upstream a39b6ac3781d 28b24332 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root INFO: task hung in lock_extent
2023/10/18 14:05 upstream 06dc10eae55b 342b9c55 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root INFO: task hung in lock_extent
2023/10/17 21:40 upstream 213f891525c2 342b9c55 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root INFO: task hung in lock_extent
2023/09/24 12:56 upstream 3aba70aed91f 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root INFO: task hung in lock_extent
2023/05/08 17:03 upstream ac9a78681b92 90c93c40 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/07 12:58 upstream fc4354c6e5c2 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root INFO: task hung in lock_extent
2023/03/28 08:04 upstream 91fe204578ba 47f3aaf1 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root INFO: task hung in lock_extent
2023/02/05 09:24 upstream db27c22251e7 be607b78 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in lock_extent
2023/01/24 07:24 upstream 7bf70dbb1882 9dfcf09c .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/08 15:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 INFO: task hung in lock_extent
2023/10/03 18:59 upstream ce36c8b14987 65faba36 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root INFO: task hung in lock_extent
2024/03/12 13:12 upstream 855684c7d938 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/03/06 23:18 upstream 5847c9777c30 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/17 18:21 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/16 20:18 upstream 0f1dd5e91e2b 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/16 06:54 upstream 4f5e5092fdbf 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/14 08:03 upstream 7e90b5c295ec d902085f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/12 16:50 upstream 841c35169323 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/12 13:45 upstream 841c35169323 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/12 07:30 upstream 841c35169323 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/09 22:43 upstream e6f39a90de92 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/07 01:49 upstream 99bd3cb0d12e 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/30 20:28 upstream 861c0981648f 7f400fcb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/29 08:02 upstream 4854cf9c61d0 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/27 02:12 upstream 168174d78157 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/26 09:28 upstream ecb1b8288dc7 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/24 17:27 upstream 615d30064886 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/24 11:25 upstream 615d30064886 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/24 02:49 upstream 7ed2632ec7d7 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/22 22:50 upstream 6613476e225e 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/22 09:56 upstream 4fbbed787267 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/21 00:25 upstream 125514880ddd 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/20 07:10 upstream 9d64bf433c53 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/12 02:39 upstream 3e7aeb78ab01 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/10 20:16 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/10 15:06 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/10 09:59 upstream 35f11a3710cd b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/09 10:34 upstream 9f8413c4a66f 4c0fd4bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/08 08:35 upstream 0dd3ee311255 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/05 08:25 upstream 5eff55d725a4 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/01/01 06:59 upstream 2639772a11c8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/31 15:44 upstream 453f5db0619e fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/31 13:22 upstream 453f5db0619e fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/30 20:36 upstream f016f7547aee fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/28 02:09 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/26 23:31 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in lock_extent
2023/12/17 02:00 upstream c8e97fc6b4c0 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/17 00:44 upstream c8e97fc6b4c0 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/16 20:42 upstream c8e97fc6b4c0 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in lock_extent
2023/12/12 22:20 upstream eaadbbaaff74 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/10 05:25 upstream b10a3ccaf6e3 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/09 17:29 upstream f2e8a57ee903 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/08 07:06 upstream 9ace34a8e446 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/12/07 01:51 upstream bee0e7762ad2 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2022/12/23 16:24 upstream 8395ae05cb5a 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2024/02/01 04:51 linux-next 596764183be8 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in lock_extent
2023/12/26 21:55 linux-next 39676dfe5233 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in lock_extent
2023/12/17 23:54 linux-next 17cb8a20bde6 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in lock_extent
2023/11/08 08:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c 83211397 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in lock_extent
* Struck through repros no longer work on HEAD.