syzbot


INFO: task hung in truncate_inode_pages_range

Status: upstream: reported C repro on 2020/11/19 23:29
Reported-by: syzbot+a6720bebbec2809156b3@syzkaller.appspotmail.com
First crash: 629d, last: 16d
similar bugs (8):
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 313d 553d 0/1 upstream: reported C repro on 2021/02/03 07:50
android-44 INFO: task hung in truncate_inode_pages_range 7 1568d 1645d 0/2 auto-closed as invalid on 2019/02/22 13:19
android-49 INFO: task hung in truncate_inode_pages_range 86 1486d 1645d 0/3 auto-closed as invalid on 2019/02/22 14:33
upstream INFO: task hung in truncate_inode_pages_range (2) 10 986d 1055d 0/23 auto-closed as invalid on 2020/02/27 00:38
upstream INFO: task hung in truncate_inode_pages_range (4) 1 246d 246d 0/23 closed as invalid on 2022/02/08 09:50
upstream INFO: task hung in truncate_inode_pages_range (3) 1 769d 769d 0/23 auto-closed as invalid on 2020/08/31 17:47
upstream INFO: task hung in truncate_inode_pages_range 151 1369d 1704d 0/23 closed as dup on 2017/12/12 16:49
android-49 INFO: task hung in truncate_inode_pages_range (2) 1 1096d 1096d 0/3 auto-closed as invalid on 2019/12/08 23:58

Sample crash report:
block nbd0: Device being setup by another task
block nbd0: Device being setup by another task
block nbd0: Device being setup by another task
block nbd0: Device being setup by another task
INFO: task syz-executor187:21723 blocked for more than 140 seconds.
      Not tainted 4.14.217-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor187 D29072 21723   7995 0x80000002
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x88b/0x1de0 kernel/sched/core.c:3384
 schedule+0x8d/0x1b0 kernel/sched/core.c:3428
 io_schedule+0xb5/0x120 kernel/sched/core.c:5032
 wait_on_page_bit_common mm/filemap.c:1025 [inline]
 __lock_page+0x27b/0x380 mm/filemap.c:1197
 lock_page include/linux/pagemap.h:479 [inline]
 truncate_inode_pages_range+0x8d2/0x13e0 mm/truncate.c:399
 kill_bdev fs/block_dev.c:98 [inline]
 __blkdev_put+0x24c/0x800 fs/block_dev.c:1797
 blkdev_close+0x86/0xb0 fs/block_dev.c:1875
 __fput+0x25f/0x7a0 fs/file_table.c:210
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xa44/0x2850 kernel/exit.c:868
 do_group_exit+0x100/0x2e0 kernel/exit.c:965
 get_signal+0x38d/0x1ca0 kernel/signal.c:2423
 do_signal+0x7c/0x1550 arch/x86/kernel/signal.c:814
 exit_to_usermode_loop+0x160/0x200 arch/x86/entry/common.c:160
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x44a529
RSP: 002b:00007f79c30d1db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00000000006dbc68 RCX: 000000000044a529
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006dbc68
RBP: 00000000006dbc60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc6c
R13: 00007ffdd6e188ff R14: 00007f79c30d29c0 R15: 20c49ba5e353f7cf
INFO: task systemd-udevd:21725 blocked for more than 140 seconds.
      Not tainted 4.14.217-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
systemd-udevd   D28624 21725   4633 0x00000104
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x88b/0x1de0 kernel/sched/core.c:3384
 schedule+0x8d/0x1b0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x669/0x1310 kernel/locking/mutex.c:893
 __blkdev_get+0x191/0x1090 fs/block_dev.c:1455
 blkdev_get+0x88/0x890 fs/block_dev.c:1611
 blkdev_open+0x1cc/0x250 fs/block_dev.c:1772
 do_dentry_open+0x44b/0xec0 fs/open.c:777
 vfs_open+0x105/0x220 fs/open.c:888
 do_last fs/namei.c:3428 [inline]
 path_openat+0x628/0x2970 fs/namei.c:3569
 do_filp_open+0x179/0x3c0 fs/namei.c:3603
 do_sys_open+0x296/0x410 fs/open.c:1081
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fe926fd0840
RSP: 002b:00007ffe2aa0ac18 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00005621d54376c0 RCX: 00007fe926fd0840
RDX: 00005621d3ea6fe3 RSI: 00000000000a0800 RDI: 00005621d54390e0
RBP: 00007ffe2aa0ad90 R08: 00005621d3ea6670 R09: 0000000000000010
R10: 00005621d3ea6d0c R11: 0000000000000246 R12: 00007ffe2aa0ace0
R13: 00005621d5435c20 R14: 0000000000000003 R15: 000000000000000e

Showing all locks held in the system:
1 lock held by khungtaskd/1530:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff86feead7>] debug_show_all_locks+0x7c/0x21a kernel/locking/lockdep.c:4548
1 lock held by in:imklog/7671:
 #0:  (&f->f_pos_lock){+.+.}, at: [<ffffffff818d061b>] __fdget_pos+0x1fb/0x2b0 fs/file.c:769
1 lock held by syz-executor187/21723:
 #0:  (&bdev->bd_mutex){+.+.}, at: [<ffffffff81938538>] __blkdev_put+0xd8/0x800 fs/block_dev.c:1790
1 lock held by systemd-udevd/21725:
 #0:  (&bdev->bd_mutex){+.+.}, at: [<ffffffff8193a1c1>] __blkdev_get+0x191/0x1090 fs/block_dev.c:1455

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

NMI backtrace for cpu 0
CPU: 0 PID: 1530 Comm: khungtaskd Not tainted 4.14.217-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 nmi_cpu_backtrace.cold+0x57/0x93 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x13a/0x180 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5b9/0xb40 kernel/hung_task.c:274
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4615 Comm: systemd-journal Not tainted 4.14.217-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a1958600 task.stack: ffff8880a1960000
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x6d/0xe0 kernel/locking/spinlock.c:192
RSP: 0018:ffff8880a1967958 EFLAGS: 00000097
RAX: 0000000080000000 RBX: 0000000000000082 RCX: 0000000000000000
RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000001
RBP: ffffffff8c09acc8 R08: ffffffff8b9b4440 R09: 0000000000000001
R10: 0000000000000000 R11: ffff8880a1958600 R12: ffff888094692000
R13: 0000000000000000 R14: ffffffff8c09acc8 R15: 0000000000000000
FS:  00007f1910fff8c0(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f190e006010 CR3: 00000000a1996000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __debug_check_no_obj_freed lib/debugobjects.c:760 [inline]
 debug_check_no_obj_freed+0x2c0/0x680 lib/debugobjects.c:776
 free_pages_prepare mm/page_alloc.c:1064 [inline]
 __free_pages_ok+0x215/0xeb0 mm/page_alloc.c:1262
 slab_destroy mm/slab.c:1723 [inline]
 slabs_destroy+0x90/0xd0 mm/slab.c:1739
 cache_flusharray mm/slab.c:3483 [inline]
 ___cache_free+0x213/0x2c0 mm/slab.c:3525
 qlink_free mm/kasan/quarantine.c:147 [inline]
 qlist_free_all+0x79/0x140 mm/kasan/quarantine.c:166
 quarantine_reduce+0x185/0x200 mm/kasan/quarantine.c:259
 kasan_kmalloc+0xa2/0x160 mm/kasan/kasan.c:536
 slab_post_alloc_hook mm/slab.h:442 [inline]
 slab_alloc mm/slab.c:3390 [inline]
 kmem_cache_alloc+0x111/0x3c0 mm/slab.c:3550
 prepare_creds+0x39/0x490 kernel/cred.c:255
 SYSC_faccessat fs/open.c:365 [inline]
 SyS_faccessat+0x7b/0x680 fs/open.c:353
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f19102bb9c7
RSP: 002b:00007ffd8a8cccb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000015
RAX: ffffffffffffffda RBX: 00007ffd8a8cfce0 RCX: 00007f19102bb9c7
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000560930f3c9a3
RBP: 00007ffd8a8cce00 R08: 0000560930f323e5 R09: 0000000000000018
R10: 0000000000000069 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00005609317508a0 R15: 00007ffd8a8cd2f0
Code: 72 48 83 3d 3d a3 cf 01 00 74 64 48 89 df 57 9d 0f 1f 44 00 00 e8 e4 00 20 fa bf 01 00 00 00 e8 8a 1a 18 fa 65 8b 05 a3 ef e0 78 <85> c0 74 39 5b 5d c3 e8 57 73 20 fa 48 c7 c0 88 92 f0 88 48 ba 

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2022/07/25 23:41 linux-4.14.y 9c3bf9cf362f 52e37319 .config log report syz C
ci2-linux-4-14 2022/06/25 21:18 linux-4.14.y f051383ef03b 52e37319 .config log report syz C
ci2-linux-4-14 2022/05/26 20:50 linux-4.14.y 501eec4f9e13 52e37319 .config log report syz C
ci2-linux-4-14 2022/04/26 19:19 linux-4.14.y 15a1c6b6f516 52e37319 .config log report syz C
ci2-linux-4-14 2022/03/27 10:36 linux-4.14.y 004bfaafc45c 52e37319 .config log report syz C
ci2-linux-4-14 2022/02/25 04:57 linux-4.14.y fa33f9094f36 52e37319 .config log report syz C
ci2-linux-4-14 2022/01/26 01:53 linux-4.14.y 4ba8e26127c3 52e37319 .config log report syz C
ci2-linux-4-14 2021/12/27 01:21 linux-4.14.y 8ee0807eedf3 52e37319 .config log report syz C
ci2-linux-4-14 2021/11/27 00:15 linux-4.14.y 66722c42ec91 52e37319 .config log report syz C
ci2-linux-4-14 2021/10/27 23:47 linux-4.14.y cd5296934610 52e37319 .config log report syz C
ci2-linux-4-14 2021/09/23 06:15 linux-4.14.y 8ea4f73cfa7e 52e37319 .config log report syz C
ci2-linux-4-14 2021/08/24 05:43 linux-4.14.y 162b95d01320 52e37319 .config log report syz C
ci2-linux-4-14 2021/07/25 01:16 linux-4.14.y 964f3712e6a7 52e37319 .config log report syz C
ci2-linux-4-14 2021/06/24 23:08 linux-4.14.y cfb41ef9deb1 52e37319 .config log report syz C
ci2-linux-4-14 2021/05/25 21:01 linux-4.14.y 96afcb20f36f 52e37319 .config log report syz C
ci2-linux-4-14 2021/04/25 20:33 linux-4.14.y cf256fbcbe34 52e37319 .config log report syz C
ci2-linux-4-14 2021/03/26 13:24 linux-4.14.y 670d6552eda8 52e37319 .config log report syz C
ci2-linux-4-14 2021/02/24 12:53 linux-4.14.y 3242aa3a635c 52e37319 .config log report syz C
ci2-linux-4-14 2021/01/19 00:38 linux-4.14.y 2762b48e9611 0767f13f .config log report syz C
ci2-linux-4-14 2020/12/20 00:04 linux-4.14.y 3f2ecb86cb90 0767f13f .config log report syz C
Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2021/01/25 05:21 linux-4.14.y 2d2791fce891 52e37319 .config log report syz C INFO: task hung in truncate_inode_pages_range
ci2-linux-4-14 2020/11/19 23:28 linux-4.14.y 8961076ed318 0767f13f .config log report syz C