syzbot


INFO: task hung in blkdev_common_ioctl

Status: auto-obsoleted due to no activity on 2023/08/23 09:04
Reported-by: syzbot+1476fc27e273596b0c39@syzkaller.appspotmail.com
First crash: 563d, last: 563d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in blkdev_common_ioctl (2) origin:upstream missing-backport C error 2 32d 200d 0/3 upstream: reported C repro on 2024/05/05 13:20
linux-6.1 INFO: task hung in blkdev_common_ioctl (2) 3 232d 316d 0/3 auto-obsoleted due to no activity on 2024/07/12 01:42
linux-6.1 INFO: task hung in blkdev_common_ioctl 3 569d 620d 0/3 auto-obsoleted due to no activity on 2023/08/23 09:07
upstream INFO: task can't die in blkdev_common_ioctl block C 382 31d 964d 0/28 closed as dup on 2022/04/02 11:26

Sample crash report:
INFO: task syz-executor.1:19382 blocked for more than 143 seconds.
      Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:27384 pid:19382 ppid:  3547 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 rwsem_down_write_slowpath+0xebb/0x15c0 kernel/locking/rwsem.c:1157
 __down_write_common kernel/locking/rwsem.c:1284 [inline]
 __down_write kernel/locking/rwsem.c:1293 [inline]
 down_write+0x164/0x170 kernel/locking/rwsem.c:1542
 filemap_invalidate_lock include/linux/fs.h:832 [inline]
 blk_ioctl_zeroout block/ioctl.c:180 [inline]
 blkdev_common_ioctl+0x1533/0x2080 block/ioctl.c:484
 blkdev_ioctl+0x286/0x6b0 block/ioctl.c:595
 block_ioctl+0xb1/0xf0 block/fops.c:493
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
 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+0x61/0xcb
RIP: 0033:0x7f86ced1f169
RSP: 002b:00007f86cd24f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f86cee3f120 RCX: 00007f86ced1f169
RDX: 0000000020000080 RSI: 000000000000127f RDI: 0000000000000008
RBP: 00007f86ced7aca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffe2d0c9ef R14: 00007f86cd24f300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91c4e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3261:
 #0: ffff88814b5ca098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002bb62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1da0 drivers/tty/n_tty.c:2147
1 lock held by syz-executor.2/18155:
1 lock held by syz-executor.5/19025:
1 lock held by syz-executor.1/19373:
1 lock held by syz-executor.1/19382:
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:832 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: blk_ioctl_zeroout block/ioctl.c:180 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_common_ioctl+0x1533/0x2080 block/ioctl.c:484
1 lock held by syz-executor.1/19453:
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195
1 lock held by syz-executor.1/19454:
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195
1 lock held by syz-executor.1/19455:
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:832 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: blk_ioctl_zeroout block/ioctl.c:180 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_common_ioctl+0x1533/0x2080 block/ioctl.c:484
1 lock held by syz-executor.1/19511:
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195
1 lock held by syz-executor.1/19512:
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195
1 lock held by syz-executor.1/19513:
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:832 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: blk_ioctl_zeroout block/ioctl.c:180 [inline]
 #0: ffff888017fb7338 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_common_ioctl+0x1533/0x2080 block/ioctl.c:484

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.110-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+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 19025 Comm: syz-executor.5 Not tainted 5.15.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
RIP: 0010:check_preemption_disabled+0x5c/0x110 lib/smp_processor_id.c:19
Code: 25 28 00 00 00 48 3b 44 24 08 0f 85 c7 00 00 00 89 d8 48 83 c4 10 5b 41 5c 41 5e 41 5f c3 48 c7 04 24 00 00 00 00 9c 8f 04 24 <f7> 04 24 00 02 00 00 74 c9 49 89 f6 49 89 ff 65 4c 8b 25 fd 32 e8
RSP: 0018:ffffc90003f6ee88 EFLAGS: 00000046
RAX: 0000000080000000 RBX: 0000000000000000 RCX: ffffffff913be003
RDX: dffffc0000000000 RSI: ffffffff8a8b0960 RDI: ffffffff8ad858c0
RBP: ffffc90003f6ef80 R08: ffffffff81864ef0 R09: fffff940004b1dc1
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffc90003f6f130 R14: e0acb9623a8c1873 R15: 1ffff920007edddc
FS:  00007f28a7b9c700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056546403e030 CR3: 000000009e4ba000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lockdep_recursion_inc kernel/locking/lockdep.c:431 [inline]
 lockdep_hardirqs_on_prepare+0x1f4/0x7a0 kernel/locking/lockdep.c:4276
 trace_hardirqs_on+0x67/0x80 kernel/trace/trace_preemptirq.c:49
 consume_stock mm/memcontrol.c:2209 [inline]
 try_charge_memcg+0x2aa/0x1530 mm/memcontrol.c:2604
 try_charge mm/memcontrol.c:2776 [inline]
 charge_memcg+0x10b/0x340 mm/memcontrol.c:6741
 __mem_cgroup_charge+0x23/0x80 mm/memcontrol.c:6777
 mem_cgroup_charge include/linux/memcontrol.h:695 [inline]
 __add_to_page_cache_locked+0xbdb/0x11a0 mm/filemap.c:892
 add_to_page_cache_lru+0x1b3/0x560 mm/filemap.c:984
 page_cache_ra_unbounded+0x403/0x930 mm/readahead.c:222
 page_cache_async_readahead include/linux/pagemap.h:856 [inline]
 do_async_mmap_readahead mm/filemap.c:3014 [inline]
 filemap_fault+0x669/0x1470 mm/filemap.c:3070
 __do_fault+0x139/0x340 mm/memory.c:3885
 do_read_fault mm/memory.c:4221 [inline]
 do_fault mm/memory.c:4349 [inline]
 handle_pte_fault mm/memory.c:4608 [inline]
 __handle_mm_fault mm/memory.c:4743 [inline]
 handle_mm_fault+0x376f/0x5950 mm/memory.c:4841
 faultin_page mm/gup.c:976 [inline]
 __get_user_pages+0x4ed/0x11d0 mm/gup.c:1197
 populate_vma_page_range+0x215/0x2a0 mm/gup.c:1529
 __mm_populate+0x2a5/0x4a0 mm/gup.c:1638
 mm_populate include/linux/mm.h:2632 [inline]
 vm_mmap_pgoff+0x22b/0x2d0 mm/util.c:556
 ksys_mmap_pgoff+0x559/0x780 mm/mmap.c:1624
 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+0x61/0xcb
RIP: 0033:0x7f28a962a169
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:00007f28a7b9c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f28a9749f80 RCX: 00007f28a962a169
RDX: 0000000001000006 RSI: 0000000000b34902 RDI: 0000000020000000
RBP: 00007f28a9685ca1 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000000028011 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcacee7a3f R14: 00007f28a7b9c300 R15: 0000000000022000
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/07 15:40 linux-5.15.y 8a7f2a5c5aa1 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in blkdev_common_ioctl
* Struck through repros no longer work on HEAD.