syzbot


INFO: task hung in blkdev_flush_mapping

Status: upstream: reported C repro on 2023/09/09 22:51
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+2fe3bc8cd40705216082@syzkaller.appspotmail.com
First crash: 390d, last: 15d
Bug presence (1)
Date Name Commit Repro Result
2023/09/18 upstream (ToT) ce9ecca0238b C [report] INFO: task hung in blkdev_put
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in blkdev_flush_mapping 1 192d 192d 0/3 auto-obsoleted due to no activity on 2024/07/04 14:18
upstream INFO: task hung in blkdev_flush_mapping block C unreliable 11 15d 291d 0/28 upstream: reported C repro on 2023/12/18 10:31
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2024/09/18 23:52 2h28m bisect fix linux-6.1.y OK (0) job log log
2024/05/12 23:55 1h23m bisect fix linux-6.1.y OK (0) job log log
2024/04/07 05:07 1h58m bisect fix linux-6.1.y OK (0) job log log
2024/03/07 11:45 1h23m bisect fix linux-6.1.y OK (0) job log log
2024/01/29 03:39 2h04m bisect fix linux-6.1.y OK (0) job log log
2023/12/27 03:08 1h22m bisect fix linux-6.1.y OK (0) job log log
2023/11/26 04:34 1h24m bisect fix linux-6.1.y OK (0) job log log
2023/10/24 17:35 1h51m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
INFO: task udevd:3574 blocked for more than 143 seconds.
      Not tainted 6.1.53-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:24416 pid:3574  ppid:3004   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 io_schedule+0x88/0x100 kernel/sched/core.c:8782
 folio_wait_bit_common+0x868/0x1280 mm/filemap.c:1296
 __filemap_get_folio+0x44a/0xe30 mm/filemap.c:1931
 truncate_inode_pages_range+0x598/0x1340 mm/truncate.c:378
 kill_bdev block/bdev.c:76 [inline]
 blkdev_flush_mapping+0x154/0x2b0 block/bdev.c:662
 blkdev_put_whole block/bdev.c:693 [inline]
 blkdev_put+0x4c0/0x750 block/bdev.c:953
 blkdev_close+0x56/0x80 block/fops.c:514
 __fput+0x3b7/0x890 fs/file_table.c:320
 task_work_run+0x246/0x300 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x6fb/0x2300 kernel/exit.c:869
 do_group_exit+0x202/0x2b0 kernel/exit.c:1019
 get_signal+0x16f7/0x17d0 kernel/signal.c:2862
 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7c4ef169a4
RSP: 002b:00007ffc356f9b40 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: 0000000000000008 RBX: 000056190c3d6cf0 RCX: 00007f7c4ef169a4
RDX: 00000000000a0800 RSI: 000056190c3c8070 RDI: 00000000ffffff9c
RBP: 000056190c3c8070 R08: 0000000000000001 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000a0800
R13: 000056190c3ca5a0 R14: 0000000000000001 R15: 000056190c3b5910
 </TASK>
INFO: task syz-executor256:3592 blocked for more than 143 seconds.
      Not tainted 6.1.53-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor256 state:D stack:27560 pid:3592  ppid:3570   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6689
 __mutex_lock_common+0xe2b/0x2520 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+0x148/0xa10 block/bdev.c:813
 blkdev_open+0x12e/0x2e0 block/fops.c:500
 do_dentry_open+0x7f9/0x10f0 fs/open.c:882
 do_open fs/namei.c:3557 [inline]
 path_openat+0x2644/0x2e60 fs/namei.c:3714
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13b/0x500 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_openat fs/open.c:1350 [inline]
 __se_sys_openat fs/open.c:1345 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1345
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc08e12d570
RSP: 002b:00007fc08e0ebd90 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc08e12d570
RDX: 0000000000000000 RSI: 00007fc08e0ebe10 RDI: 00000000ffffff9c
RBP: 00007fc08e0ebe10 R08: 0000000000000000 R09: 002364626e2f7665
R10: 0000000000000000 R11: 0000000000000293 R12: 6666666666666667
R13: 00007fc08e1821a4 R14: 64626e2f7665642f R15: 00007fff7155f268
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12a1b0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d12a9b0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
 #0: ffffffff8d129fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3307:
 #0: ffff888028cb7098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188
1 lock held by udevd/3574:
 #0: ffff88801f6ef4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0x100/0x750 block/bdev.c:911
1 lock held by syz-executor256/3592:
 #0: ffff88801f6ef4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x148/0xa10 block/bdev.c:813

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.53-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 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+0xf18/0xf60 kernel/hung_task.c:377
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 56 Comm: kworker/u4:4 Not tainted 6.1.53-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:inat_immediate_size arch/x86/include/asm/inat.h:188 [inline]
RIP: 0010:insn_get_immediate+0xf1/0x1390 arch/x86/lib/insn.c:647
Code: f7 89 e8 25 00 00 02 00 0f 85 50 01 00 00 89 ee 81 e6 00 38 00 00 31 ff e8 9c 53 06 f7 89 e8 25 00 38 00 00 0f 84 80 03 00 00 <c1> ed 0b 83 e5 07 48 89 ef 48 c7 c6 50 73 5d 8e e8 7a 54 06 f7 ff
RSP: 0018:ffffc90001577880 EFLAGS: 00000206
RAX: 0000000000003000 RBX: 1ffff920002aef39 RCX: ffff8880162c9dc0
RDX: ffff8880162c9dc0 RSI: 0000000000003000 RDI: 0000000000000000
RBP: 000000000000b000 R08: ffffffff8a83c3f4 R09: ffffc90001577980
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc90001577980
R13: ffffc900015779bc R14: 1ffff920002aef37 R15: ffffc900015779cc
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055cd9c84f680 CR3: 000000000ce8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 insn_get_length arch/x86/lib/insn.c:707 [inline]
 insn_decode+0x36c/0x500 arch/x86/lib/insn.c:747
 arch_jump_entry_size arch/x86/kernel/jump_label.c:24 [inline]
 __jump_label_patch+0xe4/0x440 arch/x86/kernel/jump_label.c:45
 arch_jump_label_transform_queue+0x4a/0xd0 arch/x86/kernel/jump_label.c:137
 __jump_label_update+0x177/0x3a0 kernel/jump_label.c:447
 static_key_disable_cpuslocked+0xca/0x1b0 kernel/jump_label.c:207
 static_key_disable+0x16/0x20 kernel/jump_label.c:215
 toggle_allocation_gate+0x3e0/0x480 mm/kfence/core.c:818
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.322 msecs

Crashes (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/18 10:49 linux-6.1.y 09045dae0d90 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/08/15 19:00 linux-6.1.y 117ac406ba90 e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/07/23 07:24 linux-6.1.y 9b3f9a5b12dc 708c10c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/07/22 12:30 linux-6.1.y 9b3f9a5b12dc df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/07/05 15:03 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/07/04 07:21 linux-6.1.y 99e6a620de00 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/07/02 11:11 linux-6.1.y 99e6a620de00 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/06/10 05:17 linux-6.1.y 88690811da69 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/06/08 09:10 linux-6.1.y 88690811da69 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/06/08 08:56 linux-6.1.y 88690811da69 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/26 16:22 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/24 08:34 linux-6.1.y 4078fa637fcd 8f98448e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/18 11:11 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/18 00:46 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/17 23:48 linux-6.1.y 4078fa637fcd a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/17 23:46 linux-6.1.y 4078fa637fcd a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/17 23:45 linux-6.1.y 4078fa637fcd a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2024/05/17 23:45 linux-6.1.y 4078fa637fcd a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
2023/09/09 22:50 linux-6.1.y 59b13c2b647e 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_flush_mapping
* Struck through repros no longer work on HEAD.