syzbot


INFO: task hung in pagecache_get_page

Status: upstream: reported on 2022/12/25 04:38
Reported-by: syzbot+d0a6733ba15178dd98c0@syzkaller.appspotmail.com
First crash: 511d, last: 511d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 INFO: task hung in pagecache_get_page 89 2161d 2292d 0/3 auto-closed as invalid on 2019/02/22 12:49
upstream INFO: task hung in pagecache_get_page fs 144 2038d 2356d 0/26 closed as dup on 2017/12/12 16:52
android-44 INFO: task hung in pagecache_get_page 9 2215d 2269d 0/2 auto-closed as invalid on 2019/02/22 15:22
upstream INFO: task hung in pagecache_get_page (2) block 1 1368d 1368d 0/26 auto-closed as invalid on 2020/11/17 18:29
android-49 INFO: task hung in pagecache_get_page (2) 2 1842d 1850d 0/3 auto-closed as invalid on 2019/10/25 08:51

Sample crash report:
INFO: task syz-executor.3:5944 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3  D26248  5944   8125 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 io_schedule+0xb5/0x120 kernel/sched/core.c:5181
audit: type=1804 audit(1671943082.050:1316): pid=11549 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir4030430571/syzkaller.FdWoNm/122/bus" dev="sda1" ino=14521 res=1
 wait_on_page_bit_common mm/filemap.c:1123 [inline]
 __lock_page+0x316/0x460 mm/filemap.c:1296
 lock_page include/linux/pagemap.h:484 [inline]
 pagecache_get_page+0x673/0xd50 mm/filemap.c:1577
 find_or_create_page include/linux/pagemap.h:322 [inline]
 grab_cache_page include/linux/pagemap.h:388 [inline]
 grab_tail_page fs/reiserfs/inode.c:2211 [inline]
 reiserfs_truncate_file+0x701/0x1030 fs/reiserfs/inode.c:2279
 reiserfs_vfs_truncate_file+0x29/0x40 fs/reiserfs/file.c:139
 reiserfs_direct_IO+0x204/0x270 fs/reiserfs/inode.c:3280
 generic_file_direct_write+0x208/0x4a0 mm/filemap.c:3073
 __generic_file_write_iter+0x2d0/0x610 mm/filemap.c:3252
 generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323
 call_write_iter include/linux/fs.h:1821 [inline]
 new_sync_write fs/read_write.c:474 [inline]
 __vfs_write+0x51b/0x770 fs/read_write.c:487
 vfs_write+0x1f3/0x540 fs/read_write.c:549
 ksys_write+0x12b/0x2a0 fs/read_write.c:599
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7feb3f83b0a9
Code: Bad RIP value.
RSP: 002b:00007feb35d4a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007feb3f95b1f0 RCX: 00007feb3f83b0a9
RDX: 00000000175d900f RSI: 0000000020000200 RDI: 0000000000000004
RBP: 00007feb3f896ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc7b71c80f R14: 00007feb35d4a300 R15: 0000000000022000
INFO: task syz-executor.3:5947 blocked for more than 140 seconds.
audit: type=1804 audit(1671943083.020:1317): pid=11564 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir4030430571/syzkaller.FdWoNm/123/file0" dev="sda1" ino=14525 res=1
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3  D25456  5947   8125 0x80000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27
 reiserfs_get_block+0x1c2/0x3e40 fs/reiserfs/inode.c:688
audit: type=1804 audit(1671943083.780:1318): pid=11590 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir4030430571/syzkaller.FdWoNm/124/file0" dev="sda1" ino=14581 res=1
audit: type=1804 audit(1671943083.810:1319): pid=11606 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.3" name="/root/syzkaller-testdir4030430571/syzkaller.FdWoNm/124/file0" dev="sda1" ino=14581 res=1
 do_mpage_readpage+0x8fb/0x1ca0 fs/mpage.c:231
 mpage_readpages+0x33a/0x630 fs/mpage.c:404
 read_pages.isra.0+0xf6/0x5d0 mm/readahead.c:123
 __do_page_cache_readahead+0x5c6/0x6c0 mm/readahead.c:211
 ra_submit mm/internal.h:66 [inline]
 ondemand_readahead.isra.0+0x575/0xd40 mm/readahead.c:493
 page_cache_sync_readahead mm/readahead.c:528 [inline]
 page_cache_sync_readahead+0x275/0x520 mm/readahead.c:510
 generic_file_buffered_read mm/filemap.c:2115 [inline]
 generic_file_read_iter+0x1497/0x2b60 mm/filemap.c:2385
 call_read_iter include/linux/fs.h:1815 [inline]
 new_sync_read fs/read_write.c:406 [inline]
 __vfs_read+0x518/0x750 fs/read_write.c:418
 integrity_kernel_read+0x147/0x1f0 security/integrity/iint.c:200
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:364 [inline]
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:393 [inline]
 ima_calc_file_hash+0x4b2/0x8a0 security/integrity/ima/ima_crypto.c:450
 ima_collect_measurement+0x4c4/0x570 security/integrity/ima/ima_api.c:231
 process_measurement+0xddd/0x1440 security/integrity/ima/ima_main.c:284
 ima_file_check+0xb9/0x100 security/integrity/ima/ima_main.c:391
 do_last fs/namei.c:3425 [inline]
 path_openat+0x7e4/0x2df0 fs/namei.c:3537
 do_filp_open+0x18c/0x3f0 fs/namei.c:3567
 do_sys_open+0x3b3/0x520 fs/open.c:1085
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7feb3f83b0a9
Code: Bad RIP value.
RSP: 002b:00007feb35d29168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007feb3f95b2c0 RCX: 00007feb3f83b0a9
RDX: 0000000000000000 RSI: 0000000020000000 RDI: ffffffffffffff9c
RBP: 00007feb3f896ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc7b71c80f R14: 00007feb35d29300 R15: 0000000000022000

Showing all locks held in the system:
4 locks held by kworker/1:0/19:
 #0: 0000000031d80c7c ((wq_completion)"events_long"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 00000000d6600f56 ((work_completion)(&(&sbi->old_work)->work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
 #2: 00000000c46c0801 (&type->s_umount_key#76){++++}, at: flush_old_commits+0x78/0x200 fs/reiserfs/super.c:97
 #3: 00000000e64c210b (&sbi->lock){+.+.}, at: reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27
1 lock held by khungtaskd/1569:
 #0: 0000000053d4e925 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by systemd-udevd/4696:
1 lock held by in:imklog/7849:
 #0: 000000008fa20934 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
2 locks held by kworker/0:3/9314:
 #0: 00000000dd38e9e8 ((wq_completion)"rcu_gp"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 00000000825167fd ((work_completion)(&rew.rew_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
3 locks held by kworker/u4:9/23474:
5 locks held by syz-executor.3/5944:
 #0: 0000000079a10fec (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
 #1: 00000000d0a096b9 (sb_writers#21){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
 #1: 00000000d0a096b9 (sb_writers#21){.+.+}, at: vfs_write+0x463/0x540 fs/read_write.c:548
 #2: 00000000ff924651 (&sb->s_type->i_mutex_key#27){+.+.}, at: inode_lock include/linux/fs.h:748 [inline]
 #2: 00000000ff924651 (&sb->s_type->i_mutex_key#27){+.+.}, at: generic_file_write_iter+0x99/0x730 mm/filemap.c:3320
 #3: 0000000007484c71 (&ei->tailpack){+.+.}, at: reiserfs_vfs_truncate_file+0x1c/0x40 fs/reiserfs/file.c:138
 #4: 00000000e64c210b (&sbi->lock){+.+.}, at: reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27
2 locks held by syz-executor.3/5947:
 #0: 00000000e9e4635b (&iint->mutex){+.+.}, at: process_measurement+0x316/0x1440 security/integrity/ima/ima_main.c:224
 #1: 00000000e64c210b (&sbi->lock){+.+.}, at: reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27
2 locks held by syz-executor.0/11636:
 #0: 00000000f9607dad (&sb->s_type->i_mutex_key#13){+.+.}, at: inode_lock include/linux/fs.h:748 [inline]
 #0: 00000000f9607dad (&sb->s_type->i_mutex_key#13){+.+.}, at: __sock_release+0x86/0x2a0 net/socket.c:598
 #1: 00000000c01fa1c2 (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline]
 #1: 00000000c01fa1c2 (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x4dc/0x6f0 kernel/rcu/tree_exp.h:667
3 locks held by syz-executor.5/11673:
audit: type=1804 audit(1671943085.650:1320): pid=11676 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir4030430571/syzkaller.FdWoNm/126/bus" dev="sda1" ino=14261 res=1

netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'.
=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1569 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4685 Comm: systemd-journal Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:lock_acquire+0x15b/0x3c0 kernel/locking/lockdep.c:3908
Code: 48 0f a3 05 7f 8b db 09 0f 82 95 01 00 00 4c 8b 4c 24 08 44 89 ea 6a 00 48 89 ef 6a 00 45 89 f8 44 89 f1 44 89 e6 ff 74 24 60 <ff> 74 24 18 49 c1 e9 09 49 83 f1 01 41 83 e1 01 e8 d0 a3 ff ff 48
RSP: 0018:ffff8880a1137b60 EFLAGS: 00000082
RAX: 0000000000000000 RBX: ffff8880a112e3c0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8d3730e0
RBP: ffffffff8d3730e0 R08: 0000000000000001 R09: 0000000000000086
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
FS:  00007f5c1d9b38c0(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8d585ec718 CR3: 00000000a10d3000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152
 __debug_check_no_obj_freed lib/debugobjects.c:776 [inline]
 debug_check_no_obj_freed+0xb5/0x490 lib/debugobjects.c:817
 kmem_cache_free+0xff/0x260 mm/slab.c:3764
 putname+0xe1/0x120 fs/namei.c:261
 filename_lookup+0x3d0/0x5a0 fs/namei.c:2358
 user_path_at include/linux/namei.h:57 [inline]
 do_faccessat+0x248/0x7a0 fs/open.c:397
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f5c1cc6e9c7
Code: 83 c4 08 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d c8 d4 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 b8 15 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 d4 2b 00 f7 d8 64 89 01 48
RSP: 002b:00007ffcb643e318 EFLAGS: 00000246 ORIG_RAX: 0000000000000015
RAX: ffffffffffffffda RBX: 00007ffcb6441340 RCX: 00007f5c1cc6e9c7
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055e5d203c9a3
RBP: 00007ffcb643e460 R08: 000055e5d20323e5 R09: 0000000000000018
R10: 0000000000000069 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 000055e5d3fcb8a0 R15: 00007ffcb643e950

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/25 04:38 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in pagecache_get_page
* Struck through repros no longer work on HEAD.