syzbot


INFO: task hung in truncate_inode_pages_range (4)

Status: closed as invalid on 2022/02/08 09:50
Subsystems: block
[Documentation on labels]
First crash: 1012d, last: 1012d
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in truncate_inode_pages_range C error 1 1079d 1319d 0/1 upstream: reported C repro on 2021/02/03 07:50
android-44 INFO: task hung in truncate_inode_pages_range 7 2334d 2411d 0/2 auto-closed as invalid on 2019/02/22 13:19
upstream INFO: task hung in truncate_inode_pages_range (5) fs mm 1 630d 630d 0/28 auto-obsoleted due to no activity on 2023/04/15 01:38
linux-4.14 INFO: task hung in truncate_inode_pages_range C error 2 751d 1394d 0/1 upstream: reported C repro on 2020/11/19 23:29
android-49 INFO: task hung in truncate_inode_pages_range 86 2252d 2411d 0/3 auto-closed as invalid on 2019/02/22 14:33
upstream INFO: task hung in truncate_inode_pages_range (2) fs mm 10 1751d 1821d 0/28 auto-closed as invalid on 2020/02/27 00:38
upstream INFO: task hung in truncate_inode_pages_range (3) fs 1 1535d 1535d 0/28 auto-closed as invalid on 2020/08/31 17:47
upstream INFO: task hung in truncate_inode_pages_range (6) squashfs fuse C 1 480d 476d 0/28 auto-obsoleted due to no activity on 2024/02/27 16:22
upstream INFO: task hung in truncate_inode_pages_range exfat 151 2135d 2470d 0/28 closed as dup on 2017/12/12 16:49
android-49 INFO: task hung in truncate_inode_pages_range (2) 1 1861d 1861d 0/3 auto-closed as invalid on 2019/12/08 23:58
linux-6.1 INFO: task hung in truncate_inode_pages_range origin:upstream C 2 31d 480d 0/3 upstream: reported C repro on 2023/05/23 07:52

Sample crash report:
INFO: task syz-executor.3:9394 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc4-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:27024 pid: 9394 ppid:  8515 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6253
 schedule+0xd2/0x260 kernel/sched/core.c:6326
 io_schedule+0xee/0x170 kernel/sched/core.c:8371
 folio_wait_bit_common+0x4f2/0xa60 mm/filemap.c:1371
 lock_page include/linux/pagemap.h:796 [inline]
 truncate_inode_pages_range+0x6d6/0x1020 mm/truncate.c:404
 kill_bdev block/bdev.c:78 [inline]
 set_blocksize+0x2bd/0x370 block/bdev.c:158
 sb_set_blocksize block/bdev.c:167 [inline]
 sb_min_blocksize+0xc8/0x1c0 block/bdev.c:183
 befs_fill_super+0x689/0x10a0 fs/befs/linuxvfs.c:848
 mount_bdev+0x34d/0x410 fs/super.c:1370
 legacy_get_tree+0x105/0x220 fs/fs_context.c:610
 vfs_get_tree+0x89/0x2f0 fs/super.c:1500
 do_new_mount fs/namespace.c:2988 [inline]
 path_mount+0x1320/0x1fa0 fs/namespace.c:3318
 do_mount fs/namespace.c:3331 [inline]
 __do_sys_mount fs/namespace.c:3539 [inline]
 __se_sys_mount fs/namespace.c:3516 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3516
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f2020b47af9
RSP: 002b:00007f201fabd188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f2020c5af60 RCX: 00007f2020b47af9
RDX: 00000000200001c0 RSI: 0000000020000180 RDI: 0000000020000140
RBP: 00007f2020ba1ff7 R08: 0000000020000200 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffcea9ca5f R14: 00007f201fabd300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8bb811a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6458
4 locks held by kworker/u4:2/44:
2 locks held by kworker/u4:3/54:
1 lock held by kswapd0/98:
1 lock held by kswapd1/99:
1 lock held by systemd-journal/2970:
 #0: ffffffff8bca3720 (fs_reclaim){+.+.}-{0:0}, at: __perform_reclaim mm/page_alloc.c:4585 [inline]
 #0: ffffffff8bca3720 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:4609 [inline]
 #0: ffffffff8bca3720 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath.constprop.0+0xa1e/0x20d0 mm/page_alloc.c:5007
2 locks held by in:imklog/6217:
 #0: ffff8880258873f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:994
 #1: ffffffff8bca3720 (fs_reclaim){+.+.}-{0:0}, at: __perform_reclaim mm/page_alloc.c:4585 [inline]
 #1: ffffffff8bca3720 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:4609 [inline]
 #1: ffffffff8bca3720 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath.constprop.0+0xa1e/0x20d0 mm/page_alloc.c:5007
1 lock held by cron/6219:
 #0: ffff8880205546f0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:793 [inline]
 #0: ffff8880205546f0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: lookup_slow fs/namei.c:1673 [inline]
 #0: ffff8880205546f0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: walk_component+0x400/0x6a0 fs/namei.c:1970
1 lock held by syz-fuzzer/6535:
1 lock held by syz-fuzzer/6553:
3 locks held by kworker/1:4/8183:
3 locks held by kworker/0:5/8202:
1 lock held by syz-executor.3/9394:
 #0: ffff8880828740e0 (&type->s_umount_key#72/1){+.+.}-{3:3}, at: alloc_super+0x1dd/0xac0 fs/super.c:229
1 lock held by syz-executor.1/9391:

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b3/0x230 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:295
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 44 Comm: kworker/u4:2 Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: writeback wb_workfn (flush-8:0)
RIP: 0010:__sanitizer_cov_trace_pc+0x37/0x60 kernel/kcov.c:200
Code: 81 e1 00 01 00 00 65 48 8b 14 25 40 70 02 00 a9 00 01 ff 00 74 0e 85 c9 74 35 8b 82 a4 15 00 00 85 c0 74 2b 8b 82 80 15 00 00 <83> f8 02 75 20 48 8b 8a 88 15 00 00 8b 92 84 15 00 00 48 8b 01 48
RSP: 0018:ffffc90001156450 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888012fc2240 RSI: ffffffff81a31372 RDI: 0000000000000003
RBP: 0000000000008eff R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff81a313d0 R11: 0000000000000000 R12: 0000000000000000
R13: 00000000fffffffe R14: ffffc90001156600 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555a7fabde78 CR3: 000000000b88e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 shrink_lruvec+0x782/0x2660 mm/vmscan.c:2935
 shrink_node_memcgs mm/vmscan.c:3129 [inline]
 shrink_node+0x858/0x1eb0 mm/vmscan.c:3252
 shrink_zones mm/vmscan.c:3485 [inline]
 do_try_to_free_pages+0x4e2/0x1640 mm/vmscan.c:3541
 try_to_free_pages+0x29f/0x750 mm/vmscan.c:3776
 __perform_reclaim mm/page_alloc.c:4588 [inline]
 __alloc_pages_direct_reclaim mm/page_alloc.c:4609 [inline]
 __alloc_pages_slowpath.constprop.0+0xac7/0x20d0 mm/page_alloc.c:5007
 __alloc_pages+0x412/0x500 mm/page_alloc.c:5382
 __alloc_pages_node include/linux/gfp.h:570 [inline]
 kmem_getpages mm/slab.c:1377 [inline]
 cache_grow_begin+0x75/0x470 mm/slab.c:2593
 fallback_alloc+0x1e4/0x2e0 mm/slab.c:3140
 __do_cache_alloc mm/slab.c:3282 [inline]
 slab_alloc mm/slab.c:3316 [inline]
 kmem_cache_alloc+0x367/0x560 mm/slab.c:3507
 mempool_alloc+0x146/0x350 mm/mempool.c:392
 bvec_alloc+0x16b/0x200 block/bio.c:206
 bio_alloc_bioset+0x376/0x4a0 block/bio.c:481
 bio_alloc include/linux/bio.h:371 [inline]
 io_submit_init_bio fs/ext4/page-io.c:401 [inline]
 io_submit_add_bh fs/ext4/page-io.c:425 [inline]
 ext4_bio_write_page+0xb1b/0x1f60 fs/ext4/page-io.c:549
 mpage_submit_page+0x11e/0x2a0 fs/ext4/inode.c:2095
 mpage_process_page_bufs+0x681/0x7a0 fs/ext4/inode.c:2209
 mpage_prepare_extent_to_map+0x94f/0xe60 fs/ext4/inode.c:2621
 ext4_writepages+0x926/0x3b90 fs/ext4/inode.c:2749
 do_writepages+0x1ab/0x690 mm/page-writeback.c:2364
 __writeback_single_inode+0x126/0xff0 fs/fs-writeback.c:1616
 writeback_sb_inodes+0x53d/0xf30 fs/fs-writeback.c:1881
 __writeback_inodes_wb+0xc6/0x280 fs/fs-writeback.c:1951
 wb_writeback+0x7f8/0xc30 fs/fs-writeback.c:2056
 wb_check_old_data_flush fs/fs-writeback.c:2156 [inline]
 wb_do_writeback fs/fs-writeback.c:2209 [inline]
 wb_workfn+0x8cf/0x12d0 fs/fs-writeback.c:2238
 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
----------------
Code disassembly (best guess):
   0:	81 e1 00 01 00 00    	and    $0x100,%ecx
   6:	65 48 8b 14 25 40 70 	mov    %gs:0x27040,%rdx
   d:	02 00
   f:	a9 00 01 ff 00       	test   $0xff0100,%eax
  14:	74 0e                	je     0x24
  16:	85 c9                	test   %ecx,%ecx
  18:	74 35                	je     0x4f
  1a:	8b 82 a4 15 00 00    	mov    0x15a4(%rdx),%eax
  20:	85 c0                	test   %eax,%eax
  22:	74 2b                	je     0x4f
  24:	8b 82 80 15 00 00    	mov    0x1580(%rdx),%eax
* 2a:	83 f8 02             	cmp    $0x2,%eax <-- trapping instruction
  2d:	75 20                	jne    0x4f
  2f:	48 8b 8a 88 15 00 00 	mov    0x1588(%rdx),%rcx
  36:	8b 92 84 15 00 00    	mov    0x1584(%rdx),%edx
  3c:	48 8b 01             	mov    (%rcx),%rax
  3f:	48                   	rex.W

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/07 13:31 upstream f80ef9e49fdf 0230ba3e .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in truncate_inode_pages_range
* Struck through repros no longer work on HEAD.