syzbot


INFO: task hung in __filemap_get_folio

Status: upstream: reported C repro on 2022/08/08 08:05
Reported-by: syzbot+0e9dc403e57033a74b1d@syzkaller.appspotmail.com
First crash: 178d, last: 7d05h

Cause bisection: introduced by (bisect log) :
commit 8ed00760203d8018bee042fbfe8e076579be2c2b
Author: Paul E. McKenney <paulmck@kernel.org>
Date: Wed Jan 12 17:52:44 2022 +0000

  srcu: Tighten cleanup_srcu_struct() GP checks

Crash: WARNING: bad unlock balance in corrupted (log)
Repro: C syz .config

Sample crash report:
INFO: task udevd:5094 blocked for more than 143 seconds.
      Not tainted 6.2.0-rc2-syzkaller-00010-g69b41ac87e4a #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:24576 pid:5094  ppid:4421   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 io_schedule+0x83/0x100 kernel/sched/core.c:8811
 folio_wait_bit_common+0x8ca/0x1390 mm/filemap.c:1297
 __folio_lock mm/filemap.c:1660 [inline]
 folio_lock include/linux/pagemap.h:938 [inline]
 __filemap_get_folio+0x566/0x1230 mm/filemap.c:1932
 truncate_inode_pages_range+0x5a4/0x1650 mm/truncate.c:377
 kill_bdev block/bdev.c:76 [inline]
 blkdev_flush_mapping+0x153/0x2c0 block/bdev.c:662
 blkdev_put_whole block/bdev.c:693 [inline]
 blkdev_put+0x4a5/0x730 block/bdev.c:953
 blkdev_close+0x55/0x80 block/fops.c:492
 __fput+0x3ba/0x880 fs/file_table.c:320
 task_work_run+0x243/0x300 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x644/0x2150 kernel/exit.c:867
 do_group_exit+0x1fd/0x2b0 kernel/exit.c:1012
 get_signal+0x1755/0x1820 kernel/signal.c:2859
 arch_do_signal_or_restart+0x8d/0x5f0 arch/x86/kernel/signal.c:306
 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fafb5d25697
RSP: 002b:00007ffdbb152c90 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: 0000000000000008 RBX: 000055fd0c7ce900 RCX: 00007fafb5d25697
RDX: 00000000000a0800 RSI: 000055fd0c7ddb60 RDI: 00000000ffffff9c
RBP: 000055fd0c7ddb60 R08: 0000000000000001 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000a0800
R13: 000055fd0c7d0b80 R14: 0000000000000001 R15: 000055fd0c7c7910
 </TASK>
INFO: task syz-executor299:5104 blocked for more than 143 seconds.
      Not tainted 6.2.0-rc2-syzkaller-00010-g69b41ac87e4a #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor299 state:D stack:26936 pid:5104  ppid:5090   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6690
 __mutex_lock_common+0xecf/0x26c0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 blkdev_get_by_dev+0xfe/0xa60 block/bdev.c:813
 blkdev_open+0x128/0x2e0 block/fops.c:478
 do_dentry_open+0x85f/0x11b0 fs/open.c:882
 do_open fs/namei.c:3557 [inline]
 path_openat+0x25cc/0x2de0 fs/namei.c:3714
 do_filp_open+0x275/0x500 fs/namei.c:3741
 do_sys_openat2+0x13b/0x500 fs/open.c:1310
 do_sys_open fs/open.c:1326 [inline]
 __do_sys_openat fs/open.c:1342 [inline]
 __se_sys_openat fs/open.c:1337 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1337
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f5dd3bc4c34
RSP: 002b:00007f5dd3bb4e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5dd3bc4c34
RDX: 00000000000a0000 RSI: 00007f5dd3bb4ef0 RDI: 00000000ffffff9c
RBP: 00007f5dd3bb4ef0 R08: 0000000000000000 R09: 00007f5dd3bb5700
R10: 0000000000000000 R11: 0000000000000293 R12: 00000000000a0000
R13: 00007f5dd3c591a4 R14: 64626e2f7665642f R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d5239d0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d5241d0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by khungtaskd/28:
 #0: ffffffff8d523800 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/4742:
 #0: ffff88814a4b7098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900015a02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6e8/0x1e50 drivers/tty/n_tty.c:2177
1 lock held by udevd/5094:
 #0: ffff888146c734c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0x100/0x730 block/bdev.c:911
1 lock held by syz-executor299/5104:
 #0: ffff888146c734c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0xfe/0xa60 block/bdev.c:813

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.2.0-rc2-syzkaller-00010-g69b41ac87e4a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e3/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x19b/0x3e0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xcd5/0xd20 kernel/hung_task.c:377
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </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:112 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry drivers/acpi/processor_idle.c:570 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_enter+0x43d/0x800 drivers/acpi/processor_idle.c:707

Crashes (81):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2023/01/04 20:03 upstream 69b41ac87e4a 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2023/01/01 22:55 upstream e4cf7c25bae5 ab32d508 .config console log report syz C [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/12/28 14:20 upstream 1b929c02afd3 44712fbc .config console log report syz C [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/12/24 11:51 upstream a27405b2ed9c 9da18ae8 .config console log report syz C [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/24 07:22 upstream a70385240892 23bf86af .config console log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/08 05:21 upstream 4c86114194e6 0de35f24 .config console log report syz C [disk image] [vmlinux] [mounted in repro] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/04 22:17 upstream a5088ee7251e eab8f949 .config console log report syz C [disk image] [vmlinux] [mounted in repro] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/02 11:29 upstream b357fd1c2afc feb56351 .config console log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/02 05:46 upstream b357fd1c2afc feb56351 .config console log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/01 17:37 upstream ffb4d94b4314 feb56351 .config strace log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/30 05:15 upstream 511cce163b75 1d385642 .config console log report syz C INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/29 16:18 upstream c3e0e1e23c70 1d385642 .config console log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/25 22:36 upstream 105a36f3694e 0042f2b4 .config console log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/25 04:01 upstream 1a61b828566f 0042f2b4 .config strace log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/23 18:45 upstream bf682942cd26 0042f2b4 .config console log report syz C INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2022/11/28 10:01 linux-next 9e46a7996732 74a66371 .config console log report syz C [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2022/10/13 21:45 linux-next aaa11ce2ffc8 adf90437 .config console log report syz C [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2022/09/10 07:05 linux-next e47eb90a0a9a 356d8217 .config console log report syz INFO: task hung in __filemap_get_folio
ci2-upstream-fs 2023/01/22 02:36 upstream f883675bf652 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2023/01/12 21:47 upstream e8f60cd7db24 96166539 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci2-upstream-fs 2023/01/11 18:14 upstream 7dd4b804e080 96166539 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci2-upstream-fs 2022/12/26 18:25 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci2-upstream-fs 2022/12/26 06:50 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/12/07 01:52 upstream bce9332220bd d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/12/02 07:44 upstream ef4d3ea40565 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/11/13 12:45 upstream fef7fd48922d 3ead01ad .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/10/07 15:19 upstream ffb39098bf87 8a212197 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/07 12:44 upstream ffb39098bf87 8a212197 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/07 01:02 upstream ffb39098bf87 8a212197 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/06 18:33 upstream 833477fce7a1 131b38ac .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/05 02:39 upstream a5088ee7251e eab8f949 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/05 00:42 upstream a5088ee7251e eab8f949 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/04 19:05 upstream a5088ee7251e eab8f949 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/03 19:56 upstream 4fe89d07dcc2 feb56351 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/10/03 00:19 upstream a962b54e162c feb56351 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/10/01 15:01 upstream ffb4d94b4314 feb56351 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/10/01 10:32 upstream ffb4d94b4314 feb56351 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/30 12:37 upstream 987a926c1d8a 1d385642 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/29 01:18 upstream 49c13ed0316d e2556bc3 .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/28 21:01 upstream 49c13ed0316d e2556bc3 .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/27 08:59 upstream 3800a713b607 10323ddf .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/26 04:29 upstream f76349cf4145 0042f2b4 .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/26 03:16 upstream f76349cf4145 0042f2b4 .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/25 11:34 upstream 105a36f3694e 0042f2b4 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/24 21:35 upstream 1a61b828566f 0042f2b4 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/19 14:36 upstream 521a547ced64 dd9a85ff .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/19 10:55 upstream 521a547ced64 dd9a85ff .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/19 10:20 upstream 521a547ced64 dd9a85ff .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/19 05:40 upstream 38eddeedbbea dd9a85ff .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/15 14:19 upstream 3245cb65fd91 dd9a85ff .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/15 06:06 upstream 3245cb65fd91 b884348d .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/12 14:53 upstream 80e78fcce86d 356d8217 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/12 13:23 upstream 80e78fcce86d 356d8217 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/11 19:26 upstream b96fbd602d35 356d8217 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-selinux-root 2022/09/10 03:14 upstream 9b4509495418 356d8217 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-kasan-gce-root 2022/09/10 02:50 upstream 9b4509495418 356d8217 .config console log report info [disk image] [vmlinux] INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2023/01/26 11:06 linux-next 691781f561e9 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2023/01/24 09:45 linux-next 691781f561e9 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2023/01/01 16:53 linux-next c76083fac3ba ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2022/11/20 08:51 linux-next 15f3bff12cf6 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2022/09/15 05:57 linux-next e47eb90a0a9a b884348d .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2022/09/14 12:01 linux-next e47eb90a0a9a b884348d .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-linux-next-kasan-gce-root 2022/08/08 04:48 linux-next ca688bff68bc 88e3a122 .config console log report info INFO: task hung in __filemap_get_folio
ci-upstream-gce-arm64 2022/12/15 16:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] INFO: task hung in __filemap_get_folio
* Struck through repros no longer work on HEAD.