syzbot


INFO: task hung in page_cache_ra_unbounded

Status: upstream: reported on 2024/01/25 18:23
Reported-by: syzbot+621fd4619540ebd8d0b1@syzkaller.appspotmail.com
First crash: 102d, last: 40d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in page_cache_ra_unbounded fs mm 2 874d 893d 0/26 closed as invalid on 2022/02/08 09:40
upstream INFO: task hung in page_cache_ra_unbounded (2) fs mm 144 47m 98d 0/26 moderation: reported on 2024/01/29 23:05

Sample crash report:
INFO: task syz-executor.1:5111 blocked for more than 143 seconds.
      Not tainted 5.15.153-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:26832 pid: 5111 ppid:  4107 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 schedule+0x11b/0x1f0 kernel/sched/core.c:6459
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6518
 rwsem_down_read_slowpath+0x605/0xb40 kernel/locking/rwsem.c:1047
 __down_read_common kernel/locking/rwsem.c:1231 [inline]
 __down_read kernel/locking/rwsem.c:1244 [inline]
 down_read+0x9a/0x2e0 kernel/locking/rwsem.c:1490
 filemap_invalidate_lock_shared include/linux/fs.h:844 [inline]
 page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195
 page_cache_sync_readahead include/linux/pagemap.h:833 [inline]
 filemap_get_pages mm/filemap.c:2551 [inline]
 filemap_read+0x71c/0x2980 mm/filemap.c:2634
 blkdev_read_iter+0x12a/0x180 block/fops.c:560
 call_read_iter include/linux/fs.h:2142 [inline]
 generic_file_splice_read+0x4ad/0x790 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x448/0xc10 fs/splice.c:870
 do_splice_direct+0x285/0x3d0 fs/splice.c:979
 do_sendfile+0x625/0xff0 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1317 [inline]
 __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1303
 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:0x7fcbcd506da9
RSP: 002b:00007fcbcba870c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fcbcd634f80 RCX: 00007fcbcd506da9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000006
RBP: 00007fcbcd55347a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fcbcd634f80 R15: 00007ffd04cd7de8
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91f720 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3262:
 #0: ffff88814b386098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002bab2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
1 lock held by syz-executor.4/4882:
1 lock held by syz-executor.1/5111:
 #0: ffff888140895bb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:844 [inline]
 #0: ffff888140895bb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195
1 lock held by syz-executor.3/6874:
2 locks held by syz-executor.2/7800:
6 locks held by syz-executor.4/7838:
2 locks held by syz-executor.4/7840:
 #0: ffff88807e49c098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffff88807e49c2e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_ioctl+0xa6/0x300 drivers/tty/n_tty.c:2464

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.153-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
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 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 6595 Comm: syz-executor.1 Not tainted 5.15.153-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
RIP: 0010:get_current arch/x86/include/asm/current.h:15 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x4/0x60 kernel/kcov.c:196
Code: 00 00 00 0f 1f 00 53 48 89 fb e8 17 00 00 00 48 8b 3d b8 5d 63 0c 48 89 de 5b e9 d7 e7 48 00 cc cc cc cc cc cc cc 48 8b 04 24 <65> 48 8b 0d 04 36 82 7e 65 8b 15 05 36 82 7e f7 c2 00 01 ff 00 74
RSP: 0018:ffffc90002d379f0 EFLAGS: 00000283
RAX: ffffffff83c465a6 RBX: 0000000000000001 RCX: ffffffff83c4657a
RDX: ffff888073e31dc0 RSI: 0000000000000000 RDI: 0000000000000002
RBP: ffff8880170a9a30 R08: ffffffff83c46592 R09: ffffed1002e1534a
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000000017e0
R13: dffffc0000000000 R14: ffffc90002d37b28 R15: 00000000000000f1
FS:  0000555556a0e480(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555556a1f978 CR3: 0000000052f54000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 tomoyo_check_acl+0x316/0x410 security/tomoyo/domain.c:183
 tomoyo_path_permission+0x1af/0x360 security/tomoyo/file.c:586
 tomoyo_path_perm+0x436/0x6b0 security/tomoyo/file.c:838
 tomoyo_path_unlink+0xcc/0x100 security/tomoyo/tomoyo.c:149
 security_path_unlink+0xd7/0x130 security/security.c:1170
 do_unlinkat+0x3dd/0x950 fs/namei.c:4344
 __do_sys_unlink fs/namei.c:4396 [inline]
 __se_sys_unlink fs/namei.c:4394 [inline]
 __x64_sys_unlink+0x45/0x50 fs/namei.c:4394
 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:0x7f501916a557
Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0d3466b8 EFLAGS: 00000206 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f501916a557
RDX: 00007fff0d3466e0 RSI: 00007fff0d346770 RDI: 00007fff0d346770
RBP: 00007fff0d346770 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 00007fff0d347830
R13: 00007f50191b63b9 R14: 000000000004835b R15: 000000000000000c
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/28 02:06 linux-5.15.y 9465fef4ae35 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in page_cache_ra_unbounded
2024/01/25 18:22 linux-5.15.y ddcaf4999061 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in page_cache_ra_unbounded
2024/02/17 06:21 linux-5.15.y 6139f2a02fe0 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in page_cache_ra_unbounded
* Struck through repros no longer work on HEAD.