syzbot


INFO: task hung in lock_extent

Status: upstream: reported C repro on 2023/01/28 07:38
Labels: btrfs (incorrect?)
Reported-by: syzbot+eaa05fbc7563874b7ad2@syzkaller.appspotmail.com
First crash: 168d, last: 1d03h

Cause bisection: failed (error log, bisect log)
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [btrfs] Monthly Report 1 (2) 2023/03/27 13:42
[syzbot] [btrfs?] INFO: task hung in lock_extent 0 (1) 2023/01/28 07:38
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:upstream C 1 25d 25d 0/3 upstream: reported C repro on 2023/05/08 17:01

Sample crash report:
INFO: task syz-executor317:4996 blocked for more than 143 seconds.
      Not tainted 6.4.0-rc1-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor317 state:D stack:22864 pid:4996  ppid:4995   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5343 [inline]
 __schedule+0x187b/0x4900 kernel/sched/core.c:6669
 schedule+0xc3/0x180 kernel/sched/core.c:6745
 wait_on_state fs/btrfs/extent-io-tree.c:707 [inline]
 wait_extent_bit+0x50c/0x670 fs/btrfs/extent-io-tree.c:751
 lock_extent+0x1ce/0x280 fs/btrfs/extent-io-tree.c:1742
 btrfs_page_mkwrite+0x556/0xc90 fs/btrfs/inode.c:8127
 do_page_mkwrite+0x1a4/0x600 mm/memory.c:2931
 wp_page_shared mm/memory.c:3280 [inline]
 do_wp_page+0x501/0x3690 mm/memory.c:3362
 handle_pte_fault mm/memory.c:4964 [inline]
 __handle_mm_fault mm/memory.c:5089 [inline]
 handle_mm_fault+0x2371/0x5860 mm/memory.c:5243
 do_user_addr_fault arch/x86/mm/fault.c:1440 [inline]
 handle_page_fault arch/x86/mm/fault.c:1534 [inline]
 exc_page_fault+0x7d2/0x910 arch/x86/mm/fault.c:1590
 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:56
Code: 46 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:ffffc90003a5f550 EFLAGS: 00050206
RAX: 0000000000000000 RBX: 0000000020000118 RCX: 0000000000000038
RDX: 0000000000000000 RSI: ffffc90003a5f600 RDI: 00000000200000e0
RBP: ffffc90003a5f6b0 R08: dffffc0000000000 R09: fffff5200074bec7
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000038
R13: ffffc90003a5f600 R14: 00000000200000e0 R15: ffffc90003a5f600
 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:144
 emit_last_fiemap_cache fs/btrfs/extent_io.c:2880 [inline]
 extent_fiemap+0x1a54/0x1fc0 fs/btrfs/extent_io.c:3407
 btrfs_fiemap+0x178/0x1e0 fs/btrfs/inode.c:7799
 ioctl_fiemap fs/ioctl.c:219 [inline]
 do_vfs_ioctl+0x19ba/0x2b10 fs/ioctl.c:810
 __do_sys_ioctl fs/ioctl.c:868 [inline]
 __se_sys_ioctl+0x81/0x160 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff020caa2e9
RSP: 002b:00007ffd6ab81c38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000020000080 RCX: 00007ff020caa2e9
RDX: 00000000200000c0 RSI: 00000000c020660b RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd6ab81c70
R13: 0000000000000000 R14: 431bde82d7b634db R15: 0000000000000000
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/13:
 #0: ffffffff8cf27670 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:518
1 lock held by rcu_tasks_trace/14:
 #0: ffffffff8cf27a30 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:518
1 lock held by khungtaskd/28:
 #0: ffffffff8cf274a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/4748:
 #0: ffff88802d632098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900015a02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6ab/0x1db0 drivers/tty/n_tty.c:2176
4 locks held by syz-executor317/4996:
 #0: ffff888075e70598 (&sb->s_type->i_mutex_key#14){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:785 [inline]
 #0: ffff888075e70598 (&sb->s_type->i_mutex_key#14){++++}-{3:3}, at: btrfs_inode_lock+0x60/0xd0 fs/btrfs/inode.c:170
 #1: ffff88802d615b68 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:161 [inline]
 #1: ffff88802d615b68 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1381 [inline]
 #1: ffff88802d615b68 (&mm->mmap_lock){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1534 [inline]
 #1: ffff88802d615b68 (&mm->mmap_lock){++++}-{3:3}, at: exc_page_fault+0x1b9/0x910 arch/x86/mm/fault.c:1590
 #2: ffff888022718558 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x1a4/0x600 mm/memory.c:2931
 #3: ffff888075e70420 (&ei->i_mmap_lock){.+.+}-{3:3}, at: btrfs_page_mkwrite+0x427/0xc90 fs/btrfs/inode.c:8116

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.4.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/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+0x187/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xec2/0xf00 kernel/hung_task.c:379
 kthread+0x2b8/0x350 kernel/kthread.c:379
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 10 Comm: kworker/u4:0 Not tainted 6.4.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:switch_mm_irqs_off+0x4d/0xb10 arch/x86/mm/tlb.c:496
Code: 8b 04 25 28 00 00 00 48 89 84 24 a0 00 00 00 49 bc 00 00 00 00 00 fc ff df 4c 8d b4 24 80 00 00 00 48 c7 44 24 60 b3 8a b5 41 <48> c7 44 24 68 4d 35 81 8c 48 c7 44 24 70 00 ba 3d 81 48 8d 54 24
RSP: 0018:ffffc900000f7720 EFLAGS: 00000082
RAX: cc1d6891b8a16300 RBX: ffff888012468000 RCX: ffff888015a51dc0
RDX: ffff888015a51dc0 RSI: ffff888012468000 RDI: 0000000000000000
RBP: ffffc900000f7810 R08: ffffffff81ee9929 R09: fffffbfff1cab7de
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc900000f78e0 R14: ffffc900000f77a0 R15: 8000000001e25063
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564cf3a95680 CR3: 000000000cd30000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 use_temporary_mm arch/x86/kernel/alternative.c:1494 [inline]
 __text_poke+0x5a3/0x9b0 arch/x86/kernel/alternative.c:1605
 text_poke arch/x86/kernel/alternative.c:1669 [inline]
 text_poke_bp_batch+0x66f/0x950 arch/x86/kernel/alternative.c:2048
 text_poke_flush arch/x86/kernel/alternative.c:2161 [inline]
 text_poke_finish+0x1a/0x30 arch/x86/kernel/alternative.c:2168
 arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:146
 static_key_disable_cpuslocked+0xce/0x1b0 kernel/jump_label.c:235
 static_key_disable+0x1a/0x20 kernel/jump_label.c:243
 toggle_allocation_gate+0x1b8/0x250 mm/kfence/core.c:836
 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2405
 worker_thread+0xa63/0x1210 kernel/workqueue.c:2552
 kthread+0x2b8/0x350 kernel/kthread.c:379
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.031 msecs

Crashes (122):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
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/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
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/06/01 19:42 upstream 929ed21dfdb6 babc4389 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/22 21:20 upstream 44c026a73be8 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/17 16:18 upstream f1fcbaa18b28 eaac4681 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/14 22:05 upstream bb7c241fae62 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/10 20:31 upstream 16a8829130ca 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/02 18:03 upstream 865fdb08197e 52d40fd2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/05/01 13:25 upstream 58390c8ce1bd 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/30 20:12 upstream 825a0714d2b3 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/28 20:13 upstream 33afd4b76393 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/26 02:38 upstream 173ea743bf7a 65320f8e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/22 17:06 upstream 8e41e0a57566 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/22 13:13 upstream 8e41e0a57566 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/21 03:15 upstream 6a66fdd29ea1 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/20 13:19 upstream cb0856346a60 a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/19 05:41 upstream af67688dca57 d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/18 18:03 upstream 6a8f57ae2eb0 d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/18 02:39 upstream 6a8f57ae2eb0 436577a9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/17 05:54 upstream 6a8f57ae2eb0 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/15 05:52 upstream 95abc817ab3a ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/15 02:17 upstream 95abc817ab3a ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/13 08:24 upstream 0bcc40255504 82d5e53e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/12 18:19 upstream 0bcc40255504 1a1596b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/11 18:43 upstream 0d3eb744aed4 49faf98d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/11 05:43 upstream 0d3eb744aed4 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/11 01:57 upstream 0d3eb744aed4 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/09 07:47 upstream a79d5c76f705 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/09 04:50 upstream a79d5c76f705 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/08 11:34 upstream aa318c48808c 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/06 06:59 upstream 99ddf2254feb 8b834965 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/05 13:40 upstream 76f598ba7d8e 831373d3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/04 19:54 upstream 148341f0a2f5 928dd177 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/03 23:29 upstream 148341f0a2f5 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/03 13:31 upstream 7e364e56293b 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/03 09:35 upstream 7e364e56293b 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/03 05:14 upstream 6ab608fe852b f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/02 11:24 upstream 00c7b5f4ddc5 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/02 03:45 upstream 00c7b5f4ddc5 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/04/01 11:09 upstream 7b50567bdcad f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/03/31 14:53 upstream 62bad54b26db f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/03/29 13:15 upstream fcd476ea6a88 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/03/29 09:49 upstream fcd476ea6a88 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/03/28 15:29 upstream 3a93e40326c8 47f3aaf1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_extent
2023/03/19 13:32 upstream a3671bd86a97 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in lock_extent
2023/01/29 19:14 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root 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
2023/05/02 12:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 62df2017 .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.