syzbot


INFO: task hung in blkdev_common_ioctl

Status: auto-obsoleted due to no activity on 2023/08/23 09:07
Reported-by: syzbot+a4cece7ddc56f9740c95@syzkaller.appspotmail.com
First crash: 397d, last: 347d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in blkdev_common_ioctl 1 341d 341d 0/3 auto-obsoleted due to no activity on 2023/08/23 09:04
linux-6.1 INFO: task hung in blkdev_common_ioctl (2) 3 10d 94d 0/3 upstream: reported on 2024/01/09 18:28
upstream INFO: task can't die in blkdev_common_ioctl block C 127 2d22h 742d 0/26 closed as dup on 2022/04/02 11:26

Sample crash report:
INFO: task syz-executor.4:19372 blocked for more than 143 seconds.
      Not tainted 6.1.27-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:26408 pid:19372 ppid:3608   flags:0x00004004
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
 rwsem_down_write_slowpath+0xe93/0x14a0 kernel/locking/rwsem.c:1189
 filemap_invalidate_lock include/linux/fs.h:801 [inline]
 blk_ioctl_zeroout block/ioctl.c:182 [inline]
 blkdev_common_ioctl+0x151a/0x2350 block/ioctl.c:486
 blkdev_ioctl+0x2f5/0x760 block/ioctl.c:609
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
 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:0x7fd2aa48c169
RSP: 002b:00007fd2ab290168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fd2aa5abf80 RCX: 00007fd2aa48c169
RDX: 0000000020000100 RSI: 000000000000127f RDI: 0000000000000003
RBP: 00007fd2aa4e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcd578ac2f R14: 00007fd2ab290300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8cf273f0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8cf27bf0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
 #0: ffffffff8cf27220 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3301:
 #0: ffff8880285b2098 (&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:2177
2 locks held by kworker/u4:19/10292:
1 lock held by syz-executor.2/15821:
1 lock held by syz-executor.2/15829:
1 lock held by syz-executor.5/15878:
1 lock held by syz-executor.5/15881:
1 lock held by syz-executor.2/15912:
1 lock held by syz-executor.2/15914:
1 lock held by syz-executor.0/15926:
1 lock held by syz-executor.5/15988:
1 lock held by syz-executor.0/16056:
1 lock held by syz-executor.0/16113:
1 lock held by syz-executor.5/18505:
1 lock held by syz-executor.4/19372:
 #0: ffff888140d008c0 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:801 [inline]
 #0: ffff888140d008c0 (mapping.invalidate_lock#2){++++}-{3:3}, at: blk_ioctl_zeroout block/ioctl.c:182 [inline]
 #0: ffff888140d008c0 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_common_ioctl+0x151a/0x2350 block/ioctl.c:486

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.27-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+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: 16113 Comm: syz-executor.0 Not tainted 6.1.27-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
RIP: 0010:__sanitizer_cov_trace_pc+0x58/0x60 kernel/kcov.c:225
Code: 68 15 00 00 83 fa 02 75 21 48 8b 91 70 15 00 00 48 8b 32 48 8d 7e 01 8b 89 6c 15 00 00 48 39 cf 73 08 48 89 3a 48 89 44 f2 08 <c3> 0f 1f 80 00 00 00 00 4c 8b 04 24 65 48 8b 15 14 a6 78 7e 65 8b
RSP: 0018:ffffc90008ee7278 EFLAGS: 00000046
RAX: ffffffff81badb27 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc9001dd4c000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffffea0001eaaa80 R08: ffffffff81bc0a69 R09: fffff940003d5551
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000003 R14: ffffea0001eaaa80 R15: 0000000000000001
FS:  00007f55ee523700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fadd2d85998 CR3: 0000000073046000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lruvec_add_folio include/linux/mm_inline.h:317 [inline]
 lru_add_fn+0x827/0x1a90 mm/swap.c:228
 folio_batch_move_lru+0x31a/0x720 mm/swap.c:246
 folio_add_lru+0x3ae/0xa80 mm/swap.c:534
 filemap_add_folio+0x223/0x570 mm/filemap.c:949
 page_cache_ra_unbounded+0x20c/0x7b0 mm/readahead.c:251
 do_sync_mmap_readahead+0x7ae/0x980 mm/filemap.c:3044
 filemap_fault+0x813/0x17e0 mm/filemap.c:3136
 __do_fault+0x136/0x4f0 mm/memory.c:4212
 do_read_fault mm/memory.c:4563 [inline]
 do_fault mm/memory.c:4692 [inline]
 handle_pte_fault mm/memory.c:4964 [inline]
 __handle_mm_fault mm/memory.c:5106 [inline]
 handle_mm_fault+0x3407/0x5330 mm/memory.c:5227
 faultin_page mm/gup.c:1009 [inline]
 __get_user_pages+0x4f3/0x1190 mm/gup.c:1233
 populate_vma_page_range+0x217/0x2b0 mm/gup.c:1590
 __mm_populate+0x275/0x440 mm/gup.c:1704
 mm_populate include/linux/mm.h:2771 [inline]
 vm_mmap_pgoff+0x22b/0x2d0 mm/util.c:525
 ksys_mmap_pgoff+0x4f5/0x6d0 mm/mmap.c:1457
 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:0x7f55ed88c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f55ee523168 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f55ed9abf80 RCX: 00007f55ed88c169
RDX: 0000000001000002 RSI: 0000000000b36000 RDI: 0000000020000000
RBP: 00007f55ed8e7ca1 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000028011 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffead8f4dbf R14: 00007f55ee523300 R15: 0000000000022000
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/01 19:12 linux-6.1.y ca48fc16c493 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_common_ioctl
2023/03/12 10:49 linux-6.1.y 1cc3fcf63192 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in blkdev_common_ioctl
2023/04/05 04:32 linux-6.1.y 3b29299e5f60 831373d3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in blkdev_common_ioctl
* Struck through repros no longer work on HEAD.